xcode 从头开始重写 iOS 应用程序“无法更改应用程序的可执行权限。”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11614285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:59:53  来源:igfitidea点击:

Rewrite iOS app from scratch "Could not change executable permissions on the application."

iosxcode

提问by Eric

I have an app on the store for which I want to start rewriting the entire application "from scratch". When I try to build and execute the new app on my device (iPhone 4) which already contains the old app I get the error: "Could not change executable permissions on the application."

我在商店中有一个应用程序,我想开始“从头开始”重写整个应用程序。当我尝试在已包含旧应用程序的设备 (iPhone 4) 上构建和执行新应用程序时,出现错误:“无法更改应用程序的可执行权限。”

The new executable works ok if I run it on the simulator or delete the current application on the device and install fresh. My concern is people upgrading to this latest version of the app won't be able to.

如果我在模拟器上运行它或删除设备上的当前应用程序并重新安装,新的可执行文件就可以正常工作。我担心的是,人们无法升级到此最新版本的应用程序。

How do you handle this scenario?

你如何处理这种情况?

回答by brynbodayle

I believe the issue has to do with the App's provisioning.

我相信这个问题与应用程序的配置有关。

The version of the app on your device, downloaded from the App Store, has been signed with a Distribution profile. When you build from Xcode and try to install over it you are using a Development profile and trying to attach the debugger.

您设备上从 App Store 下载的应用程序版本已使用分发配置文件进行签名。当您从 Xcode 构建并尝试安装时,您正在使用开发配置文件并尝试附加调试器。

Based on my experience you can not overwrite an App Store app signed with a Distribution profile if you build from Xcode using a Development profile and try to install over the App Store app.

根据我的经验,如果您使用开发配置文件从 Xcode 构建并尝试通过 App Store 应用程序安装,则无法覆盖使用分发配置文件签名的 App Store 应用程序。

Try building from Xcode using a Distribution provisioning profile and without attaching the debugger.

尝试使用分发配置文件从 Xcode 构建,而不附加调试器。

Also, people will never experience this kind of error when upgrading their app in the App Store because both provisioning profiles are required to be a Distribution profile.

此外,人们在 App Store 中升级他们的应用程序时永远不会遇到这种错误,因为两个供应配置文件都需要是分发配置文件。

回答by Jake

I just ran into this issue also. What I did wrong was name the Xcode PROJECT file a different name than the old one. Naming it identically to the old project fixed the error and everything worked fine. I also kept bundleID and display name the same. The key to fixing the error for me was the .xcodeproj name.

我也刚遇到这个问题。我做错的是将 Xcode PROJECT 文件命名为与旧文件不同的名称。将其命名为与旧项目相同的名称修复了错误,并且一切正常。我还保持 bundleID 和显示名称相同。为我修复错误的关键是 .xcodeproj 名称。

回答by DonDyck

For simulating upgrade through App store, do the following exercise

通过App store模拟升级,做如下练习

  1. Prepare a code signed binary (.ipa) of the new code with the same credentials as the old one (same bundle ID, dev profile, version # can be different)

  2. Now load the binary through iTunes syncing in your device. It would upgrade on top of the existing application.

  3. If everything goes okay then your app should be good.

  1. 使用与旧代码相同的凭据准备新代码的代码签名二进制文件 (.ipa)(相同的包 ID、开发配置文件、版本号可以不同)

  2. 现在通过设备中的 iTunes 同步加载二进制文件。它将在现有应用程序之上进行升级。

  3. 如果一切顺利,那么您的应用程序应该是好的。

回答by Suhaiyl

Check for the bundle identifier, both old and new app should have the same identifier.

检查捆绑标识符,新旧应用程序应具有相同的标识符。

回答by Rajneesh071

Clean project, and remove previous build from device

清理项目,并从设备中删除以前的构建

回答by Mohammed Elrashidy

watch this video, you must uninstall the app from your test device first
http://www.youtube.com/watch?v=Q-zrXdSEvJc

观看此视频,您必须先从测试设备上卸载该应用
http://www.youtube.com/watch?v=Q-zrXdSEvJc