https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
j

Joel Denke

11/20/2023, 3:34 PM
Ok got really odd issue, when I launch an COmpose multipltform iOS app from XCode or Fleet it work to run/launch. But however if run from Android Studio it doesnt. I presume I missing some kind of launch Flag in Android Studio. Any pointers to this?
p

Pablichjenkov

11/20/2023, 3:36 PM
Do the logs tell something or Android Studio itself? So the App updates but doesn't automatically launch? Is that what you experienced?
j

Joel Denke

11/20/2023, 3:37 PM
Yes:
Copy code
dyld[4954]: Library not loaded: @rpath/FirebaseAuth.framework/FirebaseAuth
  Referenced from: <07AF2962-87B0-31B7-AE4C-6FDD3BA39E2A> Developer/CoreSimulator/Devices/69086EE1-4025-44D8-B1A8-4C9B9B18065D/data/Containers/Bundle/Application/77407407-D136-4F44-BF46-97CE44D92F1E/MyApp
  Reason: tried: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FirebaseAuth.framework/FirebaseAuth' (no such file), '/usr/lib/swift/FirebaseAuth.framework/FirebaseAuth' (no such file, not in dyld cache), 'Developer/CoreSimulator/Devices/69086EE1-4025-44D8-B1A8-4C9B9B18065D/data/Containers/Bundle/Application/77407407-D136-4F44-BF46-
Interesting I got another hidden problem in Xcode/Fleet, where I had issues from font files not shared from shared module into my font multiplatform solution. WHen disabled that temporary it worked in those, but in Android Studio nope. Tried change a lot of parameters, but feels like I should create a new iOS app launch in Android Studio?
@Pablichjenkov I am using KMP 1.5.10, Kotlin 1.9.20 and Android Studio Giraffe patch 4. Libraries used:
Copy code
compileSdkVersion = "34"
minSdkVersion = "26"
targetSdkVersion = "34"
versionCode = "1"
versionName = "1.0"

koin = "3.4.2"
ktor = "2.2.1"
kotlin = "1.9.20"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization = "1.4.1"
kotlinx-datetime = "0.4.0"
sqldelight = "1.5.5"
gradle-plugin = "8.1.4"
multiplatform-paging = "3.1.1-0.1.1"
jetbrains-compose = "1.5.10"
google-services = "4.3.15"
firebase-auth = "1.10.4"
androidx-lifecycle = "2.6.1"
slack-circuit = "0.16.1"
androidx-activity = "1.8.1"
google-play-services = "20.5.0"
c

Cherrio LLC

11/20/2023, 4:12 PM
Are you using FirebaseAuth through cocoapods??
j

Joel Denke

11/20/2023, 4:17 PM
No, or well I did use it in Cocoapods but migrated to Swift package mamager.
I dont think its Firebase issue here, its something else in build process or flags invalid in Android Studio 😛
p

Pablichjenkov

11/20/2023, 6:56 PM
Humm from the logs the only thing I inferred is the firebase library wasn't loaded
j

Joel Denke

11/20/2023, 6:57 PM
Also to add same project works in Android app scope with same Firebase setup. Keep in mind same project launches fine with no modification in Xcode and Fleet for iOS.
p

Pablichjenkov

11/20/2023, 6:57 PM
Yeah doesn't look like a firebase issue. You can try the regular invalidate caches, build clean, restart AS.
j

Joel Denke

11/20/2023, 6:58 PM
It feels like a build flag is "wrong" and all Swift packages fail to load. And firebase happen to be the first one in the list.
1
p

Pablichjenkov

11/20/2023, 6:58 PM
Could be related to cache
j

Joel Denke

11/20/2023, 6:59 PM
Invalidated cache and such, no change. Also most often impact Gradle only. I think creating iOS run config adding some odd build parameters and make Xcode fail.
Could be kotlin multiplatform plugin bug?
Not related necessarily but also odd one Android library cannot have androidTarget set at all. Wonder if issue I use Java 17. Feels something is off in Android Studio.
p

Pablichjenkov

11/20/2023, 7:01 PM
Seems to be related to Android Studio. The problem AS support for KMP is not really a priority
j

Joel Denke

11/20/2023, 7:02 PM
I guess I should just start using Fleet now 😁
😁 1
p

Pablichjenkov

11/20/2023, 7:03 PM
That is what JB most likely would tell you if you open a ticket for Android Studio
j

Joel Denke

11/20/2023, 7:05 PM
Yeah JB want us using Fleet for KMP anyway. Just not like the IDE, to simple, bad ui and horrible ux. Feels like using vim or vs code again. Ah well will see. Next up solving shared fonts not working 😁
Want to start focus on programming and less trial and error build issues 😁
p

Pablichjenkov

11/20/2023, 7:29 PM
I see , definitely side with you.
8 Views