提交到 App Store 时出现无效后台模式错误消息
我在将应用程序提交到应用程序商店时遇到问题。我的应用程序想要在后台运行,因此我在 plist 中设置了“应用程序寄存器以在所需的后台模式下进行位置更新”数组。当我尝试上传到应用程序商店时,收到以下错误消息:
无效的 UIBackgroundModes:UIBackgroundmodes 键包含无效值
I have an issue with submitting my app to the app store. My app wants to run in the background, so I have set "App registers for location updates in required back ground modes" array in the plist. When I try to upload to the app store, I am getting the following error message:
Invalid UIBackgroundModes: the UIBackgroundmodes key contains an invalid value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您应该在文本编辑中打开应用程序的 info.plist,找到背景模式部分,看看是否有任何奇怪或不正常的地方。如果您无法从那里弄清楚,只需将 plist 的内容发布到您的问题中即可。
You should open your apps info.plist in Text Edit, find the background modes section and see if there is anything strange or off about it. If you can't figure it out from there just post the contents of the plist in your question.
抱歉,我无法发表评论,所以我想澄清我对此的疑问。
我的应用程序需要在后台模式下工作以进行推送通知和通知地点。
我面临着同样的问题&我不明白这有什么问题。
谢谢
更新:
然后我发现删除了手动添加的“位置”属性,一旦添加到功能部分就不再需要该属性。 (对于新版本的 Xcode,后台模式下的功能部分中给出了配置,以配置您的应用程序使用后台模式进行位置、推送通知等。)
sorry i can not comment so i want to clear my query on this.
My app need to work in background mode for push notification & location.
I am facing same issue & i am unable to get what is wrong in this.
Thanks
Updated:
I then found that Removing the "Location" attribute which was added manually which was not required once added in capabilities section. (for new versions of Xcode the provision is given in capabilities section under background mode to configure that your app is using background mode for location, push notification etc.)
当我从其他目标的 plist 复制后台模式时,我也遇到了类似的问题。
我按照以下步骤修复它
info.plist >打开为>源代码
然后搜索 UIBackgroundModes。
我看到的是错误的是:
要解决此问题,我已将 UIBackgroundModes 更改为:
还有其他方便的方法
只需关闭背景即可模式从“签名和功能”再次,您的plist将自动更新。
希望它会对面临同样问题的其他人有所帮助。
I also got the similar issue when i copied the background mode from other target's plist.
I follow the below steps to fix it
info.plist > open as > source code
Then search for UIBackgroundModes.
What i see is wrong is :
To fix this i have change the UIBackgroundModes to :
There is other convenient way of doing it is
Just turn off the the background mode from "Signing and capabilities" and on it again your plist will update automatic.
hope it will help to others who are facing the same issue.
检查info.plist上的“所需背景模式”,我那里有一个空的
,删除后问题解决了!info.plist 图片
Check "Required background modes" on info.plist, I had an empty
<string></string>
there, after I deleted it the problem was solved!info.plist image