新iPhone,怎么添加作为开发设备

新买的iPhone5,XCode识别,但是写好的代码在iPhone上运行时,报错:

A valid provisioning profile for this executable was not found.

然后我到系统中点击Add to Portal。又报出这样的错误:

A device with number '...' already exists on this team.

真机调试需要设置provision. 你可以创建一个developer的provision 这样的话应该就可以调试了。如果发测试版本可建一个adhoc 的,如发到testflight上。