Created and maintained by kula.app and all the amazing contributors.
OnLaunch is a service allowing app developers to notify app users about updates, warnings and maintenance Our open-source framework provides an easy-to-integrate client to communicate with the backend and display the user interface.
You can integrate OnLaunch
into your project using Swift Package Manager.
https://github.com/kula-app/OnLaunch-iOS-Client
main
for the latest development version).OnLaunch
.OnLaunch
iOS client into your App
file:import OnLaunch
View
to set your public key:@main
struct MainApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.configureOnLaunch { options in
// Configure the public key to authenticate with the API endpoint
options.publicKey = "<YOUR PUBLIC APP KEY>"
}
}
}
}
OnLaunch
client by modifying the options
:...
.configureOnLaunch { options in
// Configure the public key to authenticate with the API endpoint
options.publicKey = "<YOUR PUBLIC APP KEY>"
// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api"
}
...
OnLaunch
iOS client into your SceneDelegate
file:import OnLaunch
hostScene
:func sceneDidBecomeActive(_ scene: UIScene) {
OnLaunch.configure { options in
// Configure the public key to authenticate with the API endpoint
options.publicKey = "K2UX4fVPFyixVaeLn8Fky_uWhjMr-frADqKqpOCZW2c"
// Configure the host scene to present the UI
options.hostScene = scene
// or: configure the host view controller to present the UI
// options.hostViewController = (scene as? UIWindowScene)?.keyWindow?.rootViewController
}
}
OnLaunch
client by modifying the options
:...
.configureOnLaunch { options in
// Configure the public key to authenticate with the API endpoint
options.publicKey = "<YOUR PUBLIC APP KEY>"
// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api"
}
...
You can also configure OnLaunch inside your AppDelegate
in case your app does not use scenes.
The OnLaunch iOS client provides a couple of configuration options:
Name | Description | Default |
---|---|---|
baseURL |
Base URL where the OnLaunch API is hosted at. Change this to point to your self-hosted instance of the OnLaunch server. | https://onlaunch.kula.app/api/ |
publicKey |
Public key used to authenticate with the API | |
shouldCheckOnConfigure |
Flag indicating if the client should check for new messages immediately after it has been configured. | true |
hostScene |
Scene used to host the OnLaunch client UI. Required if you use UIKit with scenes | |
hostViewController |
An instance of UIViewController used to host the OnLaunch client UI. Required if you use UIKit without scenes |
|
theme |
Custom theme used by the OnLaunch client UI. Adapt the values to change the theme to match your preferences. To see all possible configuration values, see Theme.swift |
Default values as defined in Theme.standard in Theme.swift |
Please see our Contributing Guide.
Distributed under the MIT License
link |
Stars: 3 |
Last commit: 5 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics