I cannot build my project for the device although XCode
can build without any issue given the same settings.
Here is the build command:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /path/to/workspace/myProject.xcworkspace -scheme myScheme -configuration Debug -destination id=myDeviceIdentifier build
Here is the error i get:
xcodebuild: error: The run destination [device name] is not valid for Running the scheme 'myScheme'.
[device name] doesn't match any of myProject.app's targeted device families. You can expand myProject.app's targeted device families to support [device name].
I did check the targeted device family for the project and all of the subprojects, and it is fine.
The problem appears less often after removing a significant count of file references from the project.
Did some of you encounter the same issue and do you know how to fix it?