Preparing Mac for iOS App Development

Important Developing iOS app is not simple, the most important part is to prepare your Mac computer properly first. It might take a while but this will ensure smooth development and save you a lot of time afterwards. Please be patient, read and follow the instructions completely and carefully. If you want to build an iOS version of your app, you need a Mac computer, there is no way to build an iOS app without one. Make sure that it's running Mac OS X Mavericks or later.

 

Installing Required Tools on Mac
  1. Install the latest Node.js LTS with npm.

  2. Install Xcode 8 (or newer).

  3. In the Launchpad, open Xcode.

    XCode icon

  4. Accept the license agreement and then close Xcode.

  5. Install Ionic CLI globally (you may need sudo):

    $ npm install -g @ionic/cli

    You can verify your installation with the ionic --version command.

 

Registering devices

Devices you use for development need to be registered and added to the provisioning profile you use to sign your app. You are recommended to use Xcode 8's automatic signing so that Xcode will create and manage these development signing assets for you when you need them. For more information, please read the Signing workflow.

 

Creating a Provisioning Profile

You'll need a provisioning profile to run your app on a device. Create one by using an Apple Developer account. You can also create one with your free Apple ID but there are limitations. See Supported Capabilities.

If your team already has a provisioning profile, see Option 3: Use your team's provisioning profile.

 

Option 1: Use an Apple Developer account (Recommended)

This type of provisioning profile gives you the most flexibility. For this option, you'll do these things:

  • Enroll in the Apple Developer program

  • Add your Apple ID to Accounts preferences

  • Assign the targets in your project to a team

  • Launch your app on a device

Let's go through each step in this process.

Enroll in the Apple Developer program

See Apple Developer Program.

Note On the Member Center page, choose the Membership link, copy down your 10-character Team ID, which will be required for building your app remotely later. See Building your App for Release Using Xcode (iOS).

Add your Apple ID to Accounts preferences

Request a certificate

  1. Connect your device to your Mac. Make sure that your device is turned on.

  2. Start Xcode 8.

  3. In Xcode, add your Apple ID.

    See Add your Apple ID account.

  4. In the menu bar, choose Xcode->Preferences.

  5. In the Accounts page, choose the View Details button.

  6. In the account details page, choose the Create button next to the iOS Development signing identity.

    Create button

  7. Choose the Done button to close the account details page.

Create an App ID

We'll use a wildcard App ID because it's the most flexible. You can use one for multiple apps. You need an explicit App ID (an App ID that you can use with only one app) only if you decide to enable certain services in your provisioning profile.

  1. On your Mac, open Safari, and log into the Apple Developer Member Center.

  2. On the Member Center page, choose the Identifiers link.

    Sometimes Xcode generates a wildcard App ID for you. Take a look at the list of App ID's. If any of these have a * in the ID field, then you have a wildcard App ID. If not, proceed to the next step.

  3. If you don't have a wildcard App ID, choose the + button to create one.

    + button

    The Registering an App ID page appears.

  4. Choose the Wildcard App ID option and then place a * in the Bundle ID field.

    Wildcard ID option

  5. Fill in the rest of the fields on that page, and then choose the Continue button.

  6. In the Confirm your App ID page, choose the Submit button.

    The Registration complete page appears.

Need more detail? see Registering App IDs.

Register your device

  1. In the Certificates, Identifiers & Profiles page, choose the All link that is located under the Devices heading.

    All Devices

  2. Choose the + button.

    Add button

  3. In the Registering a New Device or Multiple Devices page, provide the name and UDID of the device, and then choose the Continue button.

    UDID stands for Unique Device Identifier. It's a 40-character string that uniquely identifies your device. You can find it by using Xcode or ITunes. See Locating Device ID's.

  4. In the Review and register page, choose the Register button.

Need more detail? See Registering Devices Using Member Center

Create a provisioning profile

  1. On the Member Center page, choose the Certificates, Identifiers & Profiles link.

  2. In the Certificates, Identifiers & Profiles page, choose the Provisioning Profiles link.

  3. In the Provisioning Profiles page, choose the + button.

    Add button

  4. In the What type of provisioning profile do you need? page, choose the iOS App Development option, and then choose the Continue button.

    iOS App Development option

  5. In the Select App ID page, choose the wildcard App ID that you just created, and then choose the Continue button.

    App ID popup menu

  6. In the Select certificates page, select the checkbox next to the certificate that you created earlier, and then choose the Continue button.

    Certificates

  7. In the Select devices page, select the checkbox next to the device that you registered earlier, and then choose the Continue button.

  8. In the Name this profile and generate page, name your profile, and then choose the Continue button.

  9. In the Your provisioning profile is ready page, choose the Download button.

Need more detail? See Creating provisioning profiles using Member Center

Download the provisioning profile in Xcode

  1. Start Xcode. Go to Accounts preferences.

  2. In the lower-left corner, click the Add button (+).

  3. Choose Add Apple ID from the pop-up menu.

  4. Enter your Apple ID and password and click Sign In. If you do not have an Apple ID, click create Apple ID. After creating the Apple ID, repeat above steps.

    Add Apple ID

    In the account details page, choose the Download button next to your provisioning profile's signing identity.

    Download button

  5. Choose the Done button to close the account details page.

Install the provisioning profile to your device

  1. Connect your device to your Mac. Make sure that your device is turned on.

  2. In the menu bar, choose Window->Devices.

  3. In the Devices pane, select your device.

    xCode Devices

  4. At the bottom of the Devices pane, choose the settings icon, and then choose the Show Provisioning Profiles.

    Provisioning Profiles on Device

  5. In the Provisioning profiles installed on .. dialog box, choose the + icon.

    Add Provisioning Profile

  6. Navigate the location where you downloaded your provisioning profile, choose the file, and then choose the Install button.

  7. In the In the Provisioning profiles installed on .. dialog box, choose the Done button.

 

Option 2: Use your free Apple ID

First, take some time to review the limitations of this type of provisioning profile. If you're comfortable with those limitations,

  1. Start Xcode 8.

  2. In Xcode 8, add your Apple ID.

    See Add your Apple ID account.

  3. In Xcode 8, choose File->New->Project.

  4. In the Choose a template for your new project dialog box, in the iOS group, choose the Application category, choose any template, and then choose the Next button.

    Xcode IOS Application templates

  5. Name your product, organization, and identifier anything you want, and then choose the Nextbutton.

    Project settings

  6. Choose a location to save your project, and then choose the Create button.

    The General page of the project properties appears.

  7. In the Team pop-up menu, choose your Apple ID.

    Team popup menu

  8. Connect your device to your Mac. Make sure that your device is turned on.

  9. In the Scheme pop-up menu, choose your device.

    Device in the Scheme pop-up menu

    If the device has the message version lower than deployment target, you can either update the operating system of your device or choose a version of iOS from the Deployment Target pop-up menu that matches the operating system version of your device.

  10. If a Fix Issue button appears below the Team pop-up menu, choose that button.

    Xcode creates a provisioning profile and the Fix Issue button disappears.

  11. Choose the Run button to run your project.

    Run button

    Running your project, ensures that your provisioning profile works. Xcode installs your blank app to the device and then starts it.

Option 3: Use your team's provisioning profile

If your team shares a provisioning profile, all you have to do is register your device with the profile and then download and install that profile onto your device.

Register the UDID of your device with the provisioning profile

UDID stands for Unique Device Identifier. It's a 40-character string that uniquely identifies your device. You can find it by using Xcode or ITunes.

Send that information to the person on your team who manages the provisioning profile. For the purpose of this discussion, we'll call that person the profile administrator.

If you have administrator access to the Apple Developer Account, you can register the device yourself. Here's the steps:

  1. On your Mac, open Safari, and log into the Apple Developer Member Center.

  2. In the Registering a New Device or Multiple Devices page, provide the name and UDID of the device, and then choose the Continue button.

  3. In the Review and register page, choose the Register button.

For more details, read Add your Apple ID account.

Assign the targets in your project to a team

To sign your app, each target in your Xcode project must be assigned to the same team.

  1. In the project editor, select the target from the Project/Target pop-up menu.

  2. Click General and expand the disclosure triangle next to Signing to reveal the settings.

  3. Select "Automatically manage signing"

  4. Choose your team from the Team pop-up menu.

    Automatically manage signing

For more details, read Assign a project to a team.

Launch an app on a device

  1. Connect the device to your Mac.

  2. In the toolbar, choose your device from the Scheme menu. If this is the first time you are using a device for development, you may need to wait for Xcode to enable the device before it appears in the Scheme menu. In the devices window, you can check the status of a connected device.

    If the device appears under Unavailable Device in the Scheme menu, hover the mouse over the device, read the reason, and fix the problem.

    Launch app on device

  3. In the toolbar, click the Run button. Xcode should install and launche the app on the device.

    If a form appears asking if Xcode should register the device, just click Register Device.

For more details, read Launch an app on a device

 

 

 

 ©2016-2021 e.World Technology Limited. All rights reserved.