-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Is this a support request?
No
Describe the bug
If you use SwiftPM to add LaunchDarkly 5.0.1 to an application, and submit to the app store, it is rejected with
ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
According to https://developer.apple.com/library/archive/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING You can obtain the dynamic libraries the app is expecting via otool -L <AppName>.app/<AppBinary>
. When run on a sample project the output includes:
@rpath/LDSwiftEventSource.framework/LDSwiftEventSource (compatibility version 0.0.0, current version 0.0.0)
However, SwiftPM dependencies use static linking. Consequently, the framework is not included in the resulting application.
To reproduce
Steps to reproduce the behavior.
- Create new project
- Add LaunchDarkly as a dependency as per the README
- Build for Release
- Right click on the app in the Products Group, show in Finder. Right click, "Show Package Contents", in a terminal type
otool -L
and drag the binary onto the terminal, hit enter, observe the@rpath
present.
Expected behavior
No @rpath
present in otool -L
output.
Logs
Full otool -L
output for test project:
/Users/spr/Library/Developer/Xcode/DerivedData/Test_Prjection-gmbxeobrbnbmupazxgnudwaqjzfb/Build/Products/Release-iphoneos/Test Prjection.app/Test Prjection:
@rpath/LDSwiftEventSource.framework/LDSwiftEventSource (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1677.104.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (compatibility version 1.0.0, current version 1061.140.1)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 61000.0.0)
/usr/lib/swift/libswiftCore.dylib (compatibility version 1.0.0, current version 1103.2.25)
/usr/lib/swift/libswiftDispatch.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftFoundation.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 0.0.0)
SDK version
The version of this SDK that you are using.
5.0.1
Language version, developer tools
Xcode 11.6
OS/platform
macOS 10.15.5
Additional context
Add any other context about the problem here.