Si vous travaillez sur MacOS avec Ionic / Cordova et que des erreurs apparaissent, voici la solution pour certaines d'entre elles... ;)

-1-

Code Signing Error: {App} has conflicting provisioning settings. and
Error: Error code 65 for command: xcodebuild with args... :
Dans XCode, sélectionnez votre application (Target = Votre App), puis dans les configurations, onglet General, partie Signing, déselectionnez Automatically manage signing puis resélectionnez de nouveau, en choisissant la Team.

-2-

Error: archive not found at path '/Users/path-to-app/platforms/ios/demoapp.xcarchive':
Lancez la commande de build comme ceci:

ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"

cordova build ios --prod --buildFlag="-UseModernBuildSystem=0"

-3-

'FBSDKCoreKit/FBSDKCoreKit.h' file not found in XCode:
Il faut mettre à jour la stack Cordova de votre projet:

  • installez la dernière version de cordova npm install -g cordova (Shall install the version 9.0.0 or higher)
  • installez la dernière version de cordova-ios npm install cordova-ios (Shall install the version 5.0.1 or higher)
  • supprimez la plateforme ios ionic cordova platform rm ios
  • ajoutez de nouveau la plateform ios ionic cordova platform add ios

Des infos utiles si nécessaire https://github.com/jeduan/cordova-plugin-facebook4/issues/795

-4-

Error: Error code 65 for command: xcodebuild with args with previous deprecation message:
Si vous construisez l'app avec le flag -UseModernBuildSystem=0, enlevez le.

-5-

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Suivre les étapes de https://stackoverflow.com/a/22878202/8538908.

-6-

No NSLocationWhenInUseUsageDescription defined in ...info.plist in XCode:
Ajoutez les lignes suivantes dans 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:
Message d'erreur complet: PositionError {code: 3, message: "Position retrieval timed out.", PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}

Dans le fichier platforms/ios/<project>/Plugins/cordova-plugin-geolocation/CDVLocation.m, modifier les lignes suivantes:

if (enableHighAccuracy) {
    __highAccuracyEnabled = YES;
    self.locationManager.distanceFilter = 5;
}

par:

self.locationManager.distanceFilter = kCLDistanceFilterNone;

Adaptez les lignes en fonction de votre configuration High Accuracy.

-8-

ITMS-90737: Missing Document Configuration:
Message complet: 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/.
Pour résoudre cette erreur, il faut ajouter les lignes suivantes au fichier info.plist comme indiquer dans le message:

Si votre app utilise UIDocumentInteractionController:

<key>UISupportsDocumentBrowser</key>
<true/>

Dans le cas contraire:

<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>

-9-

ITMS-90788: Incomplete Document Type Configuration
Message complet: 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.
Pour résoudre cette erreur, ajoutez les lignes suivantes suivant le modèle:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>MKDirectionsRequest</string>
        <key>LSHandlerRank</key>            <!-- Nouvelle ligne à ajouter -->
        <string>Alternate</string>          <!-- Valeur pouvant être Owner, Default or Alternate -->
        <key>LSItemContentTypes</key>
        <array>
            <string>com.apple.maps.directionsrequest</string>
        </array>
    </dict>
</array>

En espérant que ces éléments de réponses vous soit utiles, je vous dis à plus pour le prochain article. xD

Article précédent Article suivant


Ajouter un commentaire