Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Examples/ExampleSwiftUI/MainApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct MainApp: App {
options.publicKey = "K2UX4fVPFyixVaeLn8Fky_uWhjMr-frADqKqpOCZW2c"

// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api/v0.1"
// options.baseURL = "https://your-domain.com/api"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/ExampleUIKit/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// options.hostViewController = (scene as? UIWindowScene)?.keyWindow?.rootViewController

// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api/v0.1"
// options.baseURL = "https://your-domain.com/api"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct MainApp: App {
options.publicKey = "<YOUR PUBLIC APP KEY>"

// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api/v0.1"
// options.baseURL = "https://your-domain.com/api"
}
...
```
Expand Down Expand Up @@ -112,7 +112,7 @@ func sceneDidBecomeActive(_ scene: UIScene) {
options.publicKey = "<YOUR PUBLIC APP KEY>"

// (Optional) Configure a custom base URL to your API host
// options.baseURL = "https://your-domain.com/api/v0.1"
// options.baseURL = "https://your-domain.com/api"
}
...
```
Expand All @@ -125,7 +125,7 @@ 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/v0.1/` |
| `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 | |
Expand Down
5 changes: 3 additions & 2 deletions Sources/OnLaunch/OnLaunch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class OnLaunch: NSObject {
public class Options {

/// Base URL where the OnLaunch API is hosted at.
public var baseURL = "https://onlaunch.kula.app/api/v0.1/"
public var baseURL = "https://onlaunch.kula.app/api/"

/// Public key used to authenticate with the API
public var publicKey: String?
Expand Down Expand Up @@ -91,7 +91,7 @@ public class OnLaunch: NSObject {
/// The `URLSession` used to send API requests
internal let session: URLSession

/// URL used as the reference for all API calls, e.g. `https://onlaunch.kula.app/api/v0.1`
/// URL used as the reference for all API calls, e.g. `https://onlaunch.kula.app/api`
private let baseURL: URL

/// A `FIFO` queue of messages to present
Expand Down Expand Up @@ -141,6 +141,7 @@ public class OnLaunch: NSObject {
os_log("Checking for messages...", log: .onlaunch, type: .info)

var request = URLRequest(url: baseURL
.appendingPathComponent("v0.1")
.appendingPathComponent("messages"))
request.setValue(options.publicKey, forHTTPHeaderField: "X-API-Key")

Expand Down