drtapha
drtapha

Reputation: 569

how to install react-native-onesignal using cocoapods ???

I'm confused, after detaching the application with Expokit, I have to install dependencies with cocoapods. Now I want to use oneSignal with react-native-onesignal but when I bind using

react-native link react-native-onesignal

. I have dependency issues. react-native-onesignal can not detect the React library. I understood that it had to be installed using cocoapods. When I add

pod 'react-native-onesignal',: path => "../node_modules/react-native-onesignal"

and I do pod install. I get the No podspec error for react-native-onesignal in../ node_modules / react-native-onesignal. I do not understand. How can I install ???

Upvotes: 1

Views: 1042

Answers (2)

drtapha
drtapha

Reputation: 569

i found the podspec on github https://github.com/geektimecoil/react-native-onesignal/blob/master/react-native-onesignal.podspec and i add in my podfile

pod 'react-native-onesignal', :git => "https://github.com/geektimecoil/react-native-onesignal.git"

after

pod install

This solution works well too.

`

Upvotes: 0

Manzoor Samad
Manzoor Samad

Reputation: 929

cocoapod is just a package manager for ios 3rd party libraries. Can you follow these steps

  1. npm install --save react-native-onesignal
  2. add the following to your podfile
pod 'OneSignal', '~> 1.13.3'

3. execute cd ios && pod install

  1. react-native link react-native-onesignal

i hope your issue will be solved

Upvotes: 1

Related Questions