Skip to content

Commit

Permalink
feat: add ios in-app update (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel authored Jan 13, 2025
1 parent 701ad2d commit 74c60c7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions iosApp/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def shared_pods
pod "libtor", :podspec => "#{ooni_pods_location}/libtor.podspec"
pod "libz", :podspec => "#{ooni_pods_location}/libz.podspec"
pod "oonimkall", :podspec => "#{ooni_pods_location}/oonimkall.podspec"
pod "Siren"
end

target 'OONIProbe' do
Expand Down
6 changes: 5 additions & 1 deletion iosApp/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PODS:
- Sentry (8.38.0):
- Sentry/Core (= 8.38.0)
- Sentry/Core (8.38.0)
- Siren (6.1.3)
- sqlite3 (3.42.0):
- sqlite3/common (= 3.42.0)
- sqlite3/common (3.42.0)
Expand All @@ -22,11 +23,13 @@ DEPENDENCIES:
- libtor (from `https://github.com/ooni/probe-cli/releases/download/v3.24.0/libtor.podspec`)
- libz (from `https://github.com/ooni/probe-cli/releases/download/v3.24.0/libz.podspec`)
- oonimkall (from `https://github.com/ooni/probe-cli/releases/download/v3.24.0/oonimkall.podspec`)
- Siren
- sqlite3 (~> 3.42.0)

SPEC REPOS:
trunk:
- Sentry
- Siren
- sqlite3

EXTERNAL SOURCES:
Expand Down Expand Up @@ -54,8 +57,9 @@ SPEC CHECKSUMS:
libz: 8e83c9433082438bce962f836f845d835f26b850
oonimkall: 935a4263650a75bef0d8b487f7d349094b4c2b73
Sentry: 205813e7e758b53df157cedb8c55b31a14300645
Siren: c0f6012f61196b73455202db07730f6454a4beb0
sqlite3: f163dbbb7aa3339ad8fc622782c2d9d7b72f7e9c

PODFILE CHECKSUM: 59b6c2ae5c19ca87fa0a3f359deffa5e78551529
PODFILE CHECKSUM: 658feca781b7bdbe6e617824a73a1a71ceea9695

COCOAPODS: 1.16.2
14 changes: 14 additions & 0 deletions iosApp/iosApp/iOSApp.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Siren
import SwiftUI
import composeApp

Expand All @@ -8,8 +9,21 @@ extension URL {
}
}

class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
let siren = Siren.shared
siren.rulesManager = RulesManager(globalRules: Rules(promptFrequency: .immediately, forAlertType: .option),
showAlertAfterCurrentVersionHasBeenReleasedForDays: 0)
siren.wail()

return true
}

}

@main
struct iOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

@Environment(\.openURL) var openURL

Expand Down

0 comments on commit 74c60c7

Please sign in to comment.