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

dylib #23 could not be loaded #1949

Closed
XericDesign opened this issue Sep 28, 2022 · 23 comments
Closed

dylib #23 could not be loaded #1949

XericDesign opened this issue Sep 28, 2022 · 23 comments
Labels

Comments

@XericDesign
Copy link

XericDesign commented Sep 28, 2022

RCConfigurationBuilder* configuration = [RCConfiguration builderWithAPIKey:kRevenueCatAPIKey];
configuration = [configuration withAppUserID:myAppUserID];
[RCPurchases configureWithConfiguration:[configuration build]];

I am seeing:

dyld: lazy symbol binding failed: can't resolve symbol _$sScMMa in /...RevenueCat.framework/Versions/A/RevenueCat because dependent dylib #23 could not be loaded
dyld: can't resolve symbol _$sScMMa in /.../RevenueCat.framework/Versions/A/RevenueCat because dependent dylib #23 could not be loaded
(lldb)

I am using Xcode 12.4 on Catalina, writing in Cocoa on macOS and RevenueCat 4.13

@RCGitBot
Copy link
Contributor

RCGitBot commented Sep 28, 2022

👀 SDKONCALL-136 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@NachoSoto
Copy link
Contributor

Xcode 13.2 is required. Could you try with that and let us know if you encounter the same issue?

@XericDesign
Copy link
Author

Yes, it works there. What is the last version of RC that supports 10.15?

@NachoSoto
Copy link
Contributor

RC 4.13 supports macOS 10.15.
You can see the compatibility table between version 3.x and 4.x of the SDK here.

@XericDesign
Copy link
Author

XericDesign commented Sep 28, 2022

Ah - what is the last version of RC that supports Xcode 12.4 (the last version to run on 10.15)? The last version of 3.x?

@NachoSoto
Copy link
Contributor

The last 3.x version should support it :)

@XericDesign
Copy link
Author

This is very odd since RC 4.11.0 works fine in Xcode 12.4 running on 10.15.17.

The bug started in RC 4.12.1

@NachoSoto
Copy link
Contributor

How are you compiling the SDK?

@XericDesign
Copy link
Author

XericDesign commented Sep 28, 2022

I'm not. I am downloading the RevenueCat.framework.zip and opening it up. I am using the dSYM and framework files from within the Carthage/Build/Mac folder and copying those two files into my project's source folders.

This bug is happening when running my app that contains the RC framework. It all works fine with 4.11

@NachoSoto
Copy link
Contributor

Which SDK and deployment target are you compiling for when you get this failure?

@XericDesign
Copy link
Author

Everything works in Xcode 12.4, RC 4.11 running on 10.15.7 and deploying to 10.15.

When I update to RC 4.12.1 or later, I get this error when running my app. There are no compile-time errors.

@NachoSoto
Copy link
Contributor

We're going to need more information to be able to help you.
Please let us know more about your app: what platform are you building for? iOS? macOS? What's the deployment target?

@XericDesign
Copy link
Author

Building for macOS with Xcode 12.4 on 10.15.7. SDK is 10.15, deployment target macOS 10.15.

@NachoSoto
Copy link
Contributor

This is weird:

$ xcrun swift-demangle _$sScMMa
_ ---> _

@XericDesign
Copy link
Author

Also note that my app is entirely Cocoa with no Swift code. I am just embedding the framework and it all worked fine until I moved past RC 4.11.

@NachoSoto
Copy link
Contributor

To be honest I don't understand how it was working before. We had to move to Xcode 13.2 because the SDK uses async / await.
I recommend either updating your machine or downgrading to RC 3.14.2.

@NachoSoto
Copy link
Contributor

NachoSoto commented Sep 28, 2022

For reference (thanks @Keith), looks like this is pointing to /usr/lib/swift/libswiftXPC.dylib, or maybe libswift_Concurrency.dylib, which would explain why it's not working from an Xcode prior to 13.2:

$ otool -L ~/Downloads/Carthage/Build/Mac/RevenueCat

@rpath/RevenueCat.framework/Versions/A/RevenueCat (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AdServices.framework/Versions/A/AdServices (compatibility version 1.0.0, current version 1.0.0, weak)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1858.112.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 1311.100.3)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2113.40.126)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/StoreKit.framework/Versions/A/StoreKit (compatibility version 1.0.0, current version 379.0.0)
/usr/lib/swift/libswiftAppKit.dylib (compatibility version 1.0.0, current version 109.0.0, weak)
/usr/lib/swift/libswiftCore.dylib (compatibility version 1.0.0, current version 5.6.0)
/usr/lib/swift/libswiftCoreData.dylib (compatibility version 1.0.0, current version 19.0.0, weak)
/usr/lib/swift/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 14.0.0, weak)
/usr/lib/swift/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 2.0.0, weak)
/usr/lib/swift/libswiftCoreImage.dylib (compatibility version 1.0.0, current version 2.0.0, weak)
/usr/lib/swift/libswiftDarwin.dylib (compatibility version 1.0.0, current version 0.0.0, weak)
/usr/lib/swift/libswiftDispatch.dylib (compatibility version 1.0.0, current version 11.0.0)
/usr/lib/swift/libswiftFoundation.dylib (compatibility version 1.0.0, current version 72.105.0)
/usr/lib/swift/libswiftIOKit.dylib (compatibility version 1.0.0, current version 1.0.0, weak)
/usr/lib/swift/libswiftMetal.dylib (compatibility version 1.0.0, current version 261.13.0, weak)
/usr/lib/swift/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 3.0.0)
/usr/lib/swift/libswiftQuartzCore.dylib (compatibility version 1.0.0, current version 3.0.0, weak)
/usr/lib/swift/libswiftXPC.dylib (compatibility version 1.0.0, current version 1.1.0, weak)
/usr/lib/swift/libswiftos.dylib (compatibility version 1.0.0, current version 1023.0.0, weak)
@rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 5.6.0, weak)

@keith
Copy link

keith commented Sep 28, 2022

If it is the concurrency dylib it could be because that's not being copied into the bundle, or the rpaths on the binary don't point to its correct location, so that one would likely make more sense to be the issue

@XericDesign
Copy link
Author

This project is in the late stages and after release will move to Monterey and a newer Xcode. Just pointing out that something changed between RC 4.11 and RC 4.12.1

@NachoSoto
Copy link
Contributor

A lot of things changed between those 2 versions 😇

@XericDesign
Copy link
Author

I'll stick with 4.11 and move forward with the switch to Monterey and Xcode 13/14.

@NachoSoto
Copy link
Contributor

That makes sense 👍🏻
Let us know if you run into any issues!

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants