Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10885

`LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"` missing from iOS `release` builds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0, 4.1.0
    • None
    • cordova-ios

    Description

      With Cordova iOS 4.0 and higher, the Xcode project only sets `LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"` for `debug` and not for `release` builds. This means the app won't be able to find embedded frameworks at run time. One consequence is that apps with plugins written in Swift will fail because these depend on the Swift core library:

      ```
      dyld: Library not loaded: @rpath/libswiftCore.dylib
      Referenced from: /var/mobile/Containers/Bundle/Application/B862070D-86B6-4CCB-A484-1A53FBFDB59B/mobileapp.app/mobileapp
      Reason: image not found
      ```

      It seems the issue results from the changes made in [this commit](https://github.com/apache/cordova-ios/commit/2a54fc1b0cd92887fd47af8ef3dfb9de805cc188), where build settings were split-off from `.pbxproj` to `.xcconfig` files. This removed `LD_RUNPATH_SEARCH_PATHS` from the `release` but not the `debug` configuration.

      As a workaround, I now set `LD_RUNPATH_SEARCH_PATHS` in `build-extras.xcconfig`, but this should obviously be fixed in the platform itself.

      Should this be added back to `.pbxproj`? Or should it be moved to `build.xcconfig`?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              martijnwalraven Martijn Walraven
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: