Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftPM Results in Binary Rejection on Submission to Apple #216

Closed
spr opened this issue Jul 31, 2020 · 4 comments
Closed

SwiftPM Results in Binary Rejection on Submission to Apple #216

spr opened this issue Jul 31, 2020 · 4 comments

Comments

@spr
Copy link

spr commented Jul 31, 2020

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.

  1. Create new project
  2. Add LaunchDarkly as a dependency as per the README
  3. Build for Release
  4. 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.

@gwhelanLD
Copy link
Contributor

Hi @spr,

Thanks for the issue report! We appreciate you giving the new major release a try, and letting us know about this app store submission rejection. We'll start looking into this right away to get a 5.1 release out to correct this issue.

Thanks,
@gwhelanLD

gwhelanLD added a commit that referenced this issue Aug 4, 2020
## [5.1.0] - 2020-08-04

### Added
- The ability to specify additional headers to be included on HTTP requests to LaunchDarkly services using `LDConfig.additionalHeaders`. This feature is to enable certain proxy configurations, and is not needed for normal use.
- Support for building docs with [jazzy](https://github.com/realm/jazzy). These docs will be available through [GitHub Pages](https://launchdarkly.github.io/ios-client-sdk/).
### Fixed
- SDK causing nested bundles in archived product when including the SDK through Carthage. This caused rejections when submitted to the App Store. Thanks to @spr for reporting ([#217](#217)).
- SDK causing application to expect LDSwiftEventSource dynamic framework when built with SwiftPM, which does not include the dynamic framework in the resulting application. This causes the application to be rejected when submitted to the App Store. Thanks to @spr for reporting ([#216](#216)).
@gwhelanLD
Copy link
Contributor

Hi @spr,

We've just released 5.1.0 which should resolve this issue. Please give it a try and let us know if you run into any issues.

Thanks!
@gwhelanLD

@spr
Copy link
Author

spr commented Aug 4, 2020

The otool -L output looks good to me. I'm not actively using SwiftPM (it was a fallback because of the carthage issue), so not in a great place to validate the app store submission side.

@gwhelanLD
Copy link
Contributor

Closing this for now, thanks for taking a look even though you didn't plan to use SwiftPM.

Thanks,
@gwhelanLD

keelerm84 added a commit that referenced this issue Dec 7, 2022
After much discussion and debate about how backwards compatibility
concerns would be addressed, we have decided that we are going to keep
the name anonymous and abandon transient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants