iPhone Smart App Banners - openUrl not called

妖精的绣舞 提交于 2020-01-02 07:20:16

问题


Hey stackoverflow fellows,

I recently tried to implement the Smart App Banners from Apple.
They work but, I'm not able the get app-argument data in my App.
The App runs on iOS 5, 6, & 7 but I tried iOS 6 & 7 only, too.
Here's my code for the Banner:

<meta name="apple-itunes-app" content="app-id=688798564, app-argument=http://app.heimwerker.de/2" />


This is my implementation:

-(BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:NSString*)sourceApplication annotation:(id)annotation{
NSLog(@"URL: %@",url.absoluteString);

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle: nil];
ReadViewController *dest = [storyboard instantiateViewControllerWithIdentifier:@"ReadVC"];
NSNumberFormatter *format = [[NSNumberFormatter alloc] init];
dest.uid = [format numberFromString: url.absoluteString];
[[[UIAlertView alloc] initWithTitle:@"Smart App" message:url.absoluteString delegate:nil cancelButtonTitle:@"Abbrechen" otherButtonTitles:nil]show];


return YES;

}


This method is never called. I don't know why.


回答1:


This is a reported iOS7 bug. Have a look at the open bug report It should work on iOS6 though



来源:https://stackoverflow.com/questions/19642557/iphone-smart-app-banners-openurl-not-called

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!