URL scheme
在iOS9中,如果使用URL scheme必须在"Info.plist"中将你要在外部调用的URL scheme列为白名单,否则不能使用。key叫做LSApplicationQueriesSchemes ,键值内容是
<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlscheme</string>
<string>urlscheme2</string>
<string>urlscheme3</string>
<string>urlscheme4</string>
</array>
推荐一篇博客: http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes
其中最关键的是以下部分:
1
2
|
If you call the “canOpenURL” method on a URL that is not
in
your whitelist, it will
return
“NO”, even
if
there is an app installed that has registered to handle
this
scheme. A “This app is not allowed to query
for
scheme xxx” syslog entry will appear.
If you call the “openURL” method on a URL that is not
in
your whitelist, it will fail silently. A “This app is not allowed to query
for
scheme xxx” syslog entry will appear.
|
更多信息请移步:WWDC 2015 Session 703: "Privacy and Your App" 时间在30:18左右
以下是几个常用分享需要添加的代码:
qq登录绑定,qq支付,qq分享
微信支付,微信登录绑定
新浪登录绑定
支付宝支付,支付宝登录绑定
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mqqOpensdkSSoLogin</string>
<string>mqzone</string>
<string>sinaweibo</string>
<string>alipayauth</string>
<string>alipay</string>
<string>safepay</string>
<string>mqq</string>
<string>mqqapi</string>
<string>mqqopensdkapiV3</string>
<string>mqqopensdkapiV2</string>
<string>mqqapiwallet</string>
<string>mqqwpa</string>
<string>mqqbrowser</string>
<string>wtloginmqq2</string>
<string>weixin</string>
<string>wechat</string>
</array>加了15条 才实现
iPad适配Slide Over 和 Split View
【iPad适配Slide Over 和 Split View】 若想适配multi tasking特性,唯一的建议:弃纯代码,改用storyboard、xib,纵观苹果WWDC所有Demo均是如此: