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


#1

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


#2

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

42%20AM


#3

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


#4

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


#5

Is npm 4.6.1 the recommended approach? Or yarn?


#6

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


#7

Newest version of yarn?


#8

Yeah, newest stable version would work.


#9

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


#10

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


#11

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


#12

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.

#13

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


#14

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


#15

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


#16

Are there compatibility issues with CocoaPods?


#17

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


#18

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.


closed #19

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