Ionic / MacOS: The errors that can occur...
17, December 2019If you works on MacOS with Ionic / Cordova and you have some errors, here is a solution for some of them...
-1-
Code Signing Error: {App} has conflicting provisioning settings. and
Error: Error code 65 for command: xcodebuild with args... :
In XCode, select your app (Target = Your App), then in configurations, and General tab, Signing section, unselect Automatically manage signing then select it again, by choosing the Team.
-2-
Error: archive not found at path '/Users/path-to-app/platforms/ios/demoapp.xcarchive':
Execute the build command as follow:
ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"
cordova build ios --prod --buildFlag="-UseModernBuildSystem=0"
-3-
'FBSDKCoreKit/FBSDKCoreKit.h' file not found in XCode:
You shall update the Cordova framework in your project:
- install the last version of cordova
npm install -g cordova
(Shall install the version 9.0.0 or higher) - install the last version of cordova-ios
npm install cordova-ios
(Shall install the version 5.0.1 or higher) - delete the ios platform
ionic cordova platform rm ios
- add the ios platform again
ionic cordova platform add ios
Mor information in this article: https://github.com/jeduan/cordova-plugin-facebook4/issues/795
-4-
Error: Error code 65 for command: xcodebuild with args with previous deprecation message:
If you build the app with -UseModernBuildSystem=0
, remove it.
-5-
The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Follow the steps https://stackoverflow.com/a/22878202/8538908.
-6-
No NSLocationWhenInUseUsageDescription defined in ...info.plist in XCode:
Add the following lines in config.xml
<edit-config file="*-Info.plist" mode="merge" platform="ios" target="NSLocationWhenInUseUsageDescription">
<string>Need location access to locate me</string>
</edit-config>
-7-
Position retrieval timed out. in Console of the App Webview:
Full error message: PositionError {code: 3, message: "Position retrieval timed out.", PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}
In the file platforms/ios/<project>/Plugins/cordova-plugin-geolocation/CDVLocation.m
, change the following lines:
if (enableHighAccuracy) {
__highAccuracyEnabled = YES;
self.locationManager.distanceFilter = 5;
}
by:
self.locationManager.distanceFilter = kCLDistanceFilterNone;
Adapt the lines according your configuration of High Accuracy
.
-8-
ITMS-90737: Missing Document Configuration:
Full message: By declaring the CFBundleDocumentTypes key in your app, you've indicated that your app is able to open documents. Please set the UISupportsDocumentBrowser key to "YES" if your app uses a UIDocumentBrowserViewController. Otherwise, set the LSSupportsOpeningDocumentsInPlace key in the Info.plist to "YES" (recommended) or "NO" to specify whether the app can open files in place. All document-based apps must include one of these configurations. For more information, visit https://developer.apple.com/document-based-apps/.
To resolve this issue, you shall add the following lines in Info.plist
file as notified in message:
If you app use UIDocumentInteractionController
:
<key>UISupportsDocumentBrowser</key>
<true/>
In otherwise:
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
-9-
ITMS-90788: Incomplete Document Type Configuration
Full Message: The CFBundleDocumentTypes dictionary array in the '-Your app-' Info.plist should contain an LSHandlerRank value for the CFBundleTypeName 'MKDirectionsRequest' entry. Refer to https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW1 for more information on the LSHandlerRank key.
To resolve this issue, add the following lines according sample:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>MKDirectionsRequest</string>
<key>LSHandlerRank</key> <!-- New line to add -->
<string>Alternate</string> <!-- Can be Owner, Default or Alternate -->
<key>LSItemContentTypes</key>
<array>
<string>com.apple.maps.directionsrequest</string>
</array>
</dict>
</array>
I hope that it is useful for you and I see you in the next article.
Add a comment