This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @main | |
| struct iOSApp: App { | |
| @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate | |
| var body: some Scene { | |
| WindowGroup { | |
| ContentView() | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| import ComposeApp | |
| class AppDelegate: NSObject, UIApplicationDelegate { | |
| func application(_ application: UIApplication, | |
| didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | |
| print("AppDelegate: didFinishLaunchingWithOptions - Calling KMP init.") | |
| // Call your kmp initializer kotlin code! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cocoapods.FirebaseCore.FIRApp | |
| import kotlinx.cinterop.ExperimentalForeignApi | |
| @OptIn(ExperimentalForeignApi::class) | |
| fun onDidFinishLaunchingWithOptions() { | |
| println("KMP Initializer: Starting setup...") | |
| FIRApp.configure() // Call Firebase configure | |
| println("KMP Initializer: Firebase project ID: ${FIRApp.defaultApp()?.options!!.projectID()}") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use the built in cocoapods support to bring in firebase libraries | |
| kotlin { | |
| // Remove the framework block if its here | |
| iosX64() | |
| iosArm64() | |
| iosSimulatorArm64() | |
| cocoapods { | |
| summary = "My compose multiplatform app" | |
| version = "1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "Copying GoogleService located at ${GOOGLE_SERVICE}" | |
| if [ -z "${GOOGLE_SERVICE}" ]; then | |
| echo "GOOGLE_SERVICE is unset or set to the empty string" | |
| exit 1 | |
| fi | |
| if [ ! -f "${GOOGLE_SERVICE}" ]; then | |
| echo "GOOGLE_SERVICE does not exist" | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| android { | |
| // Other configurations... | |
| buildTypes { | |
| getByName("debug") { | |
| isMinifyEnabled = false | |
| applicationIdSuffix = ".dev" | |
| versionNameSuffix = "-DEBUG" | |
| } | |
| getByName("release") { | |
| isMinifyEnabled = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| // Other plugins | |
| alias(libs.plugins.googleServices) | |
| } | |
| sourceSets { | |
| androidMain.dependencies { | |
| implementation(compose.preview) | |
| implementation(libs.androidx.activity.compose) | |
| implementation(project.dependencies.platform(libs.android.firebase.bom)) | |
| implementation(libs.android.firebase.auth) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [versions] | |
| firebase-bom = "33.14.0" | |
| google-services-plugin = "4.4.2" | |
| [libraries] | |
| android-firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" } | |
| # Optional, include if using firebase auth | |
| android-firebase-auth = { module = "com.google.firebase:firebase-auth" } | |
| # Optional, include if using firebase analytics | |
| android-firebase-analytics = { module = "com.google.firebase:firebase-analytics" } |