jordanbyron / react-native-quick-actions

A react-native interface for Touch 3D home screen quick actions
MIT License
1.06k stars 94 forks source link

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

Closed rsml closed 6 years ago

rsml commented 6 years ago

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
  }
ItsNoHax commented 6 years ago

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.

jordanbyron commented 6 years ago

@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:

https://github.com/jordanbyron/react-native-quick-actions/issues/47#issuecomment-339971736

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

rsml commented 6 years ago

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!