Skip to content

Commit

Permalink
Remove delegate implimentation, replace with app resume
Browse files Browse the repository at this point in the history
  • Loading branch information
sitefinitysteve committed Dec 11, 2017
1 parent 28d48f8 commit 7dfffb7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-store-update",
"version": "1.0.1",
"version": "1.0.2",
"description": "Keep your {N} App updated.",
"main": "store-update",
"typings": "index.d.ts",
Expand Down
15 changes: 0 additions & 15 deletions src/store-update.delegate.ts

This file was deleted.

8 changes: 5 additions & 3 deletions src/store-update.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ import * as utils from 'tns-core-modules/utils/utils'
import { AppStoreHelper } from './helpers'
import { IAppleStoreResult, IStoreUpdateConfig } from './interfaces'
import { StoreUpdateCommon } from './store-update.common'
import { ForegroundDelegage } from './store-update.delegate'

export * from './constants'
export * from './helpers'
export * from './interfaces'

app.ios.delegate = ForegroundDelegage

export class StoreUpdate {
private static _common
private static _trackViewUrl
Expand All @@ -26,6 +23,11 @@ export class StoreUpdate {
...config,
onConfirmed: StoreUpdate._openStore.bind(StoreUpdate),
})

//Hook into resume event to check for version
app.on(app.resumeEvent, function (args) {
StoreUpdate.checkForUpdate();
});
}

static checkForUpdate() {
Expand Down

0 comments on commit 7dfffb7

Please sign in to comment.