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.

Local notifications work until standalone ios builds in testflight

See original GitHub issue

🐛 Bug Report

Environment

  Expo CLI 2.14.0 environment info:
    System:
      OS: macOS 10.14.4
      Shell: 5.0.3 - /usr/local/bin/bash
    Binaries:
      Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
      Yarn: 1.15.2 - ~/.nvm/versions/node/v10.15.3/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.15.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Xcode: 10.2/10E125 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^32.0.0 => 32.0.1 
      react: ^16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 
      react-navigation: ^2.18.2 => 2.18.3 
    npmGlobalPackages:
      expo-cli: 2.14.0

This app is being built for ios with expo build:ios --clear-push-cert, with both testing and production certs setup and added to apple developer account for this app.

Steps to Reproduce

  1. Create a standard expo app
  2. Add a local notification (say 10 seconds in the future) like this
  3. Test app locally with expo start and expo client on device by viewing screen that sets notification, kill app (long swipe on iPhone X) and wait for ten seconds
  4. Build standalone binary with expo build:ios --clear-push-cert
  5. Be sure to provision keys through expo, but also setup certificates for Apple Developer portal and xcode
  6. Upload to TestFlight
  7. Run local native TestFlight application, repeat above exercise (load screen that sets notification, kill app, wait ten seconds

Expected Behavior

I expected the local native app to be able to fire the notification with the app in the background, just like when running through expo client.

Actual Behavior

When I follow the exact same process as from using expo client, the notification never happens. I checked in the TestFlight app to be sure notifications were enabled (true), but no luck. The rest of the app works exactly as intended.

Reproducible Demo

I know this is all based on once standalone binaries are built, which is why I didn’t just create a snack. Please let me know if there’s anything I can do to demonstrate, or provide more helpful information to figure this out.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:27 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
spacemonkeycommented, Apr 9, 2019

Ahh I got you - thanks for clarifying. I’ll give that a shot and report back.

0reactions
spacemonkeycommented, Sep 3, 2019

Pretty sure that is what fixed it for me!

For total rookies to react AND react native (such as myself), sometimes it has to be painfully, mind-numbingly spelled out:

  1. Create react native app
  2. Add logic at the top level to ensure notifications are available
  3. Actually do something with notifications

Step 2 was where the wheels fell off for me, thanks for updating the docs!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up push notifications for TestFlight builds?
Hi, I'm confused about what the right way is to configure TestFlight builds to get push notifications. My app identifier is configured to...
Read more >
Push notifications not working in production with iOS
Does the app need a new build uploaded like android? I'm sending the push notifications from the backend using the expo node module....
Read more >
Notification status suddenly "undetermined" for all builds
I tried downloading an older app version from TestFlight that had worked no problem before, but now I get the "undetermined" code on...
Read more >
React Native: How To Publish An Expo App To TestFlight + ...
1. Preparing Your Project For Build · 2. Build App (.IPA) · 3. Add Expo Build to Xcode · 4. Send TestFlight Invitation...
Read more >
How to send HTTP/2 based Push Notifications in iOS
Apple supports push notifications based on the HTTP/2 network protocol. In fact, the legacy binary protocol on which the previous LiveCode lesson was...
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