那些年我们被xcode坑过得。。。
2015-10-29 13:27
381 查看
1、切换运行环境, 编译中间文件不会自动重新编译
这个是真机环境,我编译跑得挺好;
好,接下来我切换到模拟器:
然后编译
出现以下一大堆错误
如图:
神奇了,里面竟然没有这个架构,我郁闷了,怎么会,是不是编译设置没有搞好;事实把我打败了。于是我摸索编译选项
没有问题啊,我专门认真研究了每一个选项,仍然一无所获
神奇,今天我再次查这个问题的问题的时候我突然意识到是不是clean下就好了,没想到啊没想到
果然是这个问题,和当年修改了头文件,不会重新编exe的坑是一样的
第二个问题:
activeoldestvotes
activeoldestvotes
这个是真机环境,我编译跑得挺好;
好,接下来我切换到模拟器:
然后编译
出现以下一大堆错误
如图:
神奇了,里面竟然没有这个架构,我郁闷了,怎么会,是不是编译设置没有搞好;事实把我打败了。于是我摸索编译选项
没有问题啊,我专门认真研究了每一个选项,仍然一无所获
神奇,今天我再次查这个问题的问题的时候我突然意识到是不是clean下就好了,没想到啊没想到
果然是这个问题,和当年修改了头文件,不会重新编exe的坑是一样的
第二个问题:
The
executable gets signed with invalid entitlements in Xcode
32down votefavorite 5 | I got this error with Xcode 5 when I try to run the app on my device. The executable was signed with invalid entitlement It worked fine with Xcode 4.x. Anyone knows how to get rid of the error? ios xcode code-signing provisioning-profile
| |||
add a comment |
19 Answers
activeoldestvotesup vote31down vote | What worked for me was restarting Xcode.
| |||
add a comment |
up vote15down voteaccepted | I found out the problem. The app I created on developer.apple.com does not include inter-app-audio. The project entitlements plist file on Xcode has inter-app-audio set to YES (by default). Once I changed the setting on my app configuration on developer.apple.com to enable the inter-app-audio. Then my app runs on my devices. I guess that is apple's new rule to make your app settings consistent on both developer.apple.com and your xcode project setting.
| ||||||||||||
a comment |
up vote12down vote | I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)
| ||||
a comment |
up vote7down vote | I think your problem lies because of the profile that you were using xCode4.6 and now you are using xCode5. You need to refresh certs/prov profiles via XCode > Preferences > Accounts XCode > Preferences > Accounts > Click on your DEV ACCOUNT > View Details button (bottom right) > Signing Iden/PPs screen appears > hit Refresh. Then choose again from build settings the correct profile and clean and build your project. Hope this helps you.
| ||||||||
a comment |
up vote6down vote | I had to match the app's capabilities in Xcode5 underCapabilities -> In-App purchase -> ON Game Center -> ON with that in the provisoning profile.
| ||||||||
a comment |
up vote2down vote | I had the same problem in XCode 5. This helped me anyway.XCode > Preferences > Location tab > DerivedData Press a little left arrow to open DerivedData in Finder. Move to trash folder of your project and rebuild.
| ||||
a comment |
up vote2down vote | If restarting xcode doesn't work make a new provision profile and be sure to include your test devices.
| ||||
a comment |
up vote2down vote | xcode 6.1 (HealthKit sample) I was getting this error due to HealthKit integration: I had enabled In-App Purchase, Game Center and Healkit solved my issue.. The same I have enabled in Provision profile.
| ||||
a comment |
up vote2down vote | (Xcode 6.1) The problem for me was in my Build Settings; I had my Provisioning Profile set to an App Store Production Profile when trying to deploy to a device. I switched it to 'Automatic' and it resolved my issue. You could also set it to your Dev Provision Profile. I also have 2 Certificates, so I added my second Certificate to my dev provision. Others probably won't have this problem.
| ||||||||
a comment |
up vote2down vote | The solution for latest Xcode 6.3.2: First you have to check what is enabled in your Member center for your specific AppID: Then in your appropriate target in Xcode you have to enabled the same capabilities: In this case: App Group, Game Center, In-App Purchase. All of them have to be enabled in your target in Xcode. However it doesn't matter for DEBUG mode: it very matters for your RELEASE mode: Note that Game Centerand In-App Purchaseare enabled by default in Member Center but are disabled in Xcode's target.
| |||
add a comment |
up vote2down vote | In my case, the device wasn't added. So I had to add the device and generate a new provisioning profile.
| ||
add a comment |
up vote1down vote | I solve this by deleting all "PROVISIONING_PROFILE=..."and "PROVISIONING_PROFILE[sdk=iphoneos*]" = ...in project.pbxproj and restart Xcode and set provisioning profiles for the target again.
| ||
add a comment |
up vote1down vote | Had some issue. Resolve: go to right target -> capabilities -> for me there was issue with "In-App Purchase" and button to fix it. Off-on operation fixed issue.
| ||
add a comment |
up vote1down vote | In my case: I need enable Inter-App Audio inCapabilities -> Inter-App Audio I think because I use Parse.com Notification, it need link to AudioToolbox.framework
| ||
add a comment |
up vote1down vote | Enabling Capabilities -> Inter-App Audio fixed this issue for me as well. I am also trying to send push notifications through parse
| ||
add a comment |
up vote1down vote | Simple clean-and-build seemed to fix it for me.
| ||
add a comment |
up vote1down vote | The answers here seem a bit inadequate so I'm adding my two cents: The real solution is that there is generally a mismatch between what is stored in your provisioning profile (check at developer.apple.com -> members -> certificates -> the cert you're using [be sure to check if dev/production) and what is enabled in your app (double click project name), under horizontal menu select'Capabilities' (next to 'General'). If you've recently changed one of these, be sure to refresh your certificates under XCode -> Preferences -> Accounts -> Details -> Refresh Icon and restart XCode.
| ||
add a comment |
up vote1down vote | In my case APNS certificate is expired, remove the expired certificate and regenerate the provisioning profile fixes the issue.
| ||
add a comment |
up vote0down vote | It seems to be a little bug inside Xcode. Try to archive it anyway, even there is a problem with entitlements. If your entitlements are fine, it will be uploaded without any problem. Apple accept it, and your app will be published to the AppStore. I did it, and it worked:) |
32down votefavorite 5 | I got this error with Xcode 5 when I try to run the app on my device. The executable was signed with invalid entitlement It worked fine with Xcode 4.x. Anyone knows how to get rid of the error? ios xcode code-signing provisioning-profile
| |||
add a comment |
19 Answers
activeoldestvotesup vote31down vote | What worked for me was restarting Xcode.
| |||
add a comment |
up vote15down voteaccepted | I found out the problem. The app I created on developer.apple.com does not include inter-app-audio. The project entitlements plist file on Xcode has inter-app-audio set to YES (by default). Once I changed the setting on my app configuration on developer.apple.com to enable the inter-app-audio. Then my app runs on my devices. I guess that is apple's new rule to make your app settings consistent on both developer.apple.com and your xcode project setting.
| ||||||||||||
a comment |
up vote12down vote | I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)
| ||||
a comment |
up vote7down vote | I think your problem lies because of the profile that you were using xCode4.6 and now you are using xCode5. You need to refresh certs/prov profiles via XCode > Preferences > Accounts XCode > Preferences > Accounts > Click on your DEV ACCOUNT > View Details button (bottom right) > Signing Iden/PPs screen appears > hit Refresh. Then choose again from build settings the correct profile and clean and build your project. Hope this helps you.
| ||||||||
a comment |
up vote6down vote | I had to match the app's capabilities in Xcode5 underCapabilities -> In-App purchase -> ON Game Center -> ON with that in the provisoning profile.
| ||||||||
a comment |
up vote2down vote | I had the same problem in XCode 5. This helped me anyway.XCode > Preferences > Location tab > DerivedData Press a little left arrow to open DerivedData in Finder. Move to trash folder of your project and rebuild.
| ||||
a comment |
up vote2down vote | If restarting xcode doesn't work make a new provision profile and be sure to include your test devices.
| ||||
a comment |
up vote2down vote | xcode 6.1 (HealthKit sample) I was getting this error due to HealthKit integration: I had enabled In-App Purchase, Game Center and Healkit solved my issue.. The same I have enabled in Provision profile.
| ||||
a comment |
up vote2down vote | (Xcode 6.1) The problem for me was in my Build Settings; I had my Provisioning Profile set to an App Store Production Profile when trying to deploy to a device. I switched it to 'Automatic' and it resolved my issue. You could also set it to your Dev Provision Profile. I also have 2 Certificates, so I added my second Certificate to my dev provision. Others probably won't have this problem.
| ||||||||
a comment |
up vote2down vote | The solution for latest Xcode 6.3.2: First you have to check what is enabled in your Member center for your specific AppID: Then in your appropriate target in Xcode you have to enabled the same capabilities: In this case: App Group, Game Center, In-App Purchase. All of them have to be enabled in your target in Xcode. However it doesn't matter for DEBUG mode: it very matters for your RELEASE mode: Note that Game Centerand In-App Purchaseare enabled by default in Member Center but are disabled in Xcode's target.
| |||
add a comment |
up vote2down vote | In my case, the device wasn't added. So I had to add the device and generate a new provisioning profile.
| ||
add a comment |
up vote1down vote | I solve this by deleting all "PROVISIONING_PROFILE=..."and "PROVISIONING_PROFILE[sdk=iphoneos*]" = ...in project.pbxproj and restart Xcode and set provisioning profiles for the target again.
| ||
add a comment |
up vote1down vote | Had some issue. Resolve: go to right target -> capabilities -> for me there was issue with "In-App Purchase" and button to fix it. Off-on operation fixed issue.
| ||
add a comment |
up vote1down vote | In my case: I need enable Inter-App Audio inCapabilities -> Inter-App Audio I think because I use Parse.com Notification, it need link to AudioToolbox.framework
| ||
add a comment |
up vote1down vote | Enabling Capabilities -> Inter-App Audio fixed this issue for me as well. I am also trying to send push notifications through parse
| ||
add a comment |
up vote1down vote | Simple clean-and-build seemed to fix it for me.
| ||
add a comment |
up vote1down vote | The answers here seem a bit inadequate so I'm adding my two cents: The real solution is that there is generally a mismatch between what is stored in your provisioning profile (check at developer.apple.com -> members -> certificates -> the cert you're using [be sure to check if dev/production) and what is enabled in your app (double click project name), under horizontal menu select'Capabilities' (next to 'General'). If you've recently changed one of these, be sure to refresh your certificates under XCode -> Preferences -> Accounts -> Details -> Refresh Icon and restart XCode.
| ||
add a comment |
up vote1down vote | In my case APNS certificate is expired, remove the expired certificate and regenerate the provisioning profile fixes the issue.
| ||
add a comment |
up vote0down vote | It seems to be a little bug inside Xcode. Try to archive it anyway, even there is a problem with entitlements. If your entitlements are fine, it will be uploaded without any problem. Apple accept it, and your app will be published to the AppStore. I did it, and it worked:) |
相关文章推荐
- equals
- iOS 自定义emoji表情键盘
- iOS 控制器View的生命周期及相关函数
- [BZOJ1654] [Usaco2006 Jan]The Cow Prom 奶牛舞会
- JMETER一个简单的性能测试【转】
- BaseExpandableListAdapter分类绑定的实现
- 获取整个网页的html源码
- 过滤项目中的Jar包的显示
- IO(三)字符流
- 常用的热门iOS第三方库
- 类的运用,求矩形面积
- 新的开始--1
- 主板模式的两项接口
- 主板模式的两项接口
- 主板模式的两项<通用性>接口
- 高斯函数以及在图像处理中的应用总结
- 控制器的生命周期
- Java的引用类型
- 彻底解决mysql中文乱码的办法,修改mysql解压缩版(免安装版或zip版)字符编码
- [转]JQuery.Ajax之错误调试帮助信息