React-native-app-auth: AppAuth.h file not found

Created on 12 Mar 2019  路  5Comments  路  Source: FormidableLabs/react-native-app-auth

Issue

The AppAuth.h file not found error occurs specifically when running the Carthage setup (works fine with Pods)

Environment

  • Platform that you're experiencing the issue on:

    • [x] iOS

    • [ ] Android

    • [ ] iOS but have not tested behavior on Android

    • [ ] Android but have not tested behavior on iOS

    • [ ] Both

  • Are you using Expo, e.g. ExpoKit?

    • [x] No

    • [ ] Yes, I've _not_ ejected

    • [ ] Yes, but I have ejected to ExpoKit

    • [ ] Yes, but I have ejected to vanilla React Native

Proposed Fix

For me, when this build error occurs it is not in my project but the RNAppAuth project. I can fix this by going and adding $(SRCROOT)/../../../ios/Carthage/Build/iOS/AppAuth.framework as a recursive header search path to the project.

If you modify the line found here: https://github.com/FormidableLabs/react-native-app-auth/blob/master/ios/RNAppAuth.xcodeproj/project.pbxproj#L211 to include this, then it works for me (albeit with a bug in the AppAuth-iOS, but that is a separate issue)

HEADER_SEARCH_PATHS = (
                    "$(inherited)",
                    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
                    "$(SRCROOT)/../../../React/**",
                    "$(SRCROOT)/../../react-native/React/**",
                    "$(SRCROOT)/../../../ios/Pods/AppAuth/**",
                    "$(SRCROOT)/../../../ios/Pods/Headers/**",
                    "$(SRCROOT)/../../../ios/Carthage/Build/iOS/AppAuth.framework/**"
                );
bug

Most helpful comment

hey there, i am struggling with this issue ! @erichulser did you solve it ?

All 5 comments

Thank you for the workaround, waiting for fix

For the info, this bug is not reproducible on 4.0.0, even though it has not that line mentioned above

hey there, i am struggling with this issue ! @erichulser did you solve it ?

I'm able to reproduce this bug on 4.4.0 and 4.0.0 on react-native == 0.59.0 while using an installation with react-native link.

Oops, turns out I had not correctly finished the setup instructions. Got this working today.

Hi @powersjcb, what did you miss? I'm getting this problem too

Was this page helpful?
0 / 5 - 0 ratings