Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode:4.6 Lion:10.8 IOS 6.1 error: SBTarget is invalid

XCode:4.6 Lion:10.8 IOS 6.1 error: SBTarget is invalid , how to solve this?

like image 255
alexqinbj Avatar asked Jan 29 '13 09:01

alexqinbj


3 Answers

After hundreds of times testing, I find a way that can help the programme run, here is it:

  • When you first meet SBTarget is invalid, choose Product --> Clean
  • Run again, this time you may also get error: SBTarget is invalid, it doesn't matter.
  • Turn off the XCode totally, 'totally' means that the Xcode icon should not appear in the Dock.
  • Double click your project file(xxx.xcodeproj , the blue one) to start Xcode, run again. (Do not Clean this time), and it runs ok.

Let me know if this can help you or you have any other methods. Thx

like image 57
alexqinbj Avatar answered Nov 06 '22 00:11

alexqinbj


I had this issue while incorporating the Facebook SDK into my app. The error would alternate between SBTarget is invalid and telling me that my architecture was incompatible with my device so it would not launch. If I followed alexqinbj's advice it would run the app once but then it would go right back to having the same error again. I tried messing with architectures and build settings and removing derived data but in the end it really was just a duplicate file in my file structure. Facebook told me to add their SDK and then to add a folder (that the SDK file already contains). Once I saw that it was just a matter of removing the duplicate file. I've heard of this error happening with duplicate plists as well. Good luck

like image 5
Chris Klingler Avatar answered Nov 06 '22 01:11

Chris Klingler


Indeed, the root cause (in Facebook integration) is the duplicate resources in the Facebook SDK (as per their instructions). When I deleted the resource files (remove references only), this problem went away permanently. Not sure why Facebook instructions ask you to drag the resources bundle over to the Facebook SDK framework you just brought in...

like image 3
julius patta Avatar answered Nov 05 '22 23:11

julius patta