在新的OS 10
Apple我添加了访问music library
的新权限,我的问题是使用Ti.Media.queryMusicLibrary
,当我调用此方法应用程序崩溃时,我试图搜索条件以检查用户是否已授予访问权限或请求访问音乐库找不到他们!
var musicList = Ti.Media.queryMusicLibrary({
mediaType : Ti.Media.MUSIC_MEDIA_TYPE_MUSIC
});
升级到ios
10和appcelerator
SDK到5.5.0.GA后,当你调用上面的方法时,应用程序将崩溃!
尝试将以下密钥添加到tiapp.xml ios标记:
NSAppleMusicUsageDescription
<ios>
<plist>
<dict>
<key>NSAppleMusicUsageDescription</key>
<string>Allow this app to access your music library.</string>
<key>UISupportedInterfaceOrientations~iphone</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<false/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</plist>
</ios>
也,
有关更多信息,请参阅以