Comments (7)
You need to go to your Podfile file, located within the ios folder on the root of your project.
Add the line pod 'OneSignal' as follows:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'YourApp' do
...
pod 'OneSignal'
end
target 'YourAppTests' do
end
Then go to terminal, go to the ios folder on the root of your project, then type pod install
to install the pods. After that, make sure to drag OneSignal.framework
from your Pods project on Xcode to the Frameworks folder on your Xcode workspace.
from react-native-onesignal.
You can follow the issue you referred to solve this. Just drag the framework file to the frameworks folder and make sure it's linked on your project build phases.
from react-native-onesignal.
i'm on react-native 0.37 and here's how i was able to get this to work (i think the readmes/documentation are slightly behind react native).
- on a clean branch with none of the onesignal work...
- run
npm install react-native-onesignal --save
- run
react-native link
- for iOS follow the podfile instructions (be sure to follow the react native version note carefully)
- for iOS follow the code additions in the instructions
- for android follow the android instructions (most of the code should be there from the link command, but double check everything)
- for android be sure to use
import com.geektime.reactnativeonesignal.ReactNativeOneSignalPackage;
and NOTimport com.geektime.rnonesignal.ReactNativeOneSignalPackage;
(some old documentation had the rnonesignal and that's since been updated) - then complete config and setup and all files
- hopefully that does the trick for you...please reply if you have any issues as i spent some time on both android and iOS over a few branches to get this to work.
YMMV if you are using something lower than v0.37 of RN. good luck.
from react-native-onesignal.
Since it's not a particular issue with the library i'm closing this now. If you have more questions, please don't hesitate.
from react-native-onesignal.
i success install.
thx for your advices.
but i got error that "symbol(s) not found for architecture x86_64"
however i solve that error now.
helpful me.
from react-native-onesignal.
Ran into this trying to use Auth0 with RN - posted our fix here.
from react-native-onesignal.
$ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master
--progress
Cloning into 'master'...
remote: Counting objects: 2114584, done.
remote: Compressing objects: 100% (386/386), done.
error: RPC failed; curl 56 SSLRead() return error -36 | 48.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Counting objects: 2114584, done.
remote: Compressing objects: 100% (386/386), done.
error: RPC failed; curl 56 SSLRead() return error -36 | 48.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
from react-native-onesignal.
Related Issues (20)
- [Bug]: Crash "RuntimeException: Could not invoke OneSignal.hasNotificationPermission" HOT 2
- [Bug]: OneSignal.login() doesn't set the externalId in react native HOT 2
- [Bug]: Push Notification with status FAILED on iOS HOT 2
- Can't find any documentation on how to handle the actions buttons in my notification HOT 3
- ⚠️ 5.0.0 to 5.1.0 Deprecated - These version may be blocked or rate limited. Please update to 5.1.1 or newer ⚠️ HOT 1
- [Bug]: Android release APK crashing HOT 1
- [Bug]: External Id is not getting set HOT 1
- [Bug]: Cycle inside SampleProject; building could produce unreliable results HOT 3
- [Bug]: addTag could not be invoked HOT 3
- [Bug]: react native App Crashes in Android device Only, works on emulator HOT 1
- [Bug]: canRequestPermission is not working as expected HOT 3
- [Bug]: Missing API declaration HOT 3
- [Bug]: Can not build at AppCenter HOT 1
- [question]: Issue with Push Notifications in App Store Builds HOT 1
- iOS: Badge not showing HOT 2
- [Bug]: In v5, the Subscription Status does not change to 'Subscribed'. HOT 8
- [Bug]: permissionChange listener is not giving the correct hasPermission value until background/foreground HOT 3
- [question]: getIdAsync is returning null with latest SDK HOT 4
- [Bug]: Dependency problem while adding onesignal to an existing react native project HOT 3
- [Bug]: Incorrectly returning notification permission data until you close and open the app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-onesignal.