A valid provisioning profile for this executable was not found.
在某些设备上运行会出现这种错误,查了很多都没有找到合适的解决方法。
最后终于在官网上看到了。
http://developer.apple.com/library/ios/#technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933
很多人说把code sign攺成iphone developer就可以了。但是实际中我们可能需要的是产品证书。
所以解决方法:
项目---target-----buildsettings---找到code signing identity。把debug的证书攺成iPhone developer。 而release的攺成产品证书。运行一下,竟然可以了