Remote Build / Emergency Build Prep

These instructions are for installing Loop to your own phone without being connected to a computer. Never build Loop for another person other than your own family members.  This method requires the use of a Mac and is not the same as the Browser Build using GitHub and Test Flight.

IMPORTANT:  In order to build using Diawi,  you must

  1. Have previously built Loop to that iPhone, or
  2. Manually add the iPhone’s UUID to your Apple Developer Account before building the Loop app in Xcode. 
    • To remotely build Loop to your phone, you have to use Xcode to create an IPA file and upload it to Diawi.com to create a link to click on the phone you want to build Loop to.
    • Since the link from Diawi will only work for 24 hours, store your IPA file in the cloud (iCloud, Dropbox, Google Drive, etc) so you can download it and upload it to Diawi from your phone whenever you need to emergency remote build.

Build the IPA File

Upload to Diawi and Install

Video Walkthrough

 

    • The provisioning profile in the IPA is also only good for up to one year from its creation date, so be sure to keep it updated in your cloud storage. Also, upload a new IPA whenever you update your version of Loop. If the Loop version on your phone is newer than the Loop version of your IPA and you need to do an emergency remote rebuild, you should delete Loop from your phone first which would mean reentering all of your settings and losing your current pod.
    • If you use remote overrides/boluses/carbs, be sure to add the LOOP_PUSH_SERVER_ENVIRONMENT variable to Nightscout and set it to production as explained on the remote overrides page in LoopDocs whenever you are using Loop that was built remotely. If you later build Loop directly from Xcode, remove this variable from Nightscout.

Build the IPA File

 

    1. If you’ve recently successfully build Loop, just open your Loop project in Xcode. If you haven’t, follow all the steps for a new build or a rebuild and build to either a phone or a simulator first to make sure everything is working the way it should.

 

    1. Select Any iOS Device (arm64) as your project’s device target.
      select target device

 

    1. In the Product menu, select Clean Build Folder.
      clean build folder

 

    1. In the Product menu, select Archive. When the archiving process completes, an Archives window will pop up. If you close the Archives window and want to open it again later, at the top of the screen click Xcode WindowOrganizer.
      product archive

 

    1. Select the app you just created (check its Creation Date) and click Distribute App.
      distribute app

 

    1. Select Ad Hoc for the distribution method and click Next.
      ad hoc

 

    1. Set App Thinning to None, uncheck all Additional Options, and click Next.
      ad hoc options

 

    1. Select Automatically manage signing and click Next. This will start generating the IPA file.
      automatically manage signing

 

    1. When the file generation process completes, click Export and choose where to save the IPA file. You can save it in local storage and then upload it to Diawi and/or a cloud storage service, or you could save it directly to a cloud storage service if your Mac is set up for that.
      export 1
      export 2

 

 

Upload to Diawi and Install

Diawi

    1. Make sure your IPA file is accessible on the device you’re uploading to Diawi from. It does not need to be uploaded from the phone you’re building Loop to, but it can be.
    2.  Go to diawi.com
    3.  Click Add file(s) and select your IPA file.
      •  If there’s a cloud icon in the upper right of the file icon, press and hold it and tap Download first.
      •  Sometimes even after it’s downloaded to your iPhone you have to press and hold the icon first and then tap the icon once a menu appears.
      •  If you run into an error where Diawi tells you it’s an invalid file type even though it’s a valid .ipa file, try uploading from a different browser, updating your iOS to the newest version, or uploading it from a different phone, computer, or tablet.
    4.  Uncheck both Allow… boxes.
    5.  Click More Options and enter a password.
    6.  Enter your e-mail address and once the IPA has finished uploading, click Send.
    7.  Open the e-mail from Diawi on the device you are building Loop to open click the link within the email in Safari. Do not use a different browser for this step as it only works with Safari. If you don’t see this email in your inbox, check your junk folder.
    8.  When the link loads, enter your password and click Submit. On the next page, click Install Application. On the popup, click Install.
    9.  Swipe to the home screen to get visual confirmation it is installing (the pie animation overlay graphic on the icon).
    10.  After Loop finishes installing, check its expiration date. In Loop, tap the settings gear icon and tap Issue Report. Look for profileExpiration near the top. This is the date Loop must be rebuilt by before it will stop working. It is also the expiration date of the IPA file.

profile expiration

 

Skip to content