Xcode cannot run using the selected device

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 18:19:58
  • Clean up your project using Clean, Clean folders, Delete derived data.
  • Delete all schemes from 'manage schemes'. Recreate them, and build using any of them that contains a version of iPhone simulator (the one that worked earlier).

If that doesn't work, try this:

  • Clean up your project using Clean, Clean folders, Delete derived data.
  • Using your favourite editor, try clearing all the profile strings from your project.pbxproj file (the one that you see when you open your xcode project using 'Show Package Contents' command).

See below image - you must delete all lines containing 'Provisioning Profile' till the ; character.

  • Then restart xcode. Select the profile using automatic profile selector and build using an iphone simulator scheme.

Target -> Build Settings -> Build Options set the "Compiler for C/C++/Objective-C" - "Default compiler (Apple LLVM 5.0)" and the issue will be solved

Check that the Executable File (also known as CFBundleExecutable) in the Info.plist file is set to ${EXECUTABLE_NAME} as opposed to any hardcoded value. This will ensure that even if you change your project name or target name or scheme name, that it still works.

Please Check the following: -Connect your device with another cable. -Check if the cable is properly connected. This was my problem Thanks

I had this error when trying to run a DEBUG build. I changed "Build Active Architecture" to YES for DEBUG and this error finally went away after hours of frustration. I tried about 10 different things that I read on this site and nothing else worked.

I found the error was because of unsupported compiler in building settings. Check Project Building Settings --> Build Options --> Compiler for C/C++/Objective-C. Change to "Default compiler (Apple LLVM 5.0)". Everything is OK.

I had this error when trying to test my app. Here's what worked for me:

In Targets > Build Settings, I changed the Product Name to match the Target name and this fixed it for me.

Guya Marcel

I had the same problem, and fixed it by opening the info.plist file in Resources and unchecked the target membership so that nothing is checked as target membership.

I solved by rebooting mac (also have rebooted iPad)

In XCode 6 I opened the Devices window (Window/Devices) and noticed my iPhone was not listed there, even though it was plugged in to the mac at that time. I unplugged it and then plugged it right back in while the Devices window was open, and it appeared in the device list and also in the scheme picker.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!