react-native-pusher-push-notifications: #import not found

Hi, first of all I would like to thank you for your hard work. I was wondering if you could help with this problem I keep having while trying to use this package. Xcode shows a #import <Pusher/Pusher.h> not found and I have the libPusher library installed with CocoaPods.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 19 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @ahmed-wagdi sounds like a linking issue. Did you run react-native link react-native-pusher-push-notifications?

In Xcode under your Libraries you should have RNPusherPushNotifications.xcodeproj

libs


Under Build Settings > Header Search Paths you should have $(SRCROOT)/../node_modules/react-native-pusher-push-notifications/ios (recursive)

headers


In General > Linked Frameworks and Libraries you should have libRNPusherPushNotifications.a (required)

link


And under Build Phases > Link Binaries With Libraries you should have libRNPusherPushNotifications.a (required)

build-phases


Do you have these in your project?

Also what version of React Native are you using?

Edit: Add missing link step/screenshot

@pesakitan22 @jqn FYI version 1.0.0 has been released and is now available on npm. Both Android and iOS have been extensively tested and is currently in use in a production app, so consider this good to go.

@pesakitan22 @jqn Fixes for iOS are now in the dev branch.

npm install --save git+https://github.com/b8ne/react-native#dev

If your able to, it would be awesome if you could test it out and report if it fixes the issues?

Note the setup instructions and different on this branch due to significant changes in the iOS implementation - most notably the changes to AppDelegate.h and AppDelegate.m. Just shout out on here if you need a hand getting it setup.

@pesakitan22 if you are referring to the pusher native library this is a nice guide on how to do it for iOS

https://blog.brainsandbeards.com/implementing-ios-push-notifications-with-pusher-and-react-native-35e46e3565b9

I didn’t, I ended up using the pusher client api to subscribe and libpusher for iOS and pusher websocket android for android

https://pusher.com/docs/push_notifications/reference/client_api

There is a pull request you could use for android if you still want to use this library https://github.com/b8ne/react-native-pusher-push-notifications/pull/2

I haven’t tested but it might work, otherwise let me know if you need any pointers using the pusher client api.