4

嘿 stackoverflow 伙伴们,

我最近尝试实现 Apple 的 Smart App Banners。
它们可以工作,但是我无法在我的应用程序中获取应用程序参数数据。
该应用程序在 iOS 5、6 和 7 上运行,但我也只尝试了 iOS 6 和 7。
这是我的横幅代码:

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


这是我的实现:

-(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;

}


这个方法永远不会被调用。我不知道为什么。

4

1 回答 1

2

这是一个报告的 iOS7 错误。看看打开的错误报告 它应该可以在 iOS6 上运行

于 2013-11-19T16:25:09.563 回答