10 KiB
iOS Release (.ipa) Build Instructions
Note: This guide explains how to build the native iOS release app (
.ipa) locally on your Mac using Xcode command-line tools and CocoaPods, without using cloud EAS build.
Prerequisites on Mac (One-Time Setup)
Before building, make sure your Mac has:
- Xcode (Download free from Mac App Store).
- Xcode Command Line Tools:
xcode-select --install sudo xcode-select -s /Applications/Xcode.app/Contents/Developer - CocoaPods (Dependency manager for iOS native libraries):
brew install cocoapods - Node.js & Watchman:
brew install node watchman
Step 1: Prebuild the iOS Native Project
Run this in your project root to generate the native ios/ directory, Podfile, and Xcode workspace:
cd ~/acupedia_mobile_ui
npx expo prebuild --platform ios
Step 2: Install CocoaPods Dependencies
Navigate into the generated ios/ folder and install the native iOS pods:
cd ios
pod install
cd ..
Step 3: Configure Code Signing (One-Time Setup in Xcode)
Apple requires all iOS binaries to be signed with an Apple ID or Apple Developer certificate (unlike Android which uses a local .keystore file).
-
Open the project in Xcode:
open ios/acupedia.xcworkspace(Important: Always open
.xcworkspace, never.xcodeproj) -
In the left file navigator, select the top-level
acupediaproject. -
In the center pane, select the
acupediaTarget and go to theSigning & Capabilitiestab. -
Check Automatically manage signing.
-
In the Team dropdown, select your Apple ID / Developer Team (click Add an Account... if not logged in).
-
Confirm the Bundle Identifier matches:
com.anonymous.acupedia.
Step 4: Understanding Export Methods in ExportOptions.plist
In ExportOptions.plist, the <key>method</key> defines how the .ipa is signed and who can install it:
| Method | What it is | When to Use | Requirements |
|---|---|---|---|
development |
Signed for local developer devices. | Recommended for your testing. Install directly on your Mac or your own connected iPhone. | Free personal Apple ID or paid Developer account. |
ad-hoc |
Signed for external tester devices without App Store. | When sending the .ipa file to outside clients/testers to test on their own iPhones. |
Paid Apple Developer Account ($99/yr) + recipient device UDIDs must be registered in Apple Developer portal. |
app-store |
Production release signed for Apple's servers. | Uploading to TestFlight or the Apple App Store. | Paid Apple Developer Account. Cannot be installed directly on a phone via USB. |
Which should you select?
- For local testing on your own iPhone or simulator: Select
development. - For sharing with remote testers outside your office: Select
ad-hoc(or upload to TestFlight usingapp-store).
Create the file ios/ExportOptions.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>development</string>
<key>signingStyle</key>
<string>automatic</string>
<key>stripSwiftSymbols</key>
<true/>
<key>compileBitcode</key>
<false/>
</dict>
</plist>
Step 5: Build the Release .ipa
You can build either via Terminal (CLI) or Xcode (GUI):
Method A: Terminal CLI (Equivalent to ./gradlew assembleRelease)
Run the following commands:
cd ~/acupedia_mobile_ui/ios
# 1. Clean and Archive the Release build
xcodebuild -workspace acupedia.xcworkspace \
-scheme acupedia \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath build/acupedia.xcarchive \
archive
# 2. Export the .ipa file
xcodebuild -exportArchive \
-archivePath build/acupedia.xcarchive \
-exportOptionsPlist ExportOptions.plist \
-exportPath build/ipa
Your generated iOS release file will be located at:
📁 ios/build/ipa/acupedia.ipa
Method B: Xcode GUI Archive (1-Click Export)
- In Xcode, in the top destination bar, select Any iOS Device (arm64).
- In the top menu bar, click Product → Archive.
- When the compilation finishes, the Organizer window opens automatically.
- Click Distribute App:
- Select Development (for connected phones) or Ad Hoc (for remote testers) or App Store Connect (for TestFlight).
- Click Next through the signing steps and click Export.
- Xcode saves the
acupedia.ipato your chosen destination folder.
Step 6: How to Install the .ipa File on an iPhone
Unlike Android where you can simply tap an APK to install it, iOS requires a trusted installation method:
Method 1: Using Mac Finder (Fastest via USB)
- Connect your iPhone to your Mac using a lightning/USB-C cable.
- Open Finder on your Mac and select your iPhone under Locations in the left sidebar.
- If prompted on the iPhone, tap "Trust This Computer" and enter your passcode.
- Simply drag and drop the
acupedia.ipafile directly onto the iPhone window in Finder. - The app will install on your iPhone home screen within 10–20 seconds.
Method 2: Using Xcode Devices Window (USB)
- Connect your iPhone to your Mac.
- In Xcode, go to the top menu: Window → Devices and Simulators (or press
Cmd + Shift + 2). - Under Connected, select your iPhone.
- Under the Installed Apps section, click the
+(plus) icon. - Select
acupedia.ipaand click Open. The app installs immediately.
Method 3: Wireless Over-The-Air (OTA) Link for Remote Testers
If you built with ad-hoc and want to send the app to a remote tester without cables:
- Open free distribution services like Diawi.com or InstallOnAir.com.
- Upload
acupedia.ipa. - Share the generated link or QR code with the tester.
- The tester opens the link in Safari on their iPhone and taps Install. (Note: Requires the tester's iPhone UDID to be registered in your Apple Developer Account).
Method 4: Sideloadly (When Mac & iPhone are in Different Locations & Using Free Apple ID)
If the Mac and iPhone are in different locations and you do not have a paid Apple Developer Account ($99/year), you can send the raw .ipa file directly to the tester, and they can install it using their own computer (Windows PC or Mac) with Sideloadly:
- Send the file: Send
acupedia.ipato the remote user via Google Drive, WeTransfer, or Telegram. - Download Sideloadly: On their computer (Windows or Mac), have them download and install Sideloadly (Free).
- Connect iPhone: Connect the iPhone to their computer using a USB cable. If prompted on the iPhone, tap "Trust This Computer" and enter the passcode.
- Open Sideloadly:
- Sideloadly will automatically detect the connected device.
- Drag and drop
acupedia.ipainto the IPA icon box on Sideloadly. - In the Apple ID field, have the user enter their own personal Apple ID (email).
- Click "Start".
- Installation: Sideloadly signs the application using their Apple ID and installs it directly onto their iPhone within 1–2 minutes!
- First Launch: The user must then complete Step 7 below (Trust Developer & Developer Mode) to open the app.
Method 5: 3uTools (Windows PC Alternative)
If the remote tester uses a Windows PC:
- Send
acupedia.ipato the tester. - The tester installs 3uTools (Free) on their Windows PC.
- Connect iPhone to PC via USB cable.
- In 3uTools, go to Apps → Click "Import & Install IPA".
- Select
acupedia.ipaand it installs directly onto the connected iPhone.
Method 6: Apple TestFlight (Official Remote Distribution)
If you have a paid Apple Developer Account:
- Build with
<string>app-store</string>. - Upload using the free Transporter app on your Mac.
- In App Store Connect → TestFlight, enter the tester's email address.
- The tester receives an invitation email and installs the app via the free Apple TestFlight app from the App Store (no cables, no UDID required).
Step 7: Required iPhone Permissions & Settings (Must-Do on Phone)
When launching the app for the first time, iOS security will block it until you enable these two settings:
1. Trust the Developer Certificate ("Untrusted Developer" Alert)
If you tap the app and see:
"Untrusted Enterprise Developer / Untrusted Developer: Your device needs to trust this developer before opening."
Fix:
- On your iPhone, open Settings → General → VPN & Device Management.
- Under Developer App, tap your Apple ID / Email.
- Tap "Trust [Your Email / Name]" and confirm.
2. Enable Developer Mode (iOS 16, 17, 18+)
On iOS 16 or newer, Apple blocks developer-installed apps until Developer Mode is toggled:
- On your iPhone, open Settings → Privacy & Security.
- Scroll to the very bottom and tap Developer Mode.
- Toggle Developer Mode to ON.
- Tap Restart when prompted.
- After reboot, unlock your phone and tap Turn On, then enter your device passcode.
Troubleshooting Common iOS Build Issues
| Issue | Cause | Solution |
|---|---|---|
| "No signing certificate found" | Xcode has no Apple ID account configured. | Go to Xcode → Settings (or Preferences) → Accounts → Click + and sign in with your Apple ID. |
| "The maximum number of apps for free development profiles has been reached" | Apple limits free Apple IDs to 3 active sideloaded apps. | Delete any old test apps from your iPhone before installing, or use a paid Apple Developer Account. |
| App certificate expires after 7 days | Free personal Apple IDs only grant 7-day provisioning profiles. | Rebuild and re-install with Xcode after 7 days, or sign with a paid Apple Developer account ($99/year) which lasts 1 year. |
| "App Transport Security (ATS) blocked cleartext HTTP" | App is trying to access an insecure http:// URL. |
Ensure .env uses https://api.acupedia.in (already configured). iOS strictly requires HTTPS. |
CocoaPods error during pod install |
CocoaPods cache is out of date. | Run cd ios && pod cache clean --all && pod install --repo-update && cd ... |