iOS Builds
This guide covers building NativeScript apps for iPhone, iPad, and the App Store.
Distribution Types
| Type | Use Case | Provisioning |
|---|---|---|
appstore | App Store / TestFlight | App Store Distribution |
adhoc | Direct installation (limited devices) | Ad Hoc Distribution |
enterprise | In-house enterprise apps | Enterprise Distribution |
App Store
For App Store and TestFlight distribution:
norrix build ios release appstoreAd Hoc
For testing on registered devices:
norrix build ios release adhocEnterprise
For in-house enterprise distribution:
norrix build ios release enterprise --team-id ABC123XYZ0Code Signing Options
Option 1: Manual Certificates
Provide your own .p12 certificate and provisioning profile:
norrix build ios release appstore \
--p12 ./certs/distribution.p12 \
--p12-password $P12_PASSWORD \
--profile ./profiles/AppStore.mobileprovisionRequirements:
.p12certificate exported from Keychain.mobileprovisionprofile from Apple Developer Portal- Certificate password
Option 2: App Store Connect API
Use the App Store Connect API for automatic certificate and profile management:
norrix build ios release appstore \
--asc-key-id ABC123DEF4 \
--asc-issuer-id 12345678-1234-1234-1234-123456789012 \
--asc-key ./AuthKey_ABC123.p8Setup:
- Go to App Store Connect → Users and Access → Keys
- Create a new API Key with Admin access
- Download the
.p8file (only downloadable once) - Note the Key ID and Issuer ID
Benefits:
- No manual certificate management
- Automatic profile generation
- Simplified CI/CD setup
Team ID
Your Apple Developer Team ID is required for signing.
Find your Team ID:
- Go to Apple Developer Portal
- Navigate to Membership
- Copy the Team ID (10 alphanumeric characters)
Provide via CLI:
norrix build ios release appstore --team-id ABC123XYZ0Or in config:
// norrix.config.ts
export default defineConfig({
ios: {
teamId: 'ABC123XYZ0',
},
});Configuration File
Store iOS settings in norrix.config.ts:
import { defineConfig } from '@norrix/cli';
export default defineConfig({
ios: {
teamId: 'ABC123XYZ0',
distributionType: 'appstore',
// Option 1: Manual certificates
p12Path: './certs/distribution.p12',
provisioningProfilePath: './profiles/AppStore.mobileprovision',
// Option 2: ASC API (alternative)
// ascApiKeyId: 'ABC123DEF4',
// ascIssuerId: '12345678-1234-1234-1234-123456789012',
// ascPrivateKeyPath: './AuthKey.p8',
},
});Build Artifacts
Successful iOS builds produce:
| Artifact | Description |
|---|---|
.ipa | Signed iOS application package |
.dSYM | Debug symbols for crash reporting |
Artifacts are uploaded to S3 and available in the dashboard.
Debug Builds
For development and debugging:
norrix build ios debugDebug builds:
- Include debug symbols
- Enable debugging features
- Faster build times
Version and Build Number
Specify Version
norrix build ios release appstore --version 1.2.0Specify Build Number
norrix build ios release appstore --build-number 42Auto-Increment
If --build-number is omitted, Norrix automatically increments based on previous builds for the project.
Troubleshooting
Code Signing Failed
- Verify Team ID matches your Apple Developer account
- Check certificate hasn’t expired
- Ensure provisioning profile matches bundle ID
- Confirm profile includes target device (for Ad Hoc)
ASC API Errors
- Verify Key ID and Issuer ID are correct
- Confirm .p8 file hasn’t been modified
- Check API Key has Admin access
Build Number Conflicts
- Use
--build-numberto set explicitly - Each App Store build needs a unique build number
- Build numbers must only increase