jordanbyron/react-native-quick-actions

Opening the app from a cold start on iOS using a quick action fails

rsml opened this issue · 3 comments

rsml commented

Tested on:
iPhone 7 Device, iOS 11.2

If the app is not running in the background, and I start the app using one of the shortcut items (that I've previously set using these steps: https://www.npmjs.com/package/react-native-quick-actions#adding-dynamic-quick-actions)

Then when I try to retrieve the shortcut item that was clicked, I am receiving null. For example:

  componentWillMount() {
   // This gets executed when the app first opens

    QuickActions
      .popInitialAction()
      .then(this.handleShortcutItemPress.bind(this))
      .catch(console.error)
  }

  handleShortcutItemPress(data) {
     // This gets called, but data is unexpectedly null
  }

We use this library in production and it works perfectly. Just went ahead and updated our test device (iPhone 6S) to iOS 11.2.1 and it works perfectly even after app cold launch. If you could upload a full test repository that reproduces your case I could help you out.

@rsml can you provide a slimmed down example which reproduces the problem? This is my "bare bones" iOS app that I use to test cold launching with quick actions:

#47 (comment)

Just like @ItsNoHax, I too am using this library on iOS 11.2 with no issues.

rsml commented

It'll take some time for me to slim down my project to share it. The issue is very intermittent and I don't have reliable steps to reproduce it yet. Like the poster in the thread your mentioned, I'm also using react-navigation (v1.0.0-beta.15), so react-navigation is likely the culprit. I'll close this ticket and do some investigating into react-navigation when I have time.

Thanks for your work on this repo by the way!