apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 986 forks source link

cordova platform add iOS - generates all sorts of (error?) messages. What does it all mean? #1460

Closed geoidesic closed 3 months ago

geoidesic commented 3 months ago

I don't understand any of this output from cordova platform add ios. Did it fail? Did it succeed? Is there action required from me? Why is it generating an Xcode base where all these notices (whatever they mean) are necessary?

Installing "@havesource/cordova-plugin-push" for ios

[!] The Sportch [Debug] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Sportch/Pods-Sportch.debug.xcconfig'. This can lead to problems with the CocoaPods installation

[!] The Sportch [Release] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Sportch/Pods-Sportch.release.xcconfig'. This can lead to problems with the CocoaPods installation
Platform 'browser' found in config.xml... Migrating it to package.json
config file app/src/main/AndroidManifest.xml requested for changes not found at /Users/noeldacosta/code/SportchLegacyApp-CLMP/app/SportchLegacyApp/cordova/build/platforms/ios/app/src/main/AndroidManifest.xml, ignoring

[!] The Sportch [Debug] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Sportch/Pods-Sportch.debug.xcconfig'. This can lead to problems with the CocoaPods installation

[!] The Sportch [Release] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Sportch/Pods-Sportch.release.xcconfig'. This can lead to problems with the CocoaPods installation
config file app/src/main/AndroidManifest.xml requested for changes not found at /Users/noeldacosta/code/SportchLegacyApp-CLMP/app/SportchLegacyApp/cordova/build/platforms/ios/app/src/main/AndroidManifest.xml, ignoring
config file app/src/main/AndroidManifest.xml requested for changes not found at /Users/noeldacosta/code/SportchLegacyApp-CLMP/app/SportchLegacyApp/cordova/build/platforms/ios/app/src/main/AndroidManifest.xml, ignoring
IOS project Code Sign Entitlements now set to: Sportch/Resources/Sportch.entitlements
Entitlements file is not in references section, adding it
breautek commented 3 months ago

The LD_RUNPATH_SEARCH_PATHS are warnings not errors. But it means that the app is overriding the build setting that CocoaPods is using, and as a result if you have any pods installed that relies on setting a value in LD_RUNPATH_SEARCH_PATHS then the build might not work properly.

It's a warning because it won't necessary cause a build failure but it does indicate a configuration problem that might cause build failures. If you're build is not failing it can likely be safely ignored. The warning is mostly caused by a plugin that is setting and overriding existing values of LD_RUNPATH_SEARCH_PATHS.

config file app/src/main/AndroidManifest.xml requested for changes not found at /Users/noeldacosta/code/SportchLegacyApp-CLMP/app/SportchLegacyApp/cordova/build/platforms/ios/app/src/main/AndroidManifest.xml, ignoring config file app/src/main/AndroidManifest.xml requested for changes not found at /Users/noeldacosta/code/SportchLegacyApp-CLMP/app/SportchLegacyApp/cordova/build/platforms/ios/app/src/main/AndroidManifest.xml, ignoring

This is also a warning but indicates that a plugin (or your app's config.xml) contains a edit-config directive attempting to modify AndroidManifest.xml and is being used outside of their <platform name="android"> block, which means it's running for all platforms, including the iOS platform. Obviously this isn't good because AndroidManifest.xml is an android file, it doesn't make sense to make modifications to it on the iOS platform. The file doesn't even exist on the iOS platform. Any platform-specific <edit-config> should be within their respective platform blocks.

<widget ...>
  ...
  <!-- This is bad, it will run for every platform -->
  <edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
    ...
  </edit-config>

  <platform name="android">
    <!-- This is good, the edit will only run on android platform -->
    <edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
      ...
    </edit-config>
  </platform>
</widget>

I'm closing the issue because it doesn't describe any bugs with cordova-ios but hopefully the above answers your questions.