Xcode 5 cannot run using selected device on iOS simulator -


so seems quite common question answers found related getting "xcode cannot run using selected device" when trying run on connected device. issue getting error trying run in ios simulator.

some background app running in simulator fine, , changed project name, target name , scheme name , when problems started occur.

i tried many of different solutions in of other threads such as: clean, delete derived data, restart xcode, restart computer, make sure using default llvm, remove info.plist re-add project again. none of them worked.

i discovered problem , able working , post solution below.

what discovered problem, in info.plist file executable file (cfbundleexecutable) hard coded "myappname". when changed project name , target name , scheme name, hardcoded value not changed, still had original app name in it.

so changed executable file (cfbundleexecutable) in info.plist file constant:

    ${executable_name} 

and problem solved :)

edit:

i had problem occur again on different project, above set ${executable_name}.

so went searching , found under build settings > build options > compiler c/c++/objective-c set unsupported.

i changed setting default , problem solved :)

edit:

i had problem occur again , above 2 things did not fix it.

so went , made sure info.plist removed (unticked) target membership, , solved problem. seems there multiple things cause issue, try solutions!


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -