ios issues - nself-org/nchat GitHub Wiki
Comprehensive troubleshooting guide for iOS deployment and development issues.
- Code Signing Issues
- Build Errors
- Xcode Issues
- CocoaPods Problems
- Provisioning Profile Issues
- App Store Connect Issues
- TestFlight Issues
- Notarization Issues
- Runtime Issues
- Performance Issues
Symptoms:
error: No valid iOS Distribution signing identity found
Solutions:
- Check installed certificates:
security find-identity -v -p codesigning
# Should show:
# "iPhone Distribution: Your Name (TEAM_ID)"-
Download certificate from Apple Developer Portal:
- Go to https://developer.apple.com/account
- Certificates, Identifiers & Profiles
- Download your distribution certificate
- Double-click to install in Keychain
-
Verify certificate in Keychain Access:
- Open Keychain Access
- Look for "iPhone Distribution" certificate
- Ensure private key is present (arrow next to certificate)
- If missing private key, re-create certificate with proper CSR
-
Reset signing:
# Remove duplicate certificates
security delete-certificate -c "iPhone Distribution"
# Re-install certificate
# Double-click downloaded .cer fileSymptoms:
error: Provisioning profile "..." doesn't include signing certificate "..."
Solutions:
-
Regenerate provisioning profile:
- Go to Apple Developer Portal
- Edit the provisioning profile
- Ensure your distribution certificate is selected
- Download and install new profile
-
Install provisioning profile:
# Download from developer portal
# Double-click to install
# Or drag to Xcode icon in Dock
# Verify installation
ls ~/Library/MobileDevice/Provisioning\ Profiles/- Clean Xcode cache:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Developer/Xcode/Archives/*-
Refresh profiles in Xcode:
- Xcode > Preferences > Accounts
- Select your Apple ID
- Click "Download Manual Profiles"
Symptoms:
error: The executable was signed with invalid entitlements.
error: The entitlements specified in your application's Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile.
Solutions:
- Check entitlements file:
cd platforms/capacitor/ios/App/App
cat App.entitlements
# Compare with capabilities in Xcode:
# Target > Signing & Capabilities- Common entitlement mismatches:
Push Notifications:
<!-- App.entitlements -->
<key>aps-environment</key>
<string>production</string> <!-- or development -->Associated Domains:
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:nchat.nself.org</string>
</array>App Groups:
<key>com.apple.security.application-groups</key>
<array>
<string>group.io.nself.chat</string>
</array>-
Regenerate provisioning profile with correct capabilities:
- In Developer Portal, edit App ID
- Ensure all capabilities match your entitlements
- Regenerate provisioning profile
- Download and install
-
Verify capability is enabled in Xcode:
- Target > Signing & Capabilities
- Add missing capabilities
- Match capability settings with entitlements file
Symptoms:
error: Code signing is required for product type 'Application' in SDK 'iOS 17.2'
Solutions:
-
Enable automatic signing (quickest):
- Select App target in Xcode
- Signing & Capabilities tab
- Check "Automatically manage signing"
- Select your Team
-
Configure manual signing:
- Uncheck "Automatically manage signing"
- Select Provisioning Profile: Choose profile
- Ensure Signing Certificate is selected
-
Verify signing settings in build settings:
# Check project.pbxproj
cd platforms/capacitor/ios/App
grep "CODE_SIGN" App.xcodeproj/project.pbxproj
# Should show:
# CODE_SIGN_IDENTITY = "iPhone Distribution";
# CODE_SIGN_STYLE = Automatic; # or Manual
# DEVELOPMENT_TEAM = YOUR_TEAM_ID;Symptoms:
error: Command PhaseScriptExecution failed with a nonzero exit code
Solutions:
-
Check build phase scripts:
- Target > Build Phases
- Expand "Run Script" phases
- Look for error in build log
-
Common script issues:
CocoaPods script:
# Should be present in Build Phases
# If missing, run:
cd platforms/capacitor/ios/App
pod installCapacitor script:
# Ensure Capacitor scripts are present
# Should see: [CP] Copy Pods Resources- Clean and rebuild:
cd platforms/capacitor/ios
rm -rf App/Pods
rm App/Podfile.lock
cd App
pod install
# In Xcode:
# Product > Clean Build Folder (Cmd+Shift+K)
# Product > Build (Cmd+B)- Check script permissions:
# Make scripts executable
chmod +x platforms/capacitor/ios/App/App/build-scripts/*.shSymptoms:
error: Module 'Capacitor' not found
error: Module 'CapacitorCordova' not found
Solutions:
- Reinstall pods:
cd platforms/capacitor/ios/App
rm -rf Pods Podfile.lock
pod deintegrate
pod install- Sync Capacitor:
cd platforms/capacitor
npx cap sync ios- Check Podfile:
# platforms/capacitor/ios/App/Podfile
platform :ios, '14.0'
use_frameworks!
target 'App' do
pod 'CapacitorCordova'
pod 'Capacitor', :path => '../../../node_modules/@capacitor/ios'
# ... other pods
end-
Verify Framework Search Paths:
- Build Settings > Framework Search Paths
- Should include:
$(inherited) - Should include:
${PODS_ROOT}/**
Symptoms:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SomeClass", referenced from:
Solutions:
-
Missing framework:
- Check if required framework is linked
- Target > General > Frameworks, Libraries, and Embedded Content
- Add missing framework
-
Pod installation issue:
cd platforms/capacitor/ios/App
pod deintegrate
pod install --repo-update-
Architecture mismatch:
- Build Settings > Architectures
- Ensure "arm64" is included
- Valid Architectures: arm64
-
Clean derived data:
rm -rf ~/Library/Developer/Xcode/DerivedDataSymptoms:
error: The app ID "io.nself.chat" cannot be registered to your development team. Change your bundle identifier to a unique string.
Solutions:
-
Change bundle identifier:
- Target > General > Identity
- Change Bundle Identifier to:
io.nself.chat.dev - Or:
com.yourcompany.nchat
-
Register App ID in Developer Portal:
- Go to Certificates, Identifiers & Profiles
- Register new App ID with your bundle identifier
- Create provisioning profile for new ID
-
Use personal team for development:
- Signing & Capabilities
- Select "Personal Team" for development
- Use different bundle ID for development builds
Symptoms:
error: unable to find utility "swiftc", not a developer tool or in PATH
Solutions:
- Set command line tools:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcode-select --install- Verify installation:
xcode-select -p
# Should show: /Applications/Xcode.app/Contents/Developer
xcrun --find swiftc
# Should show path to swiftc- Restart Xcode after changing command line tools
Symptoms:
error: Failed to prepare device for development.
error: This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode.
Solutions:
-
Update Xcode:
- Download latest Xcode from App Store
- Or from https://developer.apple.com/download/
-
Download device support files:
- Xcode > Preferences > Components
- Download iOS support files for your device version
-
Manually download support files:
# Download from https://github.com/filsv/iOSDeviceSupport
# Extract to:
~/Library/Developer/Xcode/iOS\ DeviceSupport/-
Restart both Xcode and device:
- Quit Xcode completely
- Restart iPhone/iPad
- Reconnect and trust computer
Symptoms:
- Xcode becomes unresponsive
- "Indexing..." never completes
- High CPU usage
Solutions:
- Delete derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData/*- Delete module cache:
rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex- Disable indexing temporarily:
# Disable
defaults write com.apple.dt.XCODEBuild IDEIndexDisable -bool YES
# Re-enable after cleanup
defaults delete com.apple.dt.XCODEBuild IDEIndexDisable- Restart Xcode and rebuild
Symptoms:
[!] Unable to find a specification for `Capacitor`
Solutions:
- Update CocoaPods repo:
pod repo update- Install pods with repo update:
cd platforms/capacitor/ios/App
pod install --repo-update- Clear CocoaPods cache:
pod cache clean --all
pod deintegrate
pod install- Check Podfile sources:
# Add at top of Podfile
source 'https://cdn.cocoapods.org/'Symptoms:
[!] The platform of the target `App` (iOS 14.0) is not compatible with `SomePod` which has a minimum requirement of iOS 15.0.
Solutions:
- Update platform version:
# Edit Podfile
platform :ios, '15.0' # Increase version- Run pod install:
cd platforms/capacitor/ios/App
pod install-
Update deployment target in Xcode:
- Target > General > Deployment Info
- Set iOS Deployment Target to 15.0
Symptoms:
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
In Podfile:
Firebase/Core (~> 10.0)
Specs satisfying the Firebase/Core dependency were found, but they required a higher minimum deployment target.
Solutions:
- Update minimum deployment target:
# Podfile
platform :ios, '13.0' # Or higher as required- Update pod versions:
# Use specific compatible versions
pod 'Firebase/Core', '~> 9.0' # Use older version- Update all pods:
pod updateSymptoms:
error: Provisioning profile "..." doesn't include signing certificate "..."
Solutions:
-
Download profiles from Developer Portal:
- https://developer.apple.com/account
- Download all provisioning profiles
- Double-click to install
-
Refresh profiles in Xcode:
- Xcode > Preferences > Accounts
- Select Apple ID
- Download Manual Profiles
-
Use automatic signing (recommended for development):
- Target > Signing & Capabilities
- Enable "Automatically manage signing"
- Select Team
Symptoms:
error: Provisioning profile "..." has expired
Solutions:
-
Renew provisioning profile:
- Go to Apple Developer Portal
- Edit expired profile
- Generate new profile
- Download and install
-
Check expiration dates:
# List all profiles and expiration dates
ls ~/Library/MobileDevice/Provisioning\ Profiles/ | while read profile; do
security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/"$profile" | grep -A2 ExpirationDate
done- Delete expired profiles:
# Remove all provisioning profiles
rm ~/Library/MobileDevice/Provisioning\ Profiles/*.mobileprovision
# Download fresh profiles from Xcode or Developer PortalSymptoms:
ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'."
Solutions:
- Add required Info.plist entries:
<!-- Info.plist -->
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>-
Configure in Xcode:
- Target > General > Deployment Info
- Check all orientations for iPad
Symptoms:
ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in 'App.app' can't be transparent nor contain an alpha channel."
Solutions:
-
Fix app icon:
- Remove transparency from icon
- Ensure icon is RGB (not RGBA)
- Size must be exactly 1024x1024
-
Regenerate icons:
# Use tool like app-icon.co or create manually
# Place in:
# ios/App/App/Assets.xcassets/AppIcon.appiconset/
# Or use Capacitor assets
npx @capacitor/assets generate --ios- Verify icon:
# Check if icon has alpha channel
sips -g hasAlpha icon-1024.png
# Should show: hasAlpha: noSymptoms:
ERROR ITMS-90683: "Missing Purpose String in Info.plist. Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCameraUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data."
Solutions:
Add all required usage descriptions to Info.plist:
<!-- Camera -->
<key>NSCameraUsageDescription</key>
<string>nChat needs camera access to take photos and videos to share with your team.</string>
<!-- Photo Library -->
<key>NSPhotoLibraryUsageDescription</key>
<string>nChat needs photo library access to share images with your team.</string>
<!-- Microphone -->
<key>NSMicrophoneUsageDescription</key>
<string>nChat needs microphone access for voice messages and calls.</string>
<!-- Location (if used) -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>nChat can share your location with teammates when you choose.</string>
<!-- Contacts (if used) -->
<key>NSContactsUsageDescription</key>
<string>nChat can import contacts to help you find teammates.</string>
<!-- Face ID -->
<key>NSFaceIDUsageDescription</key>
<string>nChat uses Face ID to securely unlock the app.</string>
<!-- Motion (if used) -->
<key>NSMotionUsageDescription</key>
<string>nChat uses motion data to enhance your experience.</string>Symptoms:
- Build uploaded successfully
- Shows "Processing" status for hours
- Never becomes available for testing
Solutions:
-
Wait longer:
- Normal processing: 10-30 minutes
- Sometimes up to 2 hours
- Check back later before taking action
-
Check for email from Apple:
- Look for processing error emails
- Check spam folder
-
Upload new build:
- Increment build number
- Upload again
-
Contact Apple Support:
- If stuck for 24+ hours
- Use App Store Connect support
Symptoms:
Unable to install "nChat"
This app could not be installed at this time.
Solutions:
-
Check device storage:
- Settings > General > iPhone Storage
- Ensure enough free space
-
Check iOS version:
- Settings > General > About > Software Version
- Must meet minimum deployment target
-
Delete old version:
- Remove existing app from device
- Try installing TestFlight build again
-
Reinstall TestFlight app:
- Delete TestFlight
- Reinstall from App Store
- Try again
Symptoms:
"nchat.app" cannot be opened because the developer cannot be verified.
Solutions:
- Notarize the app:
# Archive app
xcodebuild archive -workspace App.xcworkspace -scheme App -archivePath build/App.xcarchive
# Export for notarization
xcodebuild -exportArchive -archivePath build/App.xcarchive -exportPath build/export -exportOptionsPlist ExportOptions.plist
# Submit for notarization
xcrun notarytool submit build/export/App.ipa \
--apple-id "[email protected]" \
--password "xxxx-xxxx-xxxx-xxxx" \
--team-id "TEAM_ID" \
--wait
# Staple notarization ticket
xcrun stapler staple build/export/App.ipa- Check notarization status:
xcrun notarytool history \
--apple-id "[email protected]" \
--password "xxxx-xxxx-xxxx-xxxx" \
--team-id "TEAM_ID"- View notarization log:
xcrun notarytool log <submission-id> \
--apple-id "[email protected]" \
--password "xxxx-xxxx-xxxx-xxxx" \
--team-id "TEAM_ID"Symptoms:
- App opens briefly then crashes
- Black screen then crashes
- Immediate crash on tap
Solutions:
-
Check crash logs:
- Xcode > Window > Devices and Simulators
- Select device
- View Device Logs
- Find crash log for your app
-
Common crash causes:
Missing framework:
dyld: Library not loaded: @rpath/Framework.framework/Framework
Solution: Embed framework (Target > General > Frameworks)
Entitlement error:
Process launch failed: Security
Solution: Check entitlements match provisioning profile
Code signing issue:
Code signature not valid for use in process
Solution: Re-sign app with correct certificate
- Test in simulator first:
# Build for simulator
xcodebuild -workspace App.xcworkspace \
-scheme App \
-sdk iphonesimulator \
-configuration Debug
# Check console for errorsSymptoms:
- App doesn't register for push
- Notifications don't arrive
- Device token not generated
Solutions:
-
Check capabilities:
- Ensure "Push Notifications" capability is enabled
- Background Modes > Remote notifications enabled
-
Check entitlements:
<!-- App.entitlements -->
<key>aps-environment</key>
<string>development</string> <!-- or production -->-
Verify APNs certificate/key:
- Check certificate is not expired
- Ensure key is uploaded to Firebase/backend
-
Test registration:
// In AppDelegate
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
print("Device Token: \(token)")
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
print("Failed to register: \(error)")
}- Check Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>Solutions:
-
Profile with Instruments:
- Product > Profile (Cmd+I)
- Select "Time Profiler"
- Identify bottlenecks
-
Check memory usage:
- Debug Navigator > Memory
- Look for memory leaks
- Reduce large image sizes
-
Optimize images:
- Use appropriate image sizes
- Compress images
- Use WebP format if possible
-
Enable build optimizations:
- Build Settings > Optimization Level
- Set to "Fastest, Smallest [-Os]" for release
Solutions:
-
Check app size breakdown:
- Xcode > Window > Organizer
- Select archive > App Thinning Size Report
-
Reduce assets:
- Compress images
- Remove unused assets
- Use asset catalogs for app thinning
-
Enable bitcode (if applicable):
- Build Settings > Enable Bitcode = YES
-
Strip debug symbols:
- Build Settings > Strip Debug Symbols = YES (Release)
- Apple Developer Documentation
- Apple Developer Forums
- Xcode Help
- CocoaPods Troubleshooting
- Capacitor iOS Troubleshooting
Document Version: 1.0.0 Last Updated: January 2026 Maintained By: nChat Team
For urgent issues, contact: [email protected]