IPA build is not working
See original GitHub issueHi,
I followed this guide https://www.robincussol.com/build-standalone-expo-apk-ipa-with-turtle-cli/ to build the ipa file. The build was successful. Then I uploaded the ipa file to the App Store. Installed TestFlight to install the App on my IPhone. When I open the App following error occur.
Error
Could not connect to development server
...
URL: http://127.0.0.1:8000/bundles/ios-8beb0c...9b.js
Build Environment
- Azure Agent MACOS 10.15 https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md
- XCODE 12.2
- Fastlane 2.168.0
- turtle-cli@0.20.0
- expo-cli@4.0.8
- turtle setup:ios --sdk-version 39.0.3
build-ios.sh
#!/bin/bash
[ -z "${EXPO_IOS_DIST_P12_PASSWORD}" ] && echo "EXPO_IOS_DIST_P12_PASSWORD is unset" && exit 1;
[ -z "${APPLE_TEAM_ID}" ] && echo "APPLE_TEAM_ID is unset" && exit 1;
[ -z "${BUILD_NUMBER}" ] && echo "BUILD_NUMBER is unset" && exit 1;
printf "\n\nInstall imagemagick\n"
brew install imagemagick
printf "\n\nInstall Expo\n"
npm install -g expo-cli || exit 1;
printf "\n\nInstall turtle-cli\n"
npm install -g turtle-cli || exit 1;
printf "\n\nInstall yarn install\n"
yarn install
printf "\n\nSetup SDK\n"
turtle setup:ios --sdk-version 39.0.3
printf "\n\nRemove Alpha Channel and replace transparency with white\n"
find assets -name "*.png" -exec convert "{}" -background white -alpha remove -alpha off "{}" \;
printf "\n\nUpdate buildNumber\n"
jq ".expo.ios.buildNumber = \"$BUILD_NUMBER\"" app.json > app.new.json && \
mv app.new.json app.json
printf "\n\nBuild Expo\n"
rm -rf dist
expo export --dev --public-url http://127.0.0.1:8000
printf "\n\nStart Webserver for dist\n"
cd dist || exit 1;
python3 -m http.server &
cd ..
printf "\n\nBuild iOS\n"
turtle build:ios \
--team-id "${APPLE_TEAM_ID}" \
--dist-p12-path ios_distribution.p12 \
--provisioning-profile-path example_Test.mobileprovision \
--allow-non-https-public-url \
--public-url http://127.0.0.1:8000/ios-index.json \
-o app.ipa
Build-Log
What should I do?
Is this behavior normal? Should I provide every build version on a public server? It feels wrong to keep all versions public. On the Android build I don’t need to do it.
Thank you for your help!!
Greets, Tobias
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
Not able to install enterprise build in iOS 15 beta version
After updating the os, not able to install the enterprise app through ipa, it throws error unable to install the app. Kindly update...
Read more >Guide to Fix the "unable to install .ipa file" Issue on iOS Devices
This guide leads you through all the necessary steps to find out the source of the "unable to install .ipa file" error message....
Read more >I cannot build the .ipa file - Stack Overflow
I want to deploy my app on the Apple Store with flutter build ipa . When I run this command, ... Doctor found...
Read more >"Show IPA file on build Server" not working - MSDN - Microsoft
Set as active configuration, clean and rebuild. Option will become visible within the "Tools" => "iOS" => "Show IPA on Build Server". Tuesday ......
Read more >Xamarin iOS mobile app - VS 2019, v16.9.2 not creating iOS ...
The issue is, even though the finished build shows 0 errors and “Show IPA File on Build Server” option is enabled and clickable,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For what it’s worth, I was able to find a solution to this problem using Let’s Encrypt with a subdomain you can control, without having to upload any of your files anywhere.
Context: https://github.com/expo/turtle/issues/302#issuecomment-809848518
Guide: https://github.com/charles-m-knox/space-codes#building-locally
@susonthapa Here you go, best of luck! P.S. I don’t own a Mac or do Expo app development any more, so I probably can’t help if issues arise : (
Building locally
Building locally is required because the mp3 files in the
assets/audio
directory are 60mb each on average, and Expo’s build servers will reject them because they’re too big (Cloudfront rejects them as well).First, install Turtle:
Since we are building locally, we have to create a TLS-enabled (and trusted) file server, which will host the
dist
files from Expo, including the build manifests.Install
certbot
so we can acquire a TLS certificate:Acquire a TLS certificate for your domain using a DNS acme challenge - you have to run as
sudo
because certbot requires access to/etc/letsencrypt
as well as/var/log/letsencrypt
:This will require you to go to your DNS portal (such as Cloudflare) and create a TXT record under
_acme-challenge.turtlebuilder.site.com
with the value it specifies.In a new terminal window, check the DNS record:
Back in your certbot terminal window, hit enter, and it should succeed.
Next, you have to update your local DNS. Your computer must believe that your local system’s IP address is actually
${BUILD_DOMAIN}
. There are many ways to do this; the best options are:/etc/hosts
, in the form of192.168.x.y turtlebuilder.site.com
Now that you have a valid certificate for your domain and your device(s) are setup to work with your custom DNS settings, you can export your assets/bundles/manifests with Expo to the local
dist
directory - by specifying--public-url
, we will be telling Turtle that everything is accessible via that URL when it tries to download all the assets for building:Finally, run Caddy - the
./caddy/Caddyfile
will mount./dist
and it will be directly accessible viahttps://${BUILD_DOMAIN}
after starting:Building a simulator app
Luckily, this step is much easier than the official IPA build, since you don’t have to sign the package:
Building the official IPA file
Finally, get ready to run the final build step. A few things to note about this:
.p12
file from Keychain Access (using a strong password) on your Mac, and then ensure that password is entered into the script belowIn my experience, during every IPA build, I get prompted for my Mac local user account password ~4 times or so, maybe more.
Managing your distribution certificates
https://www.robincussol.com/build-standalone-expo-apk-ipa-with-turtle-cli/#53-build-ipa https://support.magplus.com/hc/en-us/articles/203808748-iOS-Creating-a-Distribution-Certificate-and-p12-File
You have to export and use your Xcode wildcard p12 certificate. Other certificates don’t seem to work, despite my best efforts.