简体   繁体   English

$(PRODUCT_BUNDLE_IDENTIFIER)和适用于iOS的URL方案

[英]$(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.

相关问题 $(PRODUCT_BUNDLE_IDENTIFIER) 不是有效的捆绑标识符 - $(PRODUCT_BUNDLE_IDENTIFIER) is not a valid bundle identifier 如何在Xcode中更改$(PRODUCT_BUNDLE_IDENTIFIER)? - How to change $(PRODUCT_BUNDLE_IDENTIFIER) in Xcode? iOS 应用程序没有捆绑标识符。 在构建设置编辑器中为 PRODUCT_BUNDLE_IDENTIFIER 添加一个值 - iOS App doesn't have a bundle identifier. Add a value for PRODUCT_BUNDLE_IDENTIFIER in the build settings editor 缺少捆绑包标识符。 x 没有包标识符。 在构建设置编辑器中为 PRODUCT_BUNDLE_IDENTIFIER 添加一个值 - Bundle identifier is missing. x doesn't have a bundle identifier. Add a value for PRODUCT_BUNDLE_IDENTIFIER in the build settings editor 有没有办法从iOS中的包标识符中获取URL方案? - Is there a way to get the URL scheme from the bundle identifier in iOS? 使用3D Touch快速操作时将$(PRODUCT_BUNDLE_IDENTIFIER)传递给参数 - Passing $(PRODUCT_BUNDLE_IDENTIFIER) to a parameter while using 3D Touch quick actions 点击带有Bundle Identifier的按钮上的打开应用程序(无url方案) - Open application on button tapped with Bundle Identifier (Without url scheme) 捆绑标识符应作为URL方案添加,以启用Google登录 - The bundle identifier should be added as a URL scheme to enable Google sign-in 用于 iOS 应用的具有多个捆绑标识符的 URL 类型 - URL types with multiple bundle identifier for iOS app URL标识符和URL方案 - URL identifier and URL scheme
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM