There are two types of build errors that happen; yellow alerts and red alerts. Yellow alerts will not cause a build to fail, and can generally be ignored. Red alerts will have to be resolved before you can successfully build Loop app.
Yellow error alerts do not cause the build to fail, those are just warnings. Occasionally, a Loop version may have some minor discrepencies that cause a yellow alert...but you can ignore those.
Red error alerts will have to be resolved before you can successfully build Loop app. The most common cause of red alerts comes from being out of sync between the various parts of Apple's infrastructure (iOS, Xcode, Swift, watchOS, macOS) that are frequently updated. For every update to iOS/Xcode, the volunteer Loop developers have to make changes to the underlying source code. This takes time...so when Apple updates are pushed out, sometimes there may be a short period of time until the code is updated to match. If you encounter a build error that is not listed below, please get on the Facebook Looped group or Gitter to let us know.
Updated Xcode, but need to Carthage Bootstrap⌁
Error message: "Swift Compilier Error. Module compiled with Swift 4.0 cannot be imported in Swift 4.0.x"
Soultion: Xcode was recently updated, and the current Loop master branch will produce this error message until the code is updated. You will need to perform the following steps:
- Open Terminal App
- Navigate to your Loop download by doing the command:
cd downloads/Loop-master(or whatever you named your Loop folder...go check)
- Now use the command
carthage bootstrapIt will run for about 4-5 minutes and then show you a screen like below.
If during the run of
carthage bootstrap, you instead see an error message like below:
Please go to your Xcode preferences, under the Locations tab, select
Xcode 9.3under the Command Line Tools
If Xcode 9.3 is not available in the dropdown menu, (1) make sure you have update your Xcode from the App store and then (2) go to Terminal app and run the command
xcode-select --install which will produce a pop-up window for the installation of command line developer tools. Select
install in that pop-up window.
Return to Terminal app and rerun
carthage bootstrap in your Loop download folder. It should resolve correctly after that.
- Go back to your Loop project in Xcode, select your iPhone, and press the build button. You'll still see some yellow alerts, but those are fine.
Exit Code 1⌁
Error message: "Command /bin/sh failed with exit code 1"
Solution: This error message has been more frequent lately, but I am unsure if there is a new underlying change in Xcode or people are inadvertently saying "no" to allowing Keychain Access. Regardless the solution is as follows:
- Close Xcode
- Open your Keychain Access application (found in Applications within the Utilities folder, similar to where Terminal app is found)
- In the upper left corner of keychain access, make sure you have the keychain
loginhighlighted and then click the large lock icon above the keychains area. Click the lock closed, and then click the lock to open it again. You will be prompted for a password. Enter your computer admin password. Close Keychain Access app.
- Open your Loop project again in Xcode.
- In the main Xcode ribbon menu (grey menu bar at the very top of your Apple display area), select the word
Productand then select the option for
Clean. (keyboard shortcut is shift-command-k)
- Now try rebuilding your Loop app. If you ever get prompted again to allow Xcode access to Keychain, make sure to Always Allow.
Developer License Update⌁
Error message: "The Apple Developer Program License Agreement has been updated, In order to access certain membership resources, you must accept the latest license agreement."
Solution: You'll need to log onto your developer account at developer.apple.com and accept the latest license agreement.
Swift Language Version⌁
Error message: Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly" or also "Could not locate device support files. This iPhone is running iOS 11.x, which may not be supported by this version of Xcode."
Solution: You will need to go to your computer's App Store and install the Xcode app update.
Embedded Binary error⌁
Error message: "Embedded Binary Validation Utility. error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier".
Solution: This error happens because you've either
- Forgotten to save project after the MAIN_APP_BUNDLE_ID was changed (most common cause)
- Tried to manually change one of the Bundle ID names in one of the four targets, or
- Used an incorrect syntax in the MAIN_APP_BUNDLE_ID.
In any case however, usually this error is most easily solved by closing out your project, deleting the download folder, and starting with a fresh download of Loop app. The next time you build, make sure to follow the directions carefully to use a MAIN_APP_BUNDLE_ID in the right format and press
command-s to force Xcode to update the targets' naming scheme correction.
Abort with Payload⌁
Error message: "Abort with payload" Your app will only open briefly with a white screen and then close, if you build with this error.
Solution: This error message is caused by either
- Saving Loop download folder into an iCloud mapped drive, or
- Having a space in the name of your Loop download folder.
Rename the folder to have no spaces and/or move it back to the Downloads folder, then rebuild.
Exit Code 127⌁
Error message: "Shell Script Invocation Error. Command /bin/sh failed with exit code 127"
Solution: This error code is happening for Loopers updating to Loop who used carthage.pkg and don't have homebrew installed. We have since updated the installation docs, so new users likely won't run into this error. But, if you are an existing Looper encountering this error message while trying to update your Loop, please open your Terminal app found in the Applications>>Utilities folder and then enter
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Confirm installation by pressing enter, and then typing in your computer password. When the installation finishes, use the command
brew link --overwrite carthage. After those two steps, you can close out Terminal app, return to Xcode and press the build/play button again.
Apple Watch: Loop app not appearing⌁
Error: Apple watch app is not appearing.
Solution: Usually because you have not updated to watchOS prior to when you built Loop, or you didn't have your Apple watch paired at the time of building Loop. Don't forget to open the iPhone's Watch app, select My Watch tab on the bottom left, scroll all the way down, and click
Install for the Loop app listed at the very bottom under "available apps".
Apple Watch: Loop app not installing⌁
Error: The Loop app appears on the list of app available to install on the watch, but when you press "install", and it goes through the animation of filling in the circle while it's installing, but then at the end it just toggles back to saying "INSTALL".
Solution: Plug your iPhone into the computer and start Xcode. On your watch, look for a prompt that says "Trust this computer". Scroll down on the watchface and select the "Trust" button. Now rebuild your Loop app in Xcode, but look for a pop-up message that warns you that the Watch isn't registered with the Developer portal. Click on the "register" button that is in the pop-up window and proceed with the Loop app building again.