iOS 8, How to use device for development? - ios

I have a new iPad Retina and I'd like to use it for development with Xamarin Studio and XCode 6. In the past, with XCode 5 you simply connect the device and click the button that says "Use for Development". But XCode 6 doesn't have that button anymore and when I try to build my application to the device in Xamarin Studio i get the error message saying "Could not install the application '/Users/jzacherl/Projects/CyCom/CyCom/CyCom/bin/iPhone/Debug/CyCom.app' on the device iPad: Your application failed code-signing checks. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile (error: 0xe8008015).
".
My application should support both iOS 7 and iOS 8. I've tried changing target deployment to and from 7 & 8 and I've tried restarting my mac/device and build/cleaning my project.

Despite the hints here and elsewhere, it took me awhile to find the exact solution. So, for others who are new to Xcode:
The navbar at the top of the main Xcode 6 window has a triangle run/play button, a square stop button, the app's name, then a target name, e.g. "iPhone 6" for one of the simulator options. The target name is actually a drop-down menu! That is where to select your actual device.
Now click the triangle button to build & run. Likely result: "No non-expired provisioning profiles are installed" with a button to "Fix Issue". Click that, wait a bit ... done!
Hat tip (and screenshots): http://www.bignerdranch.com/we-teach/how-to-prepare/ios-device-provisioning/#loc-provisioning-easy
Cross reference to a later question with a more descriptive title: There is NO Use for Development in Xcode's Organizer window

You can register a device with your Developer ID at:
https://developer.apple.com/account/ios/device/deviceList.action
(You will have to be logged into the developer site to do so.)
After that, everything should work fine. You can get your device's UDID from iTunes.

Try building and deploying an Xcode app and see what happens.
I believe Xcode will popup a helpful dialog if you need to do something Xcode can't do automatically.

First you have to register the UDID of the device in iOS member center and add with the provisioning profile and install the provisioning profile
In versions of Xcode prior to Xcode 6, you can connect the device to your computer over USB, open Xcode -> Organizer and select Use for Development.
Use for Development was removed from Xcode in Xcode 6 and later. It is no longer possible to do this for devices using Xcode 6 or later, even with the Devices page
Try going to Window->Devices. You should see your attached device in the list so right click on the device and select Show Provisioning Profiles.It will show a window where you can add your profile.
After that you will be able to install your app in that device.

Related

Xcode 8 cannot run on device, provisioning profile problems mentioning Apple Watch

I am running OS X El Capitan and using the Xcode 8 GM seed (8A218a) and I am trying to run my app on my iPhone 6 with iOS 10 GM seed, 10.01 (14A403), which is paired to my Apple Watch running watchOS 3 GM seed (14S326).
I am using Match for handling provisioning profiles and certificates, it has been working beautifully so far.
I recently changed the bundle identifier, so created a new App Id in member center and reconfigured match etc. I have the development certificate and provisioning profile installed on my Mac. I have deleted the old certificates and the old provisioning profiles.
Everything is just working fine running on the simulator. But when I try to run it on my iPhone Xcode 8 is displaying on error:
Provisioning profile "match Development com.XXX.YYY" doesn't include the currently selected device "ZZZ's Apple Watch".
It shows another error as well:
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
This is under Target -> General:
Target -> Build Settings looks like this:
I don't have an Apple Watch extension for this app. So why is Xcode 8 giving me errors relating to my Apple Watch?
Also what does the second error mean? Code signing is required for product type 'Application' in SDK 'iOS 10.0'?
Thanks!!
This did work for me:
Disable bluetooth on the iPhone
Disconnect & reconnect iPhone
Build and Run
Enable bluetooth again when you are finished with the debugging session
I had the same issue today - XCode Version 8.0 (8A218a) - and fixed it with two simple steps (instead of the more complicated approach above:
add the Apple Watch to member center (did not find a copy&paste option either)
edit the development provisioning profile and add the watch to devices, save
go to XCode prefs, move the old provisioning profile to trash (right click on the name) and download the new version
set the new provisioning profile in project editor
No restart, clean or anything else needed. Worked like a charm.
After putting my Apple Watch on Power Reserve (or turning it off, or Airplane mode, or...) and waiting a bit for Xcode to realize it was gone, I was able to run the app on my phone again.
Airplane mode is easiest.
I have the same issue with Version 8.0 (8A218a). It seems to go away when I:
Reselect the certificate (via UI)
Clean all (ctrl+cmd+shift+k)
Restart Xcode
Run the projet (which is possible after 1-3)
If I change the code, I get the same error again. Do not be fooled by Xcode actually indicating that everything is ok in the UI - but still gives the error. Its 1-4 again.
Regarding the 2. error. Looking at your screenshot I see no matching "Signing certificate" - which the message indicates is required. The above 1-4 also removed that error for me.
I really do hope there is a better solution to this issue and that we are missing something obvious! The restart-run cycle is not that efficient ;-)
I was getting the same errors, what happened was iTunes/Apple updated the provisioning profile and I had to accept the new update. Once I logged into "developer.apple.com" I just had to accept the new update and then go back to Xcode, close the project, reopen, and then download the provisioning profile to my new iPhone and then run the project. This is what worked for me.
I didn't have to delete anything or what the other answers are suggesting.
Xcode 8:
select the target -> General -> Signing -> select Automatically manage signing
then Xcode will help you to fix this.

iPad with iOS 8 or 9 : Can't install enterprise app

I have been trying to install an .ipa using itms-services to an iPad with iOS 9.1. However, it shows the "Install..app?" and "Unable to install.." pop-ups the same as asked in this question:
iOS 8 - Can't Install Enterprise App
The installation is successful in iPhone with iOS 9.1 (same version as iPad). I tried the installation in another iPad with iOS 8.1. I tried the suggested fixes in the accepted answer of the above mentioned question. Also, tried cleaning the Downloads folder using iExplorer. Still unable to download.
I'm able to install app using iTunes, so it's not a provisioning profile issue.
Any suggestions? Thanks in advance.
There are many reasons why this stupid error can occur. To be overly cautious, let's..
1) delete the app from your ipad
2) delete all of the related provisioning profiles from your ipad
3) in xcode make sure you are using the provisioning profile correctly associated with the enterprise account (bundle identifiers must match properly) .. also make sure the DEPLOYMENT TARGET is lower than the ios version on the ipad
4) in xcode -> product-> clean
5) xcode -> product-> archive
6) while its building, turn your ipad off then back on
7) upload the enterprise build
8) try to redownload and install it on the ipad
there is a VERY VERY small chance that your wifi is corrupting the downloaded file, to check, see if you can get it to install on your iphone via wifi as well.
connect the ipad to your computer via usb, while doing the install, open up in xcode -> window -> devices, pick your ipad in the left column and hit the very tiny little square with an up arrow in it to show the console.. clear it before you open the app, then open the app and see what it says, this will give you more clues hopefully of whats going wrong

Xcode 6.1.1, Yosemite, cannot add iOS device for testing

Since updating to Xcode 6.1, I cannot add any iOS devices to run on. Clicking add in the device window only asks to install more simulators. Itunes is 'seeing' the devices connected to the computer, but not Xcode.
Normally the devices I have on hand are an ipad2 running ios 7 and an older ipod touch running ios 5.1. I have set the build targets in the xcode project to include at least ios7.x but still can't see any device.
I have reviewed all my certificates and provisioning profiles in the developer portal. The ones generated by Xcode 6 seem to all start with "XC:..." If I generate and then download any of the older ones, they are greyed out in the add provisioning profile window from devices in Xcode.
Obviously, its critical that I can run on attached devices. Any suggestions would be appreciated.
thanks
r
Go to Windows -> Devices (or ⌘Shift2). Click on the device in the left column, and then "Use for development." If you don't see it there, you may need to restart Xcode, the device, and/or your computer.

xcode organizer doesn't detect my device

I couldn't see my device in the organizer, although I installed the latest version on my device, so the problem doesn't related to the iOS deployment target.
if you are using iOS 7 in your device then first time when you connect your device to system there is one popup will appear in your device for permission and you need to click on Trust, after that your device will be detected for development in xCode

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