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

Added example for when using scene based windowing. #49

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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