When we use `experimental.uikit` is it possible t...
# compose-ios
a
When we use
experimental.uikit
is it possible to customise the ios generated project's
info.plist
? So I can ad permission request reason?
👍 1
d
Yes, you can configure it. For example to use camera, you can add this line: https://github.com/JetBrains/compose-multiplatform/blob/master/examples/imageviewer/iosApp/iosApp/Info.plist#L25
a
This is normal iosApp, but i'm asking about the generated xcode project we get if we use the experimental uikit with:
Copy code
iosArm64("uikitArm64") {
        binaries {
            executable {
                entryPoint = "main"
                freeCompilerArgs = freeCompilerArgs + listOf(
                    "-linker-option", "-framework", "-linker-option", "Metal",
                    "-linker-option", "-framework", "-linker-option", "CoreText",
                    "-linker-option", "-framework", "-linker-option", "CoreGraphics"
                )
                freeCompilerArgs = freeCompilerArgs + "-Xdisable-phases=VerifyBitcode"
            }
        }
    }
and compose block
Copy code
compose.experimental {
    web.application {}
    uikit.application {
        bundleIdPrefix = project.group.toString()
        projectName = rootProject.name
        deployConfigurations {
            simulator("IPhone13Pro") {
                //Usage: ./gradlew iosDeployIPhone8Debug
                device = org.jetbrains.compose.experimental.dsl.IOSDevices.IPHONE_13_PRO
            }
            connectedDevice("Device") {
//                Usage: ./gradlew iosDeployDeviceRelease
//                this.teamId = ""
            }
        }
    }
}
and the
.xcproject
gets generated when we run
iosDeviceDeployDebug
CleanShot 2023-06-18 at 14.05.48@2x.png
d
Better to use approach from this template: https://github.com/JetBrains/compose-multiplatform-template It is more flexible
a
Yeah i know it. This is what i normally use 🙂
d
This code block may be deprecated in the future:
Copy code
deployConfigurations {
            simulator("IPhone13Pro")
a
But i was hoping that the uikit one will allow us to have any custom customisation yet
any chance to pass any stuff to xcode project using freeCompilerArgs?
d
As I understand, freeCompilerArgs needs to configure Kotlin compiler. It can't be used to configure Xcode.