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

Pods Fix - Move AuthenticationServices to weak_framework section #253

Merged
merged 3 commits into from
Jan 11, 2019

Conversation

ivabra
Copy link
Contributor

@ivabra ivabra commented Jan 10, 2019

Changes

Moved AuthenticationServices framework dependency from s.ios.frameworks to s.ios.weak_framework section of Auth0.podspec file.

References

AuthenticationServices framework is available only since iOS 12 and above. Putting it in the s.ios.frameworks section makes it required for linking which is a cause ofdyld error like:

dyld: Library not loaded: /System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices
  Referenced from: /Users/.../Library/Developer/CoreSimulator/Devices/.../data/Containers/Bundle/Application/.../SampleApp.app/Frameworks/Lock.framework/Lock
  Reason: image not found

The solution is to link AuthenticationServices.framework weakly, so it won't be linked for apps that are being run on iOS older than 12.0.

Podspec reference:
https://guides.cocoapods.org/syntax/podspec.html#weak_frameworks

Same issue:
adjust/ios_sdk#42

Apple docs:
https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

Testing

  • Create a sample iOS project.
  • Integrate Auth0 using Podfile and pod install command.
  • Run the project on a simulator with iOS lower than 12.0.
  • Without the fix the app will be crashed with dyld: Library not loaded: ... Reason: image not found.

Checklist

To prevent a crash when it's being integrated into apps with iOS 11 and lower support.
@cocojoe
Copy link
Member

cocojoe commented Jan 10, 2019

Thanks this is most helpful, I did wonder how Pods will handle weak linking and should have looked at this in more detail vs presuming CocoaPod will just magically take care of it.

Annoyingly there seems to be a new HomeBrew bug being thrown up and I need tests to pass. Would you mind adding:

HOMEBREW_LOGS=~/homebrew-logs
HOMEBREW_TEMP=~/homebrew-temp

To the CI Env please https://github.com/auth0/Auth0.swift/blob/master/.circleci/config.yml#L6

Issue Reference: Homebrew/brew#5513

Thanks

To pass CI tests.
@ivabra
Copy link
Contributor Author

ivabra commented Jan 10, 2019

@cocojoe No problem, glad to help. Well, at least the test where I added the variables passed.

@cocojoe cocojoe changed the title moved AuthenticationServices to weak_framework section Pods Fix - Move AuthenticationServices to weak_framework section Jan 11, 2019
@cocojoe
Copy link
Member

cocojoe commented Jan 11, 2019

Thanks, your changes are good, it's HomeBrew being a pain now. I'm going to force merge this one in for a release and look at the HomeBrew changes separately as it is breaking for pod installations.

@cocojoe cocojoe self-requested a review January 11, 2019 11:14
Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cocojoe cocojoe added this to the vNext milestone Jan 11, 2019
@cocojoe cocojoe merged commit 96cd875 into auth0:master Jan 11, 2019
This was referenced Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants