1.4. Building Your First Project

1.4. Building Your First Project

Now that your environment is set up, here’s how to build your first project.

a) Creating an iOS Project from Scratch with Visual Studio

  1. Start Project Creation Wizard:

    • Open the "Project Creation Wizard for Visual Studio" from your Start menu (in the "Darwin Build Environment" group).

  2. Configure Project:

    • Enter a name for your project.

    • Select the directory where it should be created.

    • Specify the project type.

    • Click "Create".

  3. Visual Studio Setup:

    • The necessary files for a new iOS project will be created in a new directory, along with a .vcproj file. Visual Studio will open.

    • Depending on your Visual Studio version, you might need to go through a project conversion wizard; this should complete without errors.

  4. Build Project:

    • Browse your project files within the IDE.

    • When ready, press F7 or click the "Build" toolbar button to compile. This action runs your project's make.cmd build script.

    • Build output will appear in the Visual Studio compiler output window.

  5. Output:

    • Depending on the project type, the build will produce an installable app or another artifact (e.g., a library).

    • Refer to the builder output and the make.cmd file for details on what to do next (e.g., to install an app after each build, you can change a setting in make.cmd).

b) Building a Project from the Command-Line (or Another IDE)

  1. Navigate and Execute:

    • Open a command prompt and navigate to your project's directory.

    • Run make.cmd.

  2. Non-Visual Studio Users:

    • If you're not using Visual Studio, you should delete the Visual Studio project file (.vcproj / .vcxproj). This prevents the build script from relying on it to determine which files to compile.

    • Rule: If no Visual Studio file is present, all files with compilable extensions (.c, .cc, .cpp, .cxx, .m, .mm, .mx, .mxx, and .a) in the project directory and its subdirectories are compiled.

    • To exclude a specific file from compilation when using the command-line, change its extension.

  3. Master Build Script:

    • The build system uses the build.cmd master script located at the root of the build environment.

    • For automated build chains, study this file, especially its command-line arguments (invoke build /? to display them).

c) Building an Xcode Project Created by the Unity Game Engine

  1. Create Project in Unity (Windows):

    • In Unity, select File > Build Settings... (or Ctrl+Shift+B).

    • Select iOS or macOS as the platform.

    • Click Build.

    • Unity will prepare a directory containing an Xcode project.

  2. Start Project Builder for Unity:

    • Open the "Project Builder for Unity" from your Start menu (in the "Darwin Build Environment" group under "All programs").

  1. Configure and Build:

    • Use the Browse button to select the location of the Xcode project directory created by Unity.

    • Verify your signing identity (see 1.3. Setting Up Your Signing Identity) and ensure the provisioning profile is suitable for your app (see 8.2. Provisioning Profiles Explained).

    • Review the build options.

    • Click Build.

    • Grab a cookie while your project builds!

In All Cases (After Successful Compilation)

  1. Locate Packages:

    • Your compiled apps can be found in the Packages subdirectory of your project.

    • These packages are ready to be deployed.

  1. Over-The-Air (OTA) Installation (If Enabled):

    • If you configured OTA deployment, your app should also be available for wireless installation. Follow the on-screen instructions provided by the build to

    • OTA Deployment Notes:

      • The app must be signed with a DEVELOPMENT or enterprise certificate. Apple blocks OTA deployment for other certificate types.

      • Your iDevice needs a working internet connection to download the install manifest (a small resource generated online).

IMPORTANT: Code Signature and Product Activation Code signing requires product activation. To import and use your digital signing identity:

  • Use the Keychain Tool (see 1.3. Setting Up Your Signing Identity).

  • Until a signing identity is set up, only a pseudo-signature can be performed.

  • Pseudo-signed apps can only be deployed on jailbroken devices.

  • Fully signed apps can be deployed on any device (jailbroken or not).

  • See 8.1. Digital Signing Identities Explained for details on using an Apple Developer Program identity.

Last updated