jjzjj

CFBundleURLName

全部标签

ios - CFBundleURLName 必须匹配 CFBundleIdentifier 吗?

如果我希望iOSAppApp1在设备上启动App2,那么CFBundleURLName是否需要与Info.plist中的CFBundleURLTypes中的CFBundleIdentifier相匹配?例如,如果我在App1中有CFBundleIdentifiercom.foo.App1...CFBundleURLTypesCFBundleURLTypesCFBundleURLSchemesfooschemeCFBundleURLNamecom.foo.App1在上述情况下,App2可以在App1中启动“fooscheme:”url。但是,如果我将App1的Info.plist更改为包含

ios - 为什么我们需要 "URL Identifier"(CFBundleURLName) plist 字段才能在 iOS 上使用自定义 URL 方案?

当在设备上点击此Web链接时,我正在使用自定义URL方案打开我的iOS应用程序:Demo77://someurl为了设置它,我将Demo77作为一个项目添加到Info.plist中的URLSchemes(CFBundleURLSchemes)数组中。Appledocumentation说我还需要在Info.plist中包含URL标识符(CFBundleURLName)字符串键。此键包含“URL方案的抽象名称”。我没有包含URLidentifier键,链接仍然打开我的应用程序。没有URL标识符一切正常。问题:我真的需要在plist中包含URLidentifier键吗?如果是这样-为什么?