React-native-onesignal: Example project doesn't work

Created on 28 Mar 2017  路  10Comments  路  Source: OneSignal/react-native-onesignal

I've tried to run your example project from the master without success (I have followed all steps mentioned in your README).

Upon react-native run-ios I've got the following log:

.../react-native-onesignal/examples/RNOneSignal/ios/build/Build/Products/Debug-iphonesimulator/libRCTOneSignal.a(UNUserNotificationCenter+OneSignal.o)
ld: 97 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


** BUILD FAILED **


The following commands produced analyzer issues:
    Analyze Modules/RCTRedBox.m
(1 command with analyzer issues)


The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/RNOneSignal.app/RNOneSignal normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/RNOneSignal.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RNOneSignal.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

react-native-cli: 2.0.1

Actually,
I have issues with migration to the last version of react-native and react-native-onesignal in my project. To find out the root cause I've tried to build and run your example project to be sure I should find something in react-native but as you can see it doesn't work.

Most helpful comment

@avishayil
The main issue is "Example project doesn't work" as my summary. I wouldn't close this issue until the example project works as expected at least with RN version that is configured now.

All 10 comments

I haven't tried the example app, will do that tomorrow. But I also get the error message clang: error: linker command failed with exit code 1(use -v to see invocation).

@nonameolsson Have you tried the example app?

@bitsal No, I haven't yet. Actually I got the code to work in my app, so I forgot to do that. If I have time today I will try it.
Can't you get OneSignal to work in your app?

No, there is probably related issue https://github.com/facebook/react-native/issues/12952, that is still opened.

We've started working on a new react-native app and it seems to work there with new RN and OneSignal. We still working on it from time to time.

@bitsal Ok! I managed to upgrade from 0.42.0 to 0.43.3 and got OneSignal to work. I'm not sure how, because tried different things during two days =/

The example project is not upgraded yet to the latest RN version, i'll try to do so and we'll see if any problem comes up.
Please let me know if you managed to solve the issue.

@avishayil
The main issue is "Example project doesn't work" as my summary. I wouldn't close this issue until the example project works as expected at least with RN version that is configured now.

I've updated the example project and this error should no longer occur.

If anyone encounters this issue again please feel free to respond and I will reopen the issue.

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RNOneSignal.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

I am seeing this same Print: Entry, ":CFBundleIdentifier", Does Not Exist error on my application, not demo app, after following the setup steps https://documentation.onesignal.com/docs/react-native-sdk-setup

Was this page helpful?
0 / 5 - 0 ratings