Skip to content

Commit

Permalink
Merge pull request #49 from kurabi/patch-1
Browse files Browse the repository at this point in the history
Added example for when using scene based windowing.
  • Loading branch information
dtrenz authored Apr 8, 2020
2 parents fec776a + 5eb75b5 commit b32a98e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ See the section below, for instructions on [how to provide a custom parser](#cus
1. Import it into your `AppDelegate`.
2. Instantiate it, passing in the location of your configuration file and the
App Store URI of your app.
3. Lastly, call `launchGate?.check()` in `applicationDidBecomeActive`.
3. Lastly, call `launchGate?.check()` in `applicationDidBecomeActive` or `sceneDidBecomeActive` if you are using scene based windowing.

```swift
import LaunchGate


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

Expand All @@ -83,6 +82,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
```

or if you have a Application Scene Manifest setup:

```swift
import LaunchGate

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?

func sceneDidBecomeActive(_ scene: UIScene) {
launchGate?.check()
}

}
```

## The Configuration File

Expand Down

0 comments on commit b32a98e

Please sign in to comment.