[英]$(PRODUCT_BUNDLE_IDENTIFIER) and URL Scheme for iOS
I am having issues with my URL scheme using $(PRODUCT_BUNDLE_IDENTIFIER)
for two apps. 我在两个应用程序中使用
$(PRODUCT_BUNDLE_IDENTIFIER)
URL方案遇到问题。 It doesnt seem to open the correct app when I put in the URL scheme in the browser. 当我在浏览器中放入URL方案时,似乎没有打开正确的应用程序。 I believe it's only reading the scheme and not the name but I am not sure.
我相信这只是阅读计划,而不是名称,但我不确定。 Does the XML below look right for my URL scheme?
下面的XML是否适合我的URL方案?
The links below do not open the correct app. 下面的链接无法打开正确的应用程序。 com.text.5 URL would open the com.text.0 app.
com.text.5 URL将打开com.text.0应用程序。
test://com.test.0
test://com.test.5
info.plist info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>test</string>
</array>
</dict>
</array>
I used the $(PRODUCT_BUNDLE_IDENTIFIER)
for the scheme also and that seems to fix the issue. 我也将
$(PRODUCT_BUNDLE_IDENTIFIER)
用于该方案,这似乎可以解决该问题。 Looks like unlike Android, Apple only uses the scheme to identify the app, not very clever. 看起来与Android不同,Apple仅使用该方案来识别应用程序,而不是非常聪明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.