Skip to content

Fixed iOS Build Issues with Static Frameworks #1195

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

Merged
merged 2 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ RUBY VERSION
ruby 2.6.10p210

BUNDLED WITH
1.17.2
2.6.9
15 changes: 14 additions & 1 deletion ios/A0Auth0.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@

#import <React/RCTUtils.h>

#import "A0Auth0-Swift.h"
/**
* This preprocessor directive resolves the static linking issue by ensuring
* the correct import of the Swift header file generated for the A0Auth0 module.
* It checks for the presence of the header file in different locations:
* 1. If the header is available in the framework's module path (<A0Auth0/A0Auth0-Swift.h>),
* it imports it from there.
* 2. As a fallback, it imports the header from the local path to ensure compatibility.
*/
#if __has_include(<A0Auth0/A0Auth0-Swift.h>)
#import <A0Auth0/A0Auth0-Swift.h>
#else
#import "A0Auth0-Swift.h"
#endif

#define ERROR_CANCELLED @{@"error": @"a0.session.user_cancelled",@"error_description": @"User cancelled the Auth"}
#define ERROR_FAILED_TO_LOAD @{@"error": @"a0.session.failed_load",@"error_description": @"Failed to load url"}

Expand Down