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

onHomeIconPressed when app was terminated #1

Closed
hannes-k opened this issue Oct 14, 2015 · 13 comments
Closed

onHomeIconPressed when app was terminated #1

hannes-k opened this issue Oct 14, 2015 · 13 comments

Comments

@hannes-k
Copy link

Hi,

  1. Thank you for your great work and plugin!
  2. I've got a problem, if the app is terminated. When I'm starting the app by a force touch shortcut, the onHomeIconPressed function doesn't get called. When the app was launched before and is cached, everything works as expected.

Is this a known problem?

Best
Hannes

@abalonebao
Copy link

I've solved this issue~
In XCode, you need to update "plugin/AppDelegate+threedeetouch.m"

Update this line:

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 25 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{

With this line:

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 450 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{

just like this
screen shot 2015-10-15 at 3 33 23 am

I slow down the dispatch delay time and it works~

lol this is my first comment in github, hope my answer can help you~

@EddyVerbruggen
Copy link
Owner

Hey @hannes-k thanks for sharing your observation! I will take a look and see if it can be further optimized (stretching the timeout may result in your app briefly showing a page before responding to the shortcut action).

@EddyVerbruggen
Copy link
Owner

I'm not sure how precise that 450ms is - could you please test v1.0.1 of this plugin and see if it's ok as well?

Btw, which device are you on? 6S or 6S Plus?

@abalonebao
Copy link

I was keep testing with different value of ms and 450 is pretty good...
me iphone is 6s plus

@abalonebao
Copy link

will test 1.0.1 later~it's 4am in hk...

@EddyVerbruggen
Copy link
Owner

Wahaha, go (back) to sleep 👍

@abalonebao
Copy link

sosad... not working#1.0.1

oh wait....it works (sometimes)
don't know why it won't do anything in first 2 tests

@EddyVerbruggen
Copy link
Owner

@abalonebao Please tty 1.1.0 that should def fix the issue.

@abalonebao
Copy link

it's weird... not working at 1.1.0

@EddyVerbruggen
Copy link
Owner

Can you share you project with me perhaps?

@hannes-k
Copy link
Author

Hey @EddyVerbruggen

I updated to 1.1.0 and on my iPhone 6s the bug seems to be fixed. Now everything works as expected! Thank you very much!

@EddyVerbruggen
Copy link
Owner

👍

@hirbod
Copy link

hirbod commented Oct 19, 2015

I can confirm. Works as expected

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

4 participants