I have the iOS 9.3 beta installed on a testing device as I'm running a few 9.3-compiled apps, but I also have an old app that is compiled in Xcode 7.2. I can run the app on any iOS 9.2 device with ease, but if I try to run it on the one iOS 9.3 beta device, I get the "could not find Developer Disk Image" error.
Xcode 7.3 includes some updates to Swift, so I'd have to change a great deal of my files, and I just want to test to see if it's working fine. Is there any way to do this without having to change a lot of Swift code? It's on the App Store compiled for 9.2 and I can run it on my 9.3 device, so I don't understand why it's so difficult.
If you want to avoid the beta version of Xcode from potentially altering your original project, just make a copy of the project and then just open it up in the beta version. If you have an app running in Swift 2.1.1 (Xcode 7.2), the differences to Swift 2.2 (Xcode 7.3) are pretty modest. And if you do this with a copy, you can be confident that your original project won't be altered.
If you don't want to do that for some reason you can install apps from a production version of Xcode on a device running a beta version of iOS:
First, you want to make sure you have the profiles installed on your beta iOS device. The easiest way to do this is to run some "Hello World" app on your beta device from the beta Xcode. If prompted to add a team/profile onto your device, you should go ahead and do so, like usual.
Quit the beta Xcode and start the production Xcode and open the project for the app you want to install. Select "Generic iOS Device" where you choose the active scheme in jump bar and then build the app. You should then see the .app file (not in red) in the Products folder in the "Project Navigator" tree in the left panel.
Install the app on the device by opening the devices window (shift+command+2) and selecting the device in question. In the right panel (or top right panel if you're showing the console, too), you'll find a "Installed Apps" section. Just drag the .app file from the Products folder into this installed apps section.
Clearly, if you have other apps you want to install, you can just repeat steps 2 and 3 as appropriate.
There are a bunch of different ways to install an app on a device, but I find this is the easiest for one-off installs with a device sitting in front of me. You won't be able to debug if you do it this way, but you can at least fire it up, run it through its paces, watch the device console for any debugging messages you may be NSLog'ing, etc.
How do you correctly use Application Data bundles in Xcode 6? I exported a .xcappdata file from a device, added it to my workspace, and selected it in the Run Options of a scheme.
Whenever I try to run the simulator with iOS 8.0, I get the following error, even on repeated launches, manual launches, etc:
Application data package not copied to the Simulator
It appears you are running 'REDACTED.app' on the iPad Air Simulator for
the first time, and therefore do not yet have a data folder created.
The application data package will be installed the next time you run
your app in the Simulator.
Trying to use the simulator with iOS 7.1 crashes Xcode.
Does this feature just not work anymore with the changes made to the filesystem?
Tried again on Xcode Version 6.1.1 (6A2008a) and it (sometimes) crashes Xcode now, hopefully that means it will be get fixed soon...
I'm using Xcode 8.1 and when I tried to add the .xcappdata file Xcode crashed.
I solved it by cleaning the app and then I tried to add it in another target and it worked. Afterwards I tried to put it again in the target I wanted it in and it worked as well.
Unfortunately I'm not sure about which of these steps fixed it but I hope it to be useful to someone!
You can try to clean the Derived Data which contains all the intermediate build information like debug- and release-built targets. And you probably can select the Simulator, choose the iOS Simulator from the menu. Then, choose Reset Content and Setting.
Sometimes, it's just some bugs in the XCode. And I think Apple is handling that when your issue is marked by duplicate by them.
When trying to run any project in an Xcode Developer Preview (Xcode 5 DP6 in my case), the app is not started and the following error message appears:
Could not launch "" - No such file or directory (/private/var/mobile/Applications/741F0826-E354-4E13-9CC3-0FB3A66E8798/.app)
The solution was very simple in my case, in Terminal just execute
sudo xcode-select -switch /Applications/Xcode5-DP6.app/Contents/Developer/
with the path for the currently used Xcode Developer Preview.
Do not forget to switch back when developing on the previous stable Xcode version again - especially when archiving for AppStore submit.
I faced the same problem, I did following things to sort out my problem:-
1) Changed "don't sign" and "iPhone distribution" to my valid developer provisioning profile in Xcode's build setting.
2) Quit Xcode.
3) Uninstalled App from device.
4) Unplugged device.
5) Plugged in device.
6) Ran Xcode
7) Built and Ran App.
Thats it :)
This has a very simple solution (works on every Xcode so it's not NDA thing):
Kill all Xcode running
Delete the app from device (if there is any), Restart your device and disconnect it (if was connected).
Open organiser in Xcode and check that device is connected and used for development, if not select "use for development"). Device should be on and connected.
Check the signatures are good.
Build& run.
This should work. Let me know if it doesn't.
I worked on this issue for about an hour, trying everything on every post I could find on SO, but nothing worked. I then compared my project settings to another project that did run on iOS and found the issue was MACOSX_DEPLOYMENT_TARGET was set to 10.7 on the iOS build. I share the same project for my iOS and OSX targets for each app I make, so it's easy to see how this happened. I deleted the setting at the project level, added it to the target level for each OSX target, stripped and built the iOS target and it finally ran! Not to say the other solutions are wrong here, there just could be multiple causes.
When you create a fresh Cordova project it's called HelloCordova, which is also the app icon name. If I rename the project in XCode it will no longer run in the iPad simulator.
I am running Cordova 3 and Xcode 4.6.3 on OS X 10.8.4
Steps to reproduce
In terminal:
cordova create Survey com.domain.mysurveyap
cd Survey
cordova platform add ios
cordova build
This creates the XCode project in platforms/ios/. I then open it in XCode. The project is called HelloCordova. I hit run with the target set to iPad 6.0 Simulator.
Running HelloCordova on iPad 6.0 Simulator. No issues
Good. I get the Hello World app up.
Next I rename the project by changing the Project Name in the Identity panel. I'm doing this
a) because I don't want my project to be called 'HelloCordova'.
b) because the name here seems to dictate what the App Icon is labelled as on the device.
I rename it to 'Survey':
Xcode prompts me to rename related project content items for me. I click 'Rename'
After renaming, I go to run in the simulator again. Now it won't run. I see a 'Build succeeded' overlay for a moment. But in the status panel at the top it says:
Finished running Survey.app on iPad 6.0 Simulator. No issues.
I notice that it still shows 'HelloCordova' in the scheme selector. I have tried running 'Clean' and also restarting XCode.
This is a completely fresh PhoneGap project with no modifications. Any ideas where I'm going wrong?
I don't know why the renaming was failing, and I can't explain that "Finished running... No issues" problem. But: cordova create takes an extra argument that was missing.
This solves the problem:
cordova create Survey com.domain.mysurveyap "Survey"
The final "Survey" there sets the project name on creation, thus avoiding the need to rename the project in the first place.
I've been running my app on an iPhone 5 /iOS 6, but when I try to run it on an iPhone 4S / iOS6 I get "The run destination iOS Device is not valid for running the scheme NN. The Scheme contains no buildables that can be built for the architectures supported by the run designation device".
I've looked at previous postings on this but they involve issues with the Deployment Target.
In my case I've got the Base SDK set to 6.1 and the Deployment Target set to 5.0.
The iPhone 4 has got iOS version 6.0.1.
It was a bug in XCode, I closed and reopened Xcode and it started working.
I've noticed this sort of thing many many times now with Xcode with other problems, its very frustrating that the tool is so dodgy.
I had the same problem. The issue that i found is that , by mistake I had chosen iPad as deployment target due to which XCode showed that iPhone 5 is an invalid device. .
Hope it helps. Then I just changed the target to iPhone and it worked.
The run destination iPhone is not valid for Running the scheme.
Quit Xcode
Open Xcode
Clean project
Run project
It will work
This is some sort of memory issue sometimes.Close some application and try again.
Close Xcode too and reopen. Worked for me.
Cheers.
Quit and Reset Xcode can reslove most problem. The other cause is Device not support iPhone, you can
Target -> select scheme -> General -> Deployment Info -> Device-> select Universal or the current device you want.
In my case the problem was missing executable value selected into Scheme -> Profile -> Executable (e selected from the dropdown build configuration debug and executable the "application".app).
A simple solution.
1) Force quit X-Code
2) Force quit itunes
3) Reconnect iPhone
4) Open X-Code
Go to project info set development Target as 4.3 or 5.1.1 and same in target also.
I had this problem in XCode 9.0.1.
It seems that XCode does not refresh the list of connected devices.
You may notice that after disconnecting your device, you can still choose it as a target. So XCode may actually be trying to connect to a bogus device.
To fix this:
Edit the scheme.
Re-select the scheme's executable.
this seems to force XCode to update the list of connected devices.
If that did not work, try reconnecting your device (cable) before you do this.
Or perhaps, some other combination of disconnecting device, connecting device, and re-selecting the scheme's executable.
As a desperate measure, you may also try to change the cable that connects your mobile device to your pc.
But ideally... Xcode should be fixed.
Just Go to Devices -> The Intended device you wanted to run (I Was iPhone6 Simulator)-> Select the Device (I was selected iPhone6) -> Right Click-> Make sure the ‘Show the Run Destination Menu’ enabled.
For Me, it was enabled. I did, it worked.
I faced this issue in XCode 9, but later realised that for some reasons I had unchecked run destination in "Devices & Simulators" window
In my case, none of the answers given worked for me.
I was trying to setup TravisCI to my project and this is what i did:
Select Target > Edit Scheme > Build
Check the "run" option in the Tests target and the issue disappeared, i hope this help someone, i spent 2 days trying to fix this.
Other solutions might work for other scenarios but, in case using Xcode 11, I went into "Build Settings" of my test target and changed to universal under "Deployment"->"Targeted Device Family"
Select your project, Under Targets, select your main target, then on the Build Settings Tab, there is one field that says "Valid Architectures". Make sure "armv7" is also there. You probably only have armv7s right now.
I am using XCode 8.2.1 having same problem.
Solution:
->Go to Devices
-> Add additional simulators
->Right Click simulator u are using
->Show in Run Destination Menu <-Enable this Option
For me Xcode failed to copy symbols for connected device due to low disk space. First check if you have symbols connected device under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/.
Since I had iOS 8.3 (12F70) installed on my device the path for me was /Users/$USERNAME/Library/Developer/Xcode/iOS DeviceSupport/8.3 (12F70)/Symbols The size of this directory should be around 2.5GB.
When I got this issue the size was 484 KB.
To fix it I
Free up about 3GB of disk space. You can delete folders for any unsupported devices that you might have under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/
Disconnected device from Xcode and closed Xcode.
Removed the folder in above path (everything under 8.3(12F70).
Start Xcode and connected the device.
Xcode should start Copying symbols once done the size of the folder should be around 2.5GB
This happened to me because I switched branches in source control with unshared schemes.
My xcuserdata folder was git-ignored, and it contained a scheme I forgot to share. This meant I was trying to use a scheme that was from a completely different code branch.
I remade the scheme which fixed the problem, and marked it as shared so that it would be in the xcshareddata folder and checked into source control.
For my case, check the target -> Build Settings -> Search "Mach-O Type" and check the value, it should be Executable/Dynamic Library/Static Library. For other type values, the target could NOT be built and run.
This is similar to Kunal Gupta's comment, but I got this error after running an Xcode project on an actual iPad (the deployment target was changed to iPad and I wanted to run it on my iPhone simulator). Remember to change the deployment info after you use an actual device/simulator, especially when switching from iPad to iPhone.
Swift 3 or 4 Xcode 8 or 9
One thing you can do is click the Project file to open up General Settings, Capabilities etc.
Choose Build Settings
Search for Base SDK
Make sure debug AND release have the same build type.
I had debug set to ios 11.0 and release set to macOS 10.13
They must be the same in order to Archive
In my Case,
I open my iPhone here is the alert appearing in my iPhone for Trust and Don't Trust. I click on Trust. It works fine.
Switching to a different USB port and restarting Xcode solved the problem. Experienced this issue on iMac running Xcode 9.1 whenever I tried connecting any iOS device to one specific USB port. If your USB ports stopped working, check this.
Open the Apple Menu > About this Mac > More Info > System Report > USB and check that the device appears in the USB Device Tree. If it is not here try another USB cable.
I notice this with certain cable+device combinations (probably bad contact), restarting the XCode will only help for one or two runs and then it strikes again. Changing cable / device is the only long term solution worked for me.
In my case, this issue was fixed changing the Architectures (Build Settings --> Architectures) to Standard architectures - $(ARCHS_STANDARD)
Make sure to have arm64 armv7 armv7s on Valid Architectures.
In the case of iOS 13.x - What worked for me is unpairing my watch to my phone and repairing it to my iPhone. I wouldn't just unpair it via Bluetooth- I repeated the whole cycle as if I got a new watch. It took 10 mins to do the whole thing. When I ran my app again, it worked. From there, ensure all your Targets have the same sign in for identity.
Device Support Files is missing for device iOS version. Add it in XCode App Content path.
App Content Path is "contents/Developer/platform/iPhoneOS.platform/DeviceSupport"
Dowloaded support files from here and past them by creating folder of device version number there in app content path.
Go To General => Supported Destinations add IPhone or whatever platform you want run your app.
I encountered this issue while trying to run a watchOS app. After restarting both the Apple Watch and the iPhone, it displayed a different error message that informed me about the Developer Mode setting being turned off:
The run destination iPhone is not valid for Running the scheme 'My Watch App'.
To use Apple Watch for development, enable Developer Mode in Settings → Privacy & Security.
I turned on the Developer Mode setting, restarted Xcode, waited for a bit and it started working again.
Make sure your Xcode is up to date.
This might sound obvious. I tried all the answers presented in this threat and nothing would help. I used Xcode 12.0. After upgrading to 13.1, everything worked as expected.