Sentry-react-native: Error when installing Sentry on ios

Created on 26 Jan 2020  路  3Comments  路  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [*] MacOS
  • [ ] Linux

_Platform:_

  • [*] iOS
  • [ ] Android

SDK:

  • [*] @sentry/react-native
  • [ ] react-native-sentry

react-native version: 0.61.5
@sentry/react-native version: 1.2.1

Init Code:

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:

I've been trying to install this package in my projects, it's running smoothly on android, but on ios it can't run when trying to pod install, the error looks like this

[!] CocoaPods could not find compatible versions for pod "Sentry":
  In Podfile:
    RNSentry (from `../node_modules/@sentry/react-native`) was resolved to 1.2.1, which depends on
      Sentry (~> 4.4.0)

None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 4.4.0)`.

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.

Steps to reproduce:

  • yarn add @sentry/react-native
  • yarn sentry-wizard -i reactNative -p ios android
  • cd ios
  • pod install

Actual result:

  • it's show error as the description

Expected result:

  • pod installed correctly

Most helpful comment

Please run pod repo update it just can't find the latest version because your local cache is outdated.

All 3 comments

Please run pod repo update it just can't find the latest version because your local cache is outdated.

The error persisted for me after running pod repo update
I deleted Podfile.lock and re-run pod install and it worked!

@SamiChab It works! Thanks.

Was this page helpful?
0 / 5 - 0 ratings