react-native-auth0: [2.14.0] iOS build error

Not building after update from 2.13.3 to 2.14.0

** BUILD FAILED **


The following build commands failed:
	CompileC /Users/bardiamist/Library/Developer/Xcode/DerivedData/proj-gcfwctharjklzxamsqckslyxgkbd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/A0Auth0.build/Objects-normal/arm64/A0Auth0.o /Users/bardiamist/Documents/proj/proj-mobile/node_modules/react-native-auth0/ios/A0Auth0.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'A0Auth0' from project 'Pods')
(1 failure)
Screenshot Screenshot 2022-10-10 at 16 58 07

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 25 (19 by maintainers)

Most upvoted comments

@poovamraj I think I figured out the issue. I am attempting to migrate from firebase auth(I am guessing a possibly common use case). react-native-firebase requires the following to be in app.json plugins array:

[
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "static"
          }
        }
      ]

Removing this code allows the build to complete successfully. I am assuming it is useFrameworks:static that is preventing proper generation of headers. I know there are other libraries that require this, so I am sure the community would benefit from a solution that allows building in auth0 with useFrameworks: static, but at least for now, maybe docs can include something stating that it is incompatible with this build property and any libraries requiring it.

Hi! I have the same issue, with version 2.14.0

Tried, it works

"react-native-auth0": "git+ssh://git@github.com/auth0/react-native-auth0.git#feature/static-linking-support",

@Bardiamist can you please try out the branch feature/static-linking-support?

Hey all 👋 I figured out what is causing the issue! So we are referencing the file from local context. So if you change the

- #import "A0Auth0-Swift.h"
+ #import <A0Auth0/A0Auth0-Swift.h>

In A0Auth0.m in your node_modules, this should start working (There are tones of problems with Hermes and New architecture if you enable use_frameworks which is mentioned in Firebase docs itself)

Can someone verify this? I can try to figure out a patch.