Can't update ExpoKit in ejected CRNA app

Our team has been working in a CRNA app for a while, and recently we’ve had to eject.

PLEASE NOTE: I come from almost exclusively native iOS development, so perhaps something obvious might have escaped me. I have next to no knowledge about node dependencies, node_modules, etc.

The sequence I’ve followed to eject is:

  • npm run eject
  • yarn global add react-native-cli
  • yarn global add expo-cli
  • react-native-git-upgrade
  • npm info react-native
  • yarn add react@16.5.0
  • yarn add react-native@0.57.0
  • react-native-git-upgrade
  • pod install --repo-update

I was able to update to react native 0.57.0 and react 16.5.0 successfully. The pods update successfully when referencing the ExpoKit repo tagged ios/2.5.10. It’s only when I try to update to a more recent version (such as ios/2.8.2), that I get an error.

Podfile pod specs below:

  pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.8.2",
    :subspecs => [
      "Core",
      "CPP",
      "GL"
    ]

  pod 'React',
    :path => "../node_modules/react-native",
    :subspecs => [
      "Core",
      "ART",
      "RCTActionSheet",
      "RCTAnimation",
      "RCTCameraRoll",
      "RCTGeolocation",
      "RCTImage",
      "RCTNetwork",
      "RCTText",
      "RCTVibration",
      "RCTWebSocket",
      "DevSupport",
      "CxxBridge"
    ]
  pod 'yoga',
    :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'DoubleConversion',
    :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec",
    :inhibit_warnings => true
  pod 'Folly',
    :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec",
    :inhibit_warnings => true
  pod 'glog',
    :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec",
    :inhibit_warnings => true

The error outputted is:

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

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

Yeah, same icloud issue here, need help with gimp this. ASAP.

@hlbmike, @brinal could you try to remove ExpoKit/GL and ExpoKit/CPP from subspecs and then run pod install again? As of SDK29, it should be just :subspecs => ["Core"]

Hi @tsapeta, thanks for your reply. I tried the above and got the error:

Unable to find a specification for EXCore depended upon by ExpoKit/Core

I then tried to add in EXCore to satisfy the dependency:

  pod 'EXCore',
    path: '../node_modules/expo-core/ios'

  pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.8.2",
    :subspecs => [
      "Core"
    ]

This didn’t quite resolve it, I then got:

No podspec found for EXCore in …/node_modules/expo-core/ios

So I ran yarn add expo-core.

That fixed the EXCore error. Then I got a similar error for EXReactNativeAdapter:

Unable to find a specification for EXReactNativeAdapter depended upon by ExpoKit/Core

So I searched for EXReactNativeAdapter and tried a similar thing:

  • yarn add expo-react-native-adapter
  • pod 'EXReactNativeAdapter', path: '../node_modules/expo-react-native-adapter/ios', inhibit_warnings: true

Now I’m getting the below and I’m wondering how many more pods I have to explicitly add?

Unable to find a specification for EXFontInterface depended upon by EXReactNativeAdapter

Note that the same outcome occurs regardless if I run pod install first, or pod update followed by pod install.

1 Like

@hlbmike

Looks like your issue is caused by the fact you had too old version of exp or expo-cli, so it generated wrong Podfile that is not compatible with SDK29 and SDK30. Sorry for that, I guess we will do something to prevent such problems in the future.

Anyway, assuming that you have expo package in version ^30.0.0, I’ve prepared an example of Podfile that you can use: https://gist.github.com/tsapeta/82c19c15f6b53f0c9f12e6bcff480fd2

Let me know if you still have some issues with that.

2 Likes

Thanks @tsapeta! That didn’t resolve it straight away. I was still prompted to individually add everything from EXAdsAdMob.

But I ended up discarding the branch I was on and checking out from master again for a clean slate. Then updating to the latest versions of react and react-native before repeating the steps in the OP. Then I updated the new podfile with your gist contents again and it worked.

Also, a step I missed out on originally was yarn add expo@30.0.0. This could’ve been the source of my problems(?).

I should also note (in case somebody else has the same problem) that somewhere in the process, my app.json file was changed into this:

{
  "name": "AppName",
  "displayName": "AppName",
}

But to successfully run expo start it needs to be this:

{
  "name": "AppName",
  "displayName": "AppName",
  "expo": {
    "sdkVersion": "30.0.0"
  }
}
1 Like

Yes, definitely, this is a required step as your Expo native code must be in sync with JS package. Like EXAdsAdmob was introduced in SDK30, so expo@29.0.0 was not depending on it, thus podspec couldn’t be found :wink:

2 Likes

Thanks for your help :slight_smile:

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