【被坑过得重要经验】那些年我们被xcode坑过得。。。

1、切换运行环境, 编译中间文件不会自动重新编译

这个是真机环境,我编译跑得挺好;

好,接下来我切换到模拟器:然后编译

出现以下一大堆错误

如图:

神奇了,里面竟然没有这个架构,我郁闷了,怎么会,是不是编译设置没有搞好;事实把我打败了。于是我摸索编译选项


没有问题啊,我专门认真研究了每一个选项,仍然一无所获


神奇,今天我再次查这个问题的问题的时候我突然意识到是不是clean下就好了,没想到啊没想到


果然是这个问题,和当年修改了头文件,不会重新编exe的坑是一样的


第二个问题:

The executable gets signed with invalid entitlements in Xcode



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?

enter image description here

share improve this question
 

19 Answers

What worked for me was restarting Xcode.

share improve this answer
 
up vote 15 down vote accepted

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.

share improve this answer
 
5  
I toggled the Inter-App Audio capability to ON and then to OFF again, and this way the app worked... WT*? –  Ferran Maylinch  Oct 7 '14 at 19:51
1  
Ferran answer works for me. WT* –  doxsi  Dec 1 '14 at 8:28
 
Wow, unbelievable. Still a applicable fix, though for me it was the App Groups capability. –  Keller  May 4 at 14:57

I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)

share improve this answer
 
3  
THANK YOU! You have no idea how frustrated I was this whole morning until I stumbled on your answer. Definitely fixed it for me. –  Gasper Kolenc  Jul 8 '14 at 14:43

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.

share improve this answer
 
1  
Thanks for your help. 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. –  Emmy  Oct 26 '13 at 0:43
 
Unfortunately it didn't work for me :/ –  Or Shanoon  Oct 7 '14 at 6:52

I had to match the app's capabilities in Xcode5 under

Capabilities -> 
In-App purchase -> ON
Game Center -> ON

with that in the provisoning profile.

share improve this answer
 
 
Also it solved "Invalid token" error response of APNs. –  hiroshi  Oct 10 '14 at 2:32
 
adding game center entitlement and removing it back , worked for me as well. No idea why. –  sleepwalkerfx Oct 28 '14 at 7:37
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值