Internal Testing

After an app has been created, there will be a need to run the app end to make sure it is working appropriately. There are currently two options available to do this: Xcode's Simulator and TestFlight.

With Xcode Simulation

Using an iOS simulator inside of Xcode is a nice solution for a quick test that does not require native hardware capabilities (push notifications, maps, etc.). Otherwise, make sure a build is set up in TestFlight.

  1. If you are pulling student code for the first time:
    1. Open Xcode and select Clone Git Repository...

    2. Paste in the HTTPS URL at the top and click Done (e.g. https://github.com/apple/sample-backyard-birds.git)
  2. Otherwise:
    1. Open Xcode and select the Xcode project you want to open, either by clicking on it in the sidebar or by selecting Open Existing Project...
  3. Once open, change the device you want to run the project on (iPhone, iPad, etc.) at the top left

    Note

    You may need to install a version of iOS in order to use the simulator during first-time setup. In the dropdown, click Get next to the latest iOS version to install it.

  4. Click the start button at the top left
  5. The application should open if there are no build errors. If there are errors, fix them before attempting to test again.

TestFlight Internal Testing

TestFlight is an Apple application that lets you download beta applications from App Store Connect. This allows for a test using actual iOS hardware and take advantage of native device capabilities (push notifications, maps, etc.). It also allows for easy testing between students without them sharing their source code. If you just need to do a quick test of the Swift code to make sure the application loads, it may be quicker to use Xcode's simulator.

  1. Navigate to the app in App Store Connect you want to make available to test devices
  2. Go to the TestFlight tab at the top



  3. Click the + by the Internal Testing tab to add a testing group. The name can be anything you choose.



    1. Keep Enable automatic distribution checked
  4. Click on the group and invite any testers you would like in the group



  5. Go back a page and select a build from the list you would like to share to the testing group and add the testing group


    Note

    You must notify App Store Connect what type of encryption the build uses before sharing for testing. This typically will just be "None of the algorithms mentioned above".

     

    Recommendation

    Any build submitted as an "Internal" build for TestFlight will automatically become available to any testing group created, so this is recommended for grading purposes.

  6. Accept the confirmation email to be a tester. You will receive a code to input into TestFlight.
  7. Open TestFlight on a mobile device logged into your federated Apple ID (@appstate.edu) and insert the code given in email.
  8. The application should now be listed and able to be installed on the device.

External Testing

Sometimes students may wish to testing versions of the application in the "real-world", by allowing fellow students, friends, etc. test their application. You can easily send invites to external testers for these one-off testing purposes using TestFlight.

  1. Navigate to the app in App Store Connect you want to make available to test devices
  2. Go to the TestFlight tab at the top



  3. Click on Test Information under General Information and fill out the required form



  4. Click the + by the External Testing tab to add a testing group



  5. Click on the group and invite any testers you would like in the group



  6. Go back to Builds > iOS on the left side bar and click on a build from the list you would like to share to the testing group and add the testing group


    Note

    You must notify App Store Connect what type of encryption the build uses before sharing for testing. This typically will just be "None of the algorithms mentioned above".

  7. Have the external tester install TestFlight and accept the invite. They should now see TestFlight on a device signed in as them.