Xcode 5 Deployment Device - ios

I opened up Xcode5 but my app cannot deploy onto my phone.
The organizer lists it as a deployment device, but all I see in the main toolbar is just generic "iOS Device".
It's odd because on another project does list my phone when I hit the "Play" button. Anyone seen this?
I am new to Xcode. Are you only allowed to deploy one project on your phone at a time?
Both projects are Universal.

It could be that the device has an older version of the OS on it. If you are targetting a newer version of the OS it will not show.
There is no limitation to the number of apps that can be on the device, you can have multiple. It could be that the device is not registered with apple? Showing in the list, does it have a green dot?
here is a question with the answer: Provisioning New Device for Development Xcode
Also, is it possible it is just not selected, here is a screen shot and link: http://www.techotopia.com/index.php/Testing_Apps_on_iOS_7_Devices_with_Xcode_5

Go to /Library/Developer/Xcode/DerivedData and delete all the contents.
This should now allow your device to be seen in the devices for selection.
This has been tested and works as I had the exact problem.

Related

iOS app cannot be deployed on device

I am developing an iOS app for iPads. I have two projects inside one workspace. When I try to deploy it on the iPad, I get absolutely no error or warning and I receive the "build succeeded" message. However, the app is not deployed on the iPad. The app works just fine on the simulator without any issues.
When I first connected my iPad to my computer, I set the "trust to this computer".
I set the code signing identity to iOS developer and I selected my paid developer account in the identity section in Xcode, which made no difference.
I don't know if these are relevant but cannot think of any other solution. I would appreciate any suggestion.
I am on Xcode 7.3 and the iPad is on iOS 9.3.1, which are both the latest versions as of today.
You can see my project navigator below if it helps.
So after you hit build, try going into your settings on your iPad. Go to General -> Device Management (almost to the bottom) -> click your email that shows up -> and see if the app is trusted in there.
After Some time, even the simulator stopped showing up. So I had to remove the existing scheme and add a new one. This resolved both the "simulator not launching" and "not being able to deploy to iPad" issues right away.
Never thought it would be this easy.

How to simulate the WatchOS on Xcode 7.0.1

I recently updated my Xcode to Version 7.0.1 and I built my first Apple Watch app.
I would like to test it but it seems like I need the actual device to be able to simulate it?
I went to Hardware > External Devices > and I do not see the Apple Watch option anywhere.
Anybody else has experience this?
What can I do to fix it?
It is not the same simulator but another one called 'Simulator (Watch)'.
If you select the target for the Watch project, you end up with this (menu selection):
which will launch the two simulators
Select scheme for Apple Watch in XCode and display should appear after running the project.
My case is worse, there is even no simulator option under "Project WatchKit App" scheme.
However I am able to bring it up by adding new simulator paring with watch simulator from device management window.
Start any iOS simulator.
Go to Hardware -> Device -> Manage Devices...
Click the + button under the bottom left corner.
Then you will be able to add new iphone simulators paired with apple watch. Sorry, I do not have enough reputation to post image here.
Although I still can't find the watch simulator under the external displays dropdown, I can run the watch app from the "Project WatchKit App" scheme anyway.

Xcode 6.4 cannot run using the selected device

I know that I repeat this topic but I didn't find the solution. I don't have developer account, I just want to run the iOS simulator with my project. All the uptdates are instaled including iOS simulatores, Compiler for C/C++/Obj-C is set as Default compiler(Apple LLVM 6.1). Also I can't choose any device on the left side of "set the active scheme", there's only iOS Device. I have tried to change the versions of XCode and iOS to earlier and nothing happened. I found
I will be very gratefull for help!
In the Xcode options select Window>Devices and see if the simulators are created. If not, you would need to create simulators depending on which one you need.

Can't install WatchKit app on Apple Watch

