简体   繁体   English

离子ios10 beta权限错误

[英]ionic ios10 beta permissions bug

I just upgraded to ios10 beta on my iPhone & realized the permissions (to access photos, contacts, etc) now require a description string. 我刚刚在我的iPhone上升级到ios10 beta并且意识到权限(访问照片,联系人等)现在需要一个描述字符串。 I am on ionic 2 我在离子2上

I tried adding this: 我尝试添加这个:

<config-file target="*-info.plist" parent="NSContactsUsageDescription">
<String>This is my permission string</String>
</config-file> 

to my config.xml but that did not work. 到我的config.xml但是没有用。

I then tried to do it manually through XCode & now it works but I have to put the app in the background in order to get the permission popup. 然后我尝试通过XCode手动完成它现在它可以工作,但我必须将应用程序放在后台才能获得权限弹出窗口。 Is this a known bug or is it something I'm doing wrong? 这是一个已知的错误还是我做错了什么?

I would have to see your Error, but basically you now have to add things like this 我必须看到你的错误,但基本上你现在必须添加这样的东西

camera 相机

<key>NSCameraUsageDescription</key>
<string>Test message</string>

Photo Library 图片库

<key>NSPhotoLibraryUsageDescription</key>
<string>Test message</string>

In your Appname-info.Plist 在您的Appname-info.Plist中

I since fixed the original problem I posted in this question. 我自从修复了我在这个问题中发布的原始问题。 I believe the issue was caused by requesting permission to the user's location before the app was completely loaded. 我认为问题是由于在应用程序完全加载之前请求对用户位置的许可。 This made the original "request location" popup appear behind the app - therefore every other permission request appeared behind the app. 这使得原始的“请求位置”弹出窗口显示在应用程序后面 - 因此每个其他权限请求都出现在应用程序后面。 After moving this request to a further point in the app, the permissions popups appeared above the app. 将此请求移至应用程序中的另一个点后,权限弹出窗口显示在应用程序上方。

For Camera and Photo Library use this, for me it fixed everything. 对于相机和照片库使用这个,对我来说它修复了一切。

ionic cordova plugin remove cordova-plugin-camera
ionic cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="app uses camera" --variable PHOTOLIBRARY_USAGE_DESCRIPTION="app uses library"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM