Skip to content

Commit f536d58

Browse files
committed
ComposeApp: Add Firebase to iOS
1 parent 4839352 commit f536d58

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

build-conventions/src/main/kotlin/composeapp.multiplatform-library-conventions.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ kotlin {
4040
).forEach { iosTarget ->
4141
iosTarget.binaries.framework {
4242
baseName = "ComposeApp"
43+
isStatic = true
44+
linkerOpts("-ObjC")
4345
export(libs.androidx.lifecycle.viewmodel)
4446
}
4547
}
48+
4649
jvm("desktop")
4750
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
4851
binaries.all {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>API_KEY</key>
6+
<string>AIzaSyCEcoV6soF-T9LMLMmXFXgR6JmbGfp1vf0</string>
7+
<key>GCM_SENDER_ID</key>
8+
<string>129903346150</string>
9+
<key>PLIST_VERSION</key>
10+
<string>1</string>
11+
<key>BUNDLE_ID</key>
12+
<string>com.jarroyo.composeapp.debug</string>
13+
<key>PROJECT_ID</key>
14+
<string>virtualgym-684f7</string>
15+
<key>STORAGE_BUCKET</key>
16+
<string>virtualgym-684f7.firebasestorage.app</string>
17+
<key>IS_ADS_ENABLED</key>
18+
<false></false>
19+
<key>IS_ANALYTICS_ENABLED</key>
20+
<false></false>
21+
<key>IS_APPINVITE_ENABLED</key>
22+
<true></true>
23+
<key>IS_GCM_ENABLED</key>
24+
<true></true>
25+
<key>IS_SIGNIN_ENABLED</key>
26+
<true></true>
27+
<key>GOOGLE_APP_ID</key>
28+
<string>1:129903346150:ios:c5248395c469a52e09d627</string>
29+
</dict>
30+
</plist>

iosApp/iosApp/iosAppApp.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@
77

88
import SwiftUI
99
import ComposeApp
10+
import FirebaseCore
11+
12+
class AppDelegate: NSObject, UIApplicationDelegate {
13+
func application(_ application: UIApplication,
14+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
15+
FirebaseApp.configure()
16+
17+
return true
18+
}
19+
}
1020

1121
@main
1222
struct iosAppApp: App {
23+
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
24+
1325
init() {
1426
KoinAppModuleKt.doInitKoin(additionalModules: [])
1527
}

0 commit comments

Comments
 (0)