Since xocde upgraded to 4.5 and changed to a new Mac, xcode has been unable to run on a real machine. After searching online for 2 days, it has finally been completely solved.
Use two iphone4 tests, one is ios5 and the other is ios6. At the beginning, neither of the two machines can run xcode. The error always prompted is: "choose
Destination with a supported architecture in order to run on this
Device. "I went online to search for such a non-marginal error and found that most people are talking about the product in build setting.
The name is not set correctly, but my name is set correctly. Finally, I accidentally saw an old man and found that my mistake was here: the ios5 device does not support armv7s, therefore, you must set ubuntures to armv6, but at last he said that you only need to change the valid.
Just do not change ubuntures. Otherwise, it will easily cause the real machine to not run. This is my error. I changed ubuntures to armv6. Remember to keep the original status of ubuntures: $ (archs_standard_32_bit ). So far, my ios5 can be run, but when I unplug ios5 and run ios6, a more depressing problem occurs :"
Cocould not launch XXX. app No
Such file or directory
(/Users/mylaptop/library/developer/xcode/deriveddata/MyApp- Bldddwgazooytmdzypejnvzv Etyy A/build/products/debug-iphoneos/myapps. APP/MyApp ). "The key is, I went to search for this file. This file exists. Some people have suggested a solution on the Internet, but it still doesn't work for me. I will share it with you, it may be useful for some people:
-
- Disconnect your device
-
- Delete the app from your device
- Quit xcode (don't just simply close the window, quit it)
-
- Delete derived data folder
Rm
-Fr
~ /Library/developer/xcode/deriveddata (Console)
-
- Start xcode, connect Device & run the project
(From: http://stackoverflow.com/questions/9987192/xcode-will-run-app-on-simulator-but-not-on-device) but this method does not work after my experiment, I finally found a solution here, it
Worked for me:
Try deleting "required device capabilities" in the-info. plist
File.
You can't require armv7 on a 3G, and you can't require armv6 on any
Newer device, so just delete this attribute entirely.
(Taken from: http://stackoverflow.com/questions/11456312/xcode-suddenly-stopped-running-project-on-hardware-could-not-launch-xxx-app)
After two days of hard work, I solved the real machine problem.CodeI hate ios6, but I love xcode4.5.