Skip to content

Commit

Permalink
#1 onHomeIconPressed when app was terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Oct 14, 2015
1 parent 100248d commit 872f462
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ by [Eddy Verbruggen](http://twitter.com/eddyverbruggen)
2. [Screenshots](#2-screenshots)
3. [Installation](#3-installation)
4. [Usage](#4-usage)
5. [Changelog](#5-changelog)

## 1. Description

Expand Down Expand Up @@ -127,4 +128,8 @@ preview pops up (see the screenshot above). If you want to enable this feature,
To disable the link preview feature again, do:
```js
ThreeDeeTouch.disableLinkPreview();
```
```

## 5. Changelog
1.0.1 Increased the timeouts a bit, so there is a better chance `onHomeIconPressed` gets called on coldstart. Thanks #1.
1.0.0 Initial release
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-3dtouch",
"version": "1.0.0",
"version": "1.0.1",
"description": "Add Quick Actions to your Home Screen which can be triggered by 3D Touch. Also, you can enable Link Preview with this plugin. Supported on iPhone6S an up.",
"cordova": {
"id": "cordova-plugin-3dtouch",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<plugin
id="cordova-plugin-3dtouch"
version="1.0.0"
version="1.0.1"
xmlns="http://apache.org/cordova/ns/plugins/1.0">

<name>3D Touch</name>
Expand Down
2 changes: 1 addition & 1 deletion src/ios/app/AppDelegate+threedeetouch.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ - (void) callJavascriptFunctionWhenAvailable:(NSString*)function {
if (threeDeeTouch.initDone) {
[threeDeeTouch.webView stringByEvaluatingJavaScriptFromString:function];
} else {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 25 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 100 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
[self callJavascriptFunctionWhenAvailable:function];
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/ios/app/ThreeDeeTouch.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ @implementation ThreeDeeTouch

- (void)pluginInitialize {
// make sure the app is awake
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 200 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 300 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
self.initDone = YES;
});
}
Expand Down

0 comments on commit 872f462

Please sign in to comment.