Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Restoration #8

Open
jacobrosenthal opened this issue Feb 28, 2016 · 1 comment
Open

Background Restoration #8

jacobrosenthal opened this issue Feb 28, 2016 · 1 comment

Comments

@jacobrosenthal
Copy link
Owner

When we last left our heroes, the big missing functionality was being awoken from sleep and restoring bluetooth. From my react native issue: facebook/react-native#1660

Right now when an app is launched, the launchoptions are given to a native module via the setBridge function. This is handy for push notifications as you can know what notification launched you, etc.

That paradigm doesnt work for Corelocation and Corebluetooth restoration though. These trigger a didFinishLaunchingWithOptions in order to tell the app that a location or device it was told to track has resurfaced. The rest of the app is never launched though, so setbridge never happens. Its common to do a push notification right there or restart your bluetooth stack to do some action. So I think we need a way to register functions to be called upon those launchoptions keys.

I saw this while skimming code around this issue, could we do this:
https://github.com/facebook/react-native/blob/d5209a082976d272e6e897c41fb6f98feda84081/Examples/UIExplorer/UIExplorer/AppDelegate.m#L29

@jacobrosenthal
Copy link
Owner Author

Backgrounding seems to be working now? I need better methods of simulating memory pressure as I so far have been unable to kill the app due to memory pressure to see how we handle being rewoken. We also need to follow the CoreBluetooth Guide in checking to see if weve left services or characteristics undiscovered because of being backgrounded..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant