美文网首页
iOS自定义链接

iOS自定义链接

作者: 我是小胡胡123 | 来源:发表于2017-04-10 11:37 被阅读153次

URL types CFBundleURLTypes
URL identifier CFBundleURLName
URL Schemes CFBundleURLSchemes

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>com.schemedemo1</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>urlschemedemo1</string>
        </array>
    </dict>
</array>



<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlschemedemo3</string>
</array>


openURL:
iOS[2.0,10.0)可用

canOpenURL:
iOS 3.0以上可用
LSApplicationQueriesSchemes
必须将被检测的app的urlschemes添加到LSApplicationQueriesSchemes键值数组内。否则canOpenURL一直返回NO

openURL:options:completionHanler:
iOS 10.0以上可用
options参数是一个字典
@{UIApplicationOpenURLOptionUniversalLinksOnly:@(YES)}

application:handleOpenURL:
iOS[2.0, 9.0)可用

application:openURL:sourceApplication:annotation:
iOS[4.2, 9.0)可用

application:openURL:options:
iOS 9.0以上可用

相关文章

网友评论

      本文标题:iOS自定义链接

      本文链接:https://www.haomeiwen.com/subject/tirsattx.html