简体   繁体   English

如何刷新现有 Xcode 应用程序的配置文件?

[英]How do I refresh the provisioning profiles for existing Xcode apps?

Recently, all copies of our IOS app (built directly from Xcode, not app store) have stopped working.最近,我们的 IOS 应用程序(直接从 Xcode 构建,而不是应用程序商店)的所有副本都停止工作。 I think this was caused by a developer license renewal.我认为这是由开发人员许可证更新引起的。 It was my first time renewing the license, so am not completely familiar with the process.这是我第一次更新许可证,所以对这个过程并不完全熟悉。

The app begins to open, then immediately closes.该应用程序开始打开,然后立即关闭。 I think it is because of the Provisioning profiles expiring.我认为这是因为配置文件即将到期。 In XCode the project was set to Automatic Signing.在 XCode 中,项目设置为自动签名。 When I connected an iPad to the Mac and opened the console I found the message "A valid provisioning profile for this executable was not found".当我将 iPad 连接到 Mac 并打开控制台时,我发现消息“找不到此可执行文件的有效配置文件”。 Since then, I've generated new certificates and created both Developer and Distribution Profiles.从那时起,我生成了新证书并创建了开发人员和分发配置文件。

I am able to build new versions successfully from XCode, but the apps that previously exist continue to not function.我能够从 XCode 成功构建新版本,但以前存在的应用程序仍然不是 function。 Is it even possible to fix this issue?甚至有可能解决这个问题吗? I've searched for solutions but this isn't clear我已经搜索了解决方案,但这并不清楚

I am able to build new versions successfully from XCode, but the apps that previously exist continue to not function.我能够从 XCode 成功构建新版本,但以前存在的应用程序仍然不是 function。 Is it even possible to fix this issue?甚至有可能解决这个问题吗?

As Rudedog suggested in a comment, you'll need to distribute the app signed with your new, valid certificate.正如 Rudedog 在评论中建议的那样,您需要分发使用新的有效证书签名的应用程序。

Thanks for the reply, if I distribute a new copy of the app, any data stored within the current one will be lost.感谢您的回复,如果我分发应用程序的新副本,则存储在当前应用程序中的任何数据都将丢失。 Is there definitely no way?绝对没有办法吗?

As long as the bundle identifier hasn't changed and the old app isn't first deleted, updating to a new version of your app shouldn't remove existing application data on the device.只要捆绑标识符未更改并且未首先删除旧应用程序,更新到应用程序的新版本不应删除设备上现有的应用程序数据。 Don't just take my word for it -- it's been a while since I used ad hoc distribution, so test to confirm that it works.不要只相信我的话——我已经有一段时间没有使用 ad hoc 分发了,所以测试一下以确认它是否有效。 But in general it's true: if you update an app from the App Store, you certainly don't lose the data on your device.但总的来说,这是真的:如果您从 App Store 更新应用程序,您肯定不会丢失设备上的数据。 And during development, each new build of your app installed on a device or simulator doesn't remove data written by previously-installed builds.在开发过程中,安装在设备或模拟器上的应用程序的每个新版本都不会删除以前安装的版本写入的数据。

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

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