question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS setup issues. Should revisit iOS documentation

See original GitHub issue

Right now the documentation for the iOS setup prompts to follow these instructions. https://facebook.github.io/react-native/docs/pushnotificationios.html#content

However this is both deprecated in RN core and doesnt work with the new autolinker system. Documentation should be revised to point here. https://github.com/react-native-community/react-native-push-notification-ios

A thing to note about react-native-community/react-native-push-notification-ios (at least at this point) is simply npm install doesnt work at this moment as there is an issue where you need to reference the podspec explicitly in your Podfile.

https://github.com/react-native-community/react-native-push-notification-ios/issues/11

Hope this helps someone, took multiple hours and the help of a friend to figure out.

EDIT: Going with the react-native-community version is not an approach that will work as it yields

Native module cannot be null most likely due to an import incompatibility.

Its a little confusing on how to make this work with ^0.60

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:10

github_iconTop GitHub Comments

7reactions
kirkryancommented, Aug 5, 2019

HI @GertjanReynaert - thanks for sharing. I can also confirm that the latest build works fine react-native-push-notification (3.1.8) and @react-native-community/push-notifications-ios (1.0.2.

The install instructions look like they have been updated, but for anyone coming from a previous release where they were using React-RCTPushNotification here are the steps:

Firstly, React-RCTPushNotification has been removed from the normal react package (just like ASyncStorage was) and now resides within the community. Therefore you will need to:

  1. Remove your PodFile entry for React-RCTPushNotification (your PodFile is in the ios directory): Remove this: pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
  2. Install the new push notification module into your project: yarn add @react-native-community/push-notifications-ios
  3. Go back to ios and runpod install
  4. Replace all entries in your AppDelegate.m for RCTPushNotificationManager with RNCPushNotificationIOS
  5. Also in the AppDelegate.m - remove #import <React/RCTPushNotificationManager.h> and replace with #import <RNCPushNotificationIOS.h>
  6. In xCode, clean your build directory (Product -> Clean Build Folder)
  7. Build

This one caught me off guard so I hope this helps someone!

2reactions
GertjanReynaertcommented, Aug 1, 2019

With the latest version of react-native-push-notification (3.1.8) and @react-native-community/push-notifications-ios (1.0.2) I was able to get things working in RN60 by just doing the npm install and using the auto loading of RN60

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn on and set up iPhone - Apple Support
Turn on and set up your iPhone​​ Do one of the following: Tap Set Up Manually, then follow the onscreen setup instructions. If...
Read more >
iOS SDK - Spotify for Developers
Our iOS SDK makes it easy to add streaming, user authentication, and other Spotify features to iOS apps.
Read more >
Policy sets - Microsoft Intune
As your organization changes, you can revisit a policy set to add or remove its objects and assignments. You can use a policy...
Read more >
Set up Google Workspace on an iOS device
Depending on how your administrator configures settings, you can access your account through Google Workspace apps or with the iOS apps on your...
Read more >
iOS - Wikipedia
iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found