我需要添加相同的栏(顶部的栏,对不起如郎,栏使用的是操作系统语言,无论如何Открыть等于打开) FB example,据我所知,它是原生的,所以我找到了一种添加if的方法,添加到
<meta name="apple-itunes-app" content="app-id=MyAppId(it exists on app store)">在下载应用程序并在本地部署网站后,我从iPhone打开它,看到了一个栏(但它看起来不同,我很高兴,做了一个屏幕截图)My screenshot with working bar,但现在它消失了,我不知道为什么。告诉我,可能的问题是什么,为什么这些面板是不同的(对我和facebook),也许我错过了一种方式来使用相同的工具栏作为FB?
发布于 2021-08-23 19:23:34
您需要配置一个智能应用程序横幅,请阅读以下内容:https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners了解完整的详细信息。首先,您需要在希望显示横幅的每个页面的head元素中添加此meta标记:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, app-argument=myURL">然后在你的应用委托中实现application(_:open:sourceApplication:annotation:),你可以提供逻辑来解释你传递的网址,这是一个来自苹果网站的例子:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// In this example, the URL from which the user came is http://example.com/profile/?12345.
// Determine whether the user was viewing a profile.
if ([[url path] isEqualToString:@"/profile"]) {
// Switch to the profile view controller.
[self.tabBarController setSelectedViewController:profileViewController];
// Pull the profile ID number found in the query string.
NSString *profileID = [url query];
// Pass the profile ID number to the profile view controller.
[profileViewController loadProfile:profileID];
}
return YES;
}https://stackoverflow.com/questions/68891493
复制相似问题