JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.91k stars 1.16k forks source link

Cannot build on Mac for iOS #3481

Open djnotes opened 1 year ago

djnotes commented 1 year ago

Describe the bug I have xcode 14.2 installed. On Android Studio Giraffe 2022.3.1 Beta 5. I have been trying to build Compose Multiplatform apps on this machine more than 7 times. It all failed when selecting iosApp as target. Android and Desktop targets build successfully, though.
The error:

The following build commands failed:
    PhaseScriptExecution [CP-User]\ Build\ shared /Users/mhd/src/compose-multiplatform/examples/imageviewer/build/ios/Pods.build/Debug-iphonesimulator/shared.build/Script-BEA8885189D408D600647BDC228A6A20.sh (in target 'shared' from project 'Pods')
(1 failure)

Tried running via Xcode. Similar errors popped up as shown in the screenshots section.

Affected platforms Select one of the platforms below:

If the bug is Android-only, report it in the Jetpack Compose tracker

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior: 1- Clone compose-multiplatform repo 2- Open examples/imageviewer in Android Studio 3- Sync Gradle and select target iosApp. 4- Press Run

Expected behavior The iOS version is expected to build and launch successfully on the simulator.

Screenshots Screen Shot 2023-08-11 at 6 38 36 PM

Screen Shot 2023-08-11 at 6 41 03 PM

Additional context I have not been able to get any successful builds for iOS on Mac so far, both for example JB projects and both for projects I create from scratch in Android Studio. Tried changing networks. Didn't help.

m-sasha commented 1 year ago

Seems like the compiler wants you to add an "opt-in" annotation. Did you try that (in Android Studio)?

djnotes commented 1 year ago

But, I am not building with commandline. How should I pass that option to the compiler?

m-sasha commented 1 year ago

It's not an issue of passing flags to the compiler. You need to add an @OptIn annotation in the code. If you open it in Android Studio you will see a fix suggestion there.

clonedSemicolon commented 9 months ago

Is the issue solved or is there some kind of workaround?

JoeNajm commented 5 months ago

I am encountering the same issue. Did you find a solution?

djnotes commented 5 months ago

Hi Joe, On Mac version and which MacOS version are you? 

On Sat, Mar 23, 2024 at 16:27, @.***> wrote:

I am encountering the same issue. Did you find a solution?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

JoeNajm commented 5 months ago

Hello Mehdi, I am using a Mac mini with Ventura 13.6.4 (however i am using it via a cloud platform called "MacinCloud") Best, Joe

okushnikov commented 2 weeks ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.