元 "apple-itunes-app" 不起作用
Meta "apple-itunes-app" doesn't work
我在 App Store 中的应用程序 link 中写了一个带有 Apple 元数据的 html 页面:
<meta name="apple-itunes-app" content="app-id=MY_APP_ID" app-argument="myschema:http://example.com">
文档
(https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html)
说 "app-argument" 应用程序触发 application:openURL:sourceApplication:annotation:
方法并作为 url 应用程序参数传递。
方法没有被调用。
方法文档说要使用新方法 application:openURL:options:
,没有任何变化。
我在其他答案中读到此元仅适用于发布应用程序版本(因此不可调试),因此我在应用程序中放置了一个隐藏文件日志并在方法的第一行登录以确保问题不是我在方法中的代码。
我尝试使用 ios11 和 ios11.1
有什么建议吗?
您包含的文档 link 明确显示 "app-argument" 应该是赋予 content
属性值的一部分,而不是属性本身。注意引号在哪里:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
我在 App Store 中的应用程序 link 中写了一个带有 Apple 元数据的 html 页面:
<meta name="apple-itunes-app" content="app-id=MY_APP_ID" app-argument="myschema:http://example.com">
文档
(https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html)
说 "app-argument" 应用程序触发 application:openURL:sourceApplication:annotation:
方法并作为 url 应用程序参数传递。
方法没有被调用。
方法文档说要使用新方法 application:openURL:options:
,没有任何变化。
我在其他答案中读到此元仅适用于发布应用程序版本(因此不可调试),因此我在应用程序中放置了一个隐藏文件日志并在方法的第一行登录以确保问题不是我在方法中的代码。
我尝试使用 ios11 和 ios11.1
有什么建议吗?
您包含的文档 link 明确显示 "app-argument" 应该是赋予 content
属性值的一部分,而不是属性本身。注意引号在哪里:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">