Detach Error: 'React/UIView+React.h' not found

npm: ‘5.6.0’ / node v8.11.0 / exp 50.0.5 / xcode 9.2 / cocoapods 1.4.0

I ran ‘exp init project_name’ → ‘exp ios’ → ‘exp detach’ → ‘npm install’ → ‘exp start’ → ‘pod install’ → ‘open xcode’ → ‘build’ → this error…

Why is this happening? :frowning:

47%20AM

I’m also getting this error, but not sure if it’s related…

42%20AM

Hey @mwalkerwells,

Are you linking a library or is this just a freshly detached project? If you’re trying to link a library and you had to run react-native link or make manual native code changes and it doesn’t have a podspec file, you’ll want to take a look at these docs: https://docs.expo.io/versions/latest/guides/expokit.html#changing-native-dependencies

Also, I would recommend either using yarn or downgrading npm to version 4.6.1 as there are still a fair amount of existing bugs when using npm 5 floating around.

Cheers,

Adam

1 Like

100% freshly detached project. I’ve tried this so many times with various combinations: yarn, cocoapod beta, CRNA eject, etc.

Is npm 4.6.1 the recommended approach? Or yarn?

We suggest using yarn, but if you prefer npm I would install npm@4.6.1

Newest version of yarn?

Yeah, newest stable version would work.

Ok, I’ve give it another shot and report back!

1 Like

No idea why it worked, but I deleted my Pods folder & my Podfile.lock file, then ‘pod install’. Every works now…

Glad you got it fixed. Hopefully it’s smoother sailing from here on out!

Sorry one more thing! I was having this issue last night. I’m now trying to install via ‘create-react-native-app’ → ‘eject’.

yarn ‘1.5.1’ / npm: ‘5.6.0’ / node v8.11.0 / exp 50.0.5 / xcode 9.2 / cocoapods 1.4.0

After ejecting & trying to run ‘pod install’, I get the following error with both yarn and npm…

[!] CocoaPods could not find compatible versions for pod "ExpoKit/GL":
  In Podfile:
    ExpoKit/GL (from `http://github.com/expo/expo.git`, tag `ios/2.3.3`)

None of your spec sources contain a spec satisfying the dependency: `ExpoKit/GL (from `http://github.com/expo/expo.git`, tag `ios/2.3.3`)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

Did you try running pod install --repo-update?

1 Like

Yeah, doesn’t work. :frowning: Same error…

Just reinstalled create-react-native-app and exp with yarn, but still get the same error after ejecting.

Are there compatibility issues with CocoaPods?

There shouldn’t be. Are you running the latest version of cocoapods? Trying to think of what else could be causing this.

1 Like

Hey there, for others reading this thread, there was an issue with ExpoKit ios/2.4.4 combined with CocoaPods 1.5.0 (which was just released a week ago). I recently pushed a new ExpoKit tag, ios/2.4.8, which is compatible with the newer version of CocoaPods.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.