I have a WatchKit app that runs fine in the Simulator. But when I try to run it on an actual device it never finishes installing and never provides any error message or feedback.
The iOS app installs and runs fine. I bring up the Apple Watch app on the iPhone and it lists the app and shows the correct icon. Selecting that, the "Show App on Apple Watch" switch is on. Underneath it it says, "Installing...". And it stays there.
I can also see the app icon on the Apple Watch. Selecting it just shows the spinning wheel indicator as if it is trying to load.
Things I've tried based on other suggestions I've found here, on the Apple Developer forums, and around the web:
Verified that all app bundle IDs are correct and match.
Verified that the deployment target is iOS 8.2.
Verified that the WatchKit App runs in the simulator.
Verified that my provisioning profile includes my Apple Watch's UDID.
Verified that my Apple Watch shows up as a "Paired Watch" in Devices.
Deleted the app from my phone, and then rebooted my phone, watch, and Macbook before reinstalling.
None of the above work. Any suggestions?
Thanks!
Thomas Aylesworth
A friend who works on the USA Today iOS team, including the Apple Watch app, suggested I go to the project settings for the WatchKit App target and set "Skip Install" to NO. Sure enough, after doing this, I was able to install.
I've found it very useful for reading the iPhone console log. (Not to be confused with crash logs).
Use Xcode --> Window --> Devices -- select your plugged in iPhone, and make sure the log screen lower left arrow is down.
In my case, I had invalid provisioning profile entitlements, which were corrected via the Apple Dev portal, and re-downloading the profiles -- after making sure the entitlements were correctly being set in the WatchKit App Capabilities.
Check Info.plist file. In my experience if there is something added there that is not supposed to be there, it will cause this behavior. I added NSLocationWhenInUseUsageDescription and it caused this same issue.
I have found a similar problem due to my storyboard referencing an image which I later deleted (I no longer actually used it anymore). This gave the symptom of running ok on simulator but not deploying fully on hardware as you are seeing. To exclude this potential problem go through each image view on your apple watch storyboard and look out for the exclamation mark against image view entries.
I had the same problem but for me it actually turned out that the Apple Watch was running a WatchOS version lower than what what I had in XCode. I could not see a runtime warning about this (it just silently failed), but when selecting WatchKit scheme in XCode with device connected there was a small warning about version requirement.
You can also try deleting the watch app on the watch by long tapping on the icon and then you should get the giggle UI with a X on 3rd party apps. You can then delete the watch app and retry the install.
I was getting this error too, and I got it to install, after creating a new project from scratch in the non-beta Xcode, and copying my assets and code into the new project. I had the same problem, and tried everything that people suggested on other posts, without any success, including everything that you listed above.
Apparently, there was something incompatible with the way the project was stored in the beta Xcode, that I had created for the WatchKit app.
Here's what works for me with iOS 8.3 and Watch OS 1.0.1:
Make sure your app is finished installing on your iPhone.
Restart the iPhone by holding down the Home button and Wake/Sleep buttons.
Launch the TestFlight app on your iPhone.
Staying in TestFlight, go to your app's detail page and toggle the Install on Apple Watch to the On position.
Press the Home button on your iPhone to exit the TestFlight app.
Press the digital crown on the Watch to get to the Home screen. An icon for your Watch app should appear and begin installing.
make sure your app support 64Bit, otherwise it cannot run on Watch,just spinning there.
Did you add a custom entry to the of your Info.plist of the WatchKit App
This isn't allowed and it will fail validation and will just sit on Install...
Checkout the device console log for information on it
Yeah, had that problem too.
I deleted the Xcode Beta (and the .dmg) downloaded it again and installed it.
Don't have that problem anymore.
In my case, I disconnect the iPhone and the Mac, reconnect them via data line. Then something appear on my watch, a choice, agree or disagree, agree it. After that, Xcode begin to install symbols for watchOS 2.1:
When this is done, you can check it in Library->Developer->Xcode->watchOS DeviceSupport->Watch1,1 2.1 (13S661)->Symbols
Then I disconnect the watch and iPhone, reconnect it. Now I can install WatchKit App on my watch.
I have followed the answer by #hunterleebrown to see the log and found that the WatchOS version is not updated (i.e. Watch OS version is lower than the required version).
Here is the screenshot [ The log says (4th line): The system version is lower than the minimum OS version specified for bundle at ... ...]:
Then I went to the iPhone's watch app's-->general settings-->Software Update and found the watch OS is not updated (which is obvious). Then I downloaded the update and installed it. Then it worked!
Note: I also tried quitting XCode, restarting iPhone and Watch but didn't work for me.
Press "Trust this device on Apple Watch"
I had the same endless installation issue ending with a Time Out error and I finally fixed it thanks to this answer: https://stackoverflow.com/a/61636074/2854405
I had to:
Unpair my iPhone (from the "Devices and Simulators" screen),
Exit Xcode
Replug my iPhone
Trust the iPhone again when it was prompted
Start Xcode
Rebuild
I also had the same issue.
#SwampThingTom suggestion is good, but it changes the archive format as well size increases too.
In my case, the issue was DER entitlements not working only watch app, mobile app was fine.
Make the changes as per the comment over here This Code Signature is no longer supported when building app on iPhone 12
Upgrade to Xcode 13.1
In my case I resolved this problem when selecting the WatchApp target to creating AdHoc.
So, for example, there is three targets in project:
Demo;
Demo WatchKit App;
Demo WatchKit Extension;
If create AdHoc with Demo target, you will get infinite installation.
If create AdHoc with Demo WatchKit App target, the problem goes away.

iPhone 4 - no provisioned iphone os is connected

I'm trying to install an app onto an iPhone 4 and I get:
no provisioned iphone os is connected
I am using:
Xcode 3.2.3
iTunes 9.2
iPhone 4.0 with iOS 4.0 (8A293)
I have the development provisioning profile in XCode and in the phone.
The Organizer window shows the iPhone 4 with a green circle next to it. I have the correct App ID in the bundle identifier in Info.plist.
I've tried powering on/off phone, stopping/re-starting Xcode and iTunes with no luck.
Any ideas what is wrong?
If the profile is installed, you are probably trying to install the app on the device with the build configuration set to "Distribution"... you need to set it to "Debug" or "Release" in the drop-down menu in XCode on the main window.
So, build options should be "Debug" and "Device"
Did you check the status of the Organizer? From Xcode, go under Window->Organizer, and look under the DEVICES section on the left pane. It should show the connected devices, and provide a more detailed explanation (e.g., device is not enabled for development, OS installed on phone is not supported by SDK, etc).
One possibility is that you are running 4.0.1 on your phone, but only have the 4.0 SDK installed.
Double check the provisioning profile is tied to the build you are doing: Right click-> Info on the project icon in Groups & Files then Build and scroll down to Code Signing.
There seem to be a million different things that can go wrong with getting the app to the iPhone, I never get it right the first time.
I've followed this before: http://adeem.me/blog/2009/04/24/tutorial-list-guideline-for-building-ad-hoc-application-for-iphone/
It's for Ad Hoc but most of the steps are the same.
I figured out what the problem was. I had the build set to iPad and I was trying to download to an iPhone! I hope this helps someone else.

Resources