ribesg
02/26/2024, 2:54 PMComposeUIViewController
just does not seem to start or somethingribesg
02/26/2024, 2:55 PMclass AppDelegate @OverrideInit constructor() : NSObject(), UIApplicationDelegateProtocol {
companion object : NSObjectMeta(), UIApplicationDelegateProtocolMeta
private val startComponentContext: ComponentContext =
DefaultComponentContext(ApplicationLifecycle())
private var uiWindow: UIWindow? = null
override fun application(
application: UIApplication,
didFinishLaunchingWithOptions: Map<Any?, *>?,
): Boolean {
startKoin(koinAppDeclaration)
configureWindowWithStartComponent()
return true
}
override fun setWindow(window: UIWindow?) {
uiWindow = window
}
override fun window(): UIWindow? = uiWindow
private fun configureWindowWithStartComponent() {
setWindow(UIWindow(frame = UIScreen.mainScreen.bounds))
window!!.run {
backgroundColor = UIColor.blackColor
Logger.d { "Before ComposeUIViewController creation" }
rootViewController = ComposeUIViewController {
Logger.d { "Inside ComposeUIViewController content" }
StartContent(DefaultStartComponent(startComponentContext))
}
makeKeyAndVisible()
}
}
}
I can see the first log but not the second oneribesg
02/26/2024, 2:55 PMFirst responder issue detected: non-key window attempting reload - allowing due to manual keyboard (first responder window is <UIWindow: 0x13eb08180; frame = (0 0; 393 852); gestureRecognizers = <NSArray: 0x6000026a4e10>; backgroundColor = UIExtendedGrayColorSpace 0 1; layer = <UIWindowLayer: 0x6000026b59e0>>, key window is (null))
ribesg
02/26/2024, 2:56 PMfun main(args: List<String>) {
memScoped {
autoreleasepool {
UIApplicationMain(
argc = args.size + 1,
argv = arrayOf("konan", *args.toTypedArray()).toCStringArray(memScope),
principalClassName = null,
delegateClassName = NSStringFromClass(AppDelegate)
)
}
}
}
ribesg
02/26/2024, 2:57 PMribesg
02/26/2024, 3:55 PMribesg
02/26/2024, 3:59 PMUILaunchScreen
key to Info.plist… Who like iOS anyway