Closed vinceglb closed 1 year ago
Hi. Can you be more specific about the reproduction steps, or share a complete reproducer project?
I was able to run a macOS target in Compose 1.5.0 by:
The result is:
Sure! I found an easier setup to reproduce the problem:
Here is a reproducer project if you want, you just need to press play on XCode: https://github.com/EBfVince/compose-multiplatform-macosx-bug
I want to target the macOS SDK to be able to access MenuBarExtra.
Are you sure this (SDK=macOS) worked before with Compose 1.4?
@EBfVince
I'm not sure how that could work in the first place.
iOSApp.swift is using UIViewControllerRepresentable
transitively, which doesn't exist in macOS SDK.
Yes, you're right: using the compose plugin with macOS SDK should not work at all.
After some investigation, I realized that I had managed to get the compose plugin working with macOS SDK and Compose 1.4 using a dubious workaround. With Compose 1.5, this solution no longer works. I thought it was a bug, but it is just the expected behavior.
Thank you for your time. I close the issue.
@m-sasha, @elijah-semyonov If you are curious to reproduce the behavior I was talking about:
@vinceglb Did you eventually find a way to use MenuBarExtra with Compose Multiplatform?
Unfortunately I did not continue my investigations. But it seems doable using JNA to call native macOS API from Kotlin. I've done something similar to access native macOS file picker with Kotlin : here is an example
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug I have created a macOS target in my Compose Multiplatform project. When I build my app for that macOS target, I have an error:
Unknown iOS platform: 'macosx'
. It works well when I build for the default iOS target. It worked well when I was using Compose 1.4 but after upgrading to 1.5, the error happened.Affected platforms macOS
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior:
Expected behavior Should work like with Compose 1.4
Screenshots
Additional context Here is the log of the error: