LUS
LUS

Reputation: 221

Deploy an iphone app from xcode to iphone

I am doing a school project and I am required to deploy an iphone app to my phone. I have some really noob questions to ask. I have tried to read some solutions from this website but I dont understand! like from these questions: iPhone app minus app store and How can I deploy an iphone application from xcode to real iPhone device.

Can anyone here give me an easier way to understand please?

Upvotes: 22

Views: 50856

Answers (3)

Suragch
Suragch

Reputation: 512506

My fuller answer with pictures is available here.

With Xcode 7 for an iOS 9 target device there is now free provisioning. You don't have to sign up for the Apple Developer Program in order to test an app on a real device.

Summary from the Apple docs:

If you don’t join the Apple Developer Program, you can still build and run your app on your devices using free provisioning....

  1. In Xcode, add your Apple ID to Accounts preferences
  2. In the project navigator, select the project and your target to display the project editor.
  3. Click General and choose your name from the Team pop-up menu.
  4. Connect the device to your Mac and choose your device from the Scheme toolbar menu.
  5. Below the Team pop-up menu, click Fix Issue.
  6. Click the Run button.

When you run your app on a device, you will also have to trust the developer first. On your device go to Settings > General > Profile > developer account name > Trust.

Related articles:

Upvotes: 9

ardatt1155
ardatt1155

Reputation: 74

This SO question here gives detailed steps of how to do what Jeremy suggests.

How can I deploy an iPhone application from Xcode to a real iPhone device?

Take note that /Developer was moved to /Applications/Xcode.app/Contents/Developer in Xcode 4.3.

And, this SO question says what to do if you get an [sed: RE error : Illegal byte sequence].

RE error: illegal byte sequence on Mac OS X

But in XCode-5.1/MacOS-10.9, this still didn't work - I lost the devices tab in XCode-Organizer after editing the plist file!

Upvotes: 3

Jeremy W. Sherman
Jeremy W. Sherman

Reputation: 36143

Easy:

  • Sign up for an iOS Developer account. This includes signing up for an Apple ID, enrolling as an Apple developer, then opting that dev account into the Developer Program. That link walks you through the process.
  • Hook up your device to your machine and look at it in the Xcode organizer (Window > Organizer).
  • Tell Xcode your want to use it for development.

I believe Xcode will now help you out more than it used to. If it doesn't, then Apple has step-by-step instructions. In short, you need to:

  • Use Keychain Access to generate a CSR (certificate signing request)
  • Submit that to Apple via the dev portal
  • Download the resulting development signing certificate and install it along with Apple's intermediate certificate in your keychain by double-clicking on the files.
  • You then need to create a provisioning profile.
  • Add your device ID to it.
  • Download it and stick it on your device, e.g., by dragging it to your device in iTunes.

Then, you can build and run your app on the device. It's a pain to explain, but pretty easy to feel your way through once you get started.

Upvotes: 34

Related Questions