๐ iOS Deployment
This guide will walk you through the process of building and submitting your Shipnative application to the Apple App Store. Shipnative leverages Expo Application Services (EAS) to simplify the complexities of iOS development and deployment.
Prerequisites
Before you begin, ensure you have:
- An Apple Developer Program membership.
- Xcode installed on a macOS machine (required for local builds and simulator testing).
- EAS CLI installed (
npm install -g eas-cli).
- Your appโs Bundle Identifier configured (e.g.,
com.yourcompany.yourapp) during yarn setup.
Ensure your app.json file (located in apps/app/app.json) is correctly configured for iOS. Key properties include:
expo.name: Your appโs display name.
expo.slug: A URL-friendly name for your app.
expo.version: Your appโs version string (e.g., โ1.0.0โ).
expo.ios.bundleIdentifier: Your unique iOS bundle ID (e.g., com.yourcompany.yourapp).
expo.ios.buildNumber: Your appโs build number (increment this for each new build).
{
"expo": {
"name": "My Shipnative App",
"slug": "my-shipnative-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yourcompany.yourapp", // IMPORTANT: Your unique bundle ID
"buildNumber": "1" // Increment this for each new build
},
"android": {
// ... Android specific configurations
},
"web": {
// ... Web specific configurations
},
"plugins": [
"expo-router",
[
"expo-notifications",
{
"icon": "./assets/notification-icon.png",
"color": "#000000"
}
]
],
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "YOUR_EAS_PROJECT_ID" // Replace with your EAS Project ID
}
}
}
}
If you ran yarn setup, your bundleIdentifier and other basic iOS settings should already be configured.
2. Create an EAS Build Profile
EAS Build uses profiles to define how your app is built. Youโll typically have development, preview, and production profiles.
Open eas.json (in your shipnativeapp/ directory) and ensure you have a production profile for iOS:
{
"cli": {
"version": ">= 3.13.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
}
},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
}
},
"production": {
"autoIncrement": true,
"env": {
"APP_ENV": "production"
},
"ios": {
"resourceClass": "m-medium"
}
}
},
"submit": {
"production": {
"ios": {
"appleId": "your-apple-id@example.com", // Your Apple ID email
"ascAppId": "YOUR_APP_STORE_CONNECT_APP_ID", // Optional: Your App Store Connect App ID
"sku": "com.yourcompany.yourapp", // Your app's SKU
"teamId": "YOUR_APPLE_DEVELOPER_TEAM_ID" // Your Apple Developer Team ID
}
}
}
}
Replace your-apple-id@example.com, YOUR_APP_STORE_CONNECT_APP_ID, and YOUR_APPLE_DEVELOPER_TEAM_ID with your actual Apple Developer credentials.
3. Generate an iOS Build
To create a production-ready .ipa file for the App Store, use the EAS CLI:
cd shipnativeapp
eas build --platform ios --profile production
This command will:
- Start a new build on EAS servers.
- Handle code signing, provisioning profiles, and certificates automatically (if configured in EAS).
- Produce an
.ipa file upon successful completion.
You can monitor the build status in your terminal or on the EAS Dashboard.
4. Submit to App Store Connect
Once your build is complete and you have the .ipa file, you can submit it to App Store Connect using EAS Submit:
cd shipnativeapp
eas submit --platform ios --latest --profile production
This command will:
- Prompt you for your Apple Developer credentials (if not already configured in
eas.json).
- Upload the latest successful production build to App Store Connect.
- Create a new version in App Store Connect if one doesnโt exist.
Alternatively, you can download the .ipa file from the EAS Dashboard and upload it manually using Xcodeโs Organizer or Transporter app.
5. Prepare for Review in App Store Connect
After successful submission, log in to App Store Connect to:
- Add metadata (app description, keywords, screenshots).
- Configure pricing and availability.
- Select the build you just uploaded for review.
- Provide any necessary review notes.
Troubleshooting
- Build Failures: Check the EAS build logs carefully for error messages. Common issues include incorrect bundle identifiers, missing credentials, or syntax errors in
app.json.
- Submission Errors: Ensure your
eas.json submit profile is correctly configured with your Apple ID, team ID, and SKU. Verify that your app version and build number are incremented for new submissions.
- Push Notifications: If youโre using push notifications, ensure youโve enabled the capability in your Apple Developer account and configured your
app.json as described in the Push Notifications guide.
Resources