Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ios target for using library with Compose for iOS #6

Closed
VitalyPeryatin opened this issue Dec 25, 2022 · 13 comments
Closed

Add ios target for using library with Compose for iOS #6

VitalyPeryatin opened this issue Dec 25, 2022 · 13 comments

Comments

@VitalyPeryatin
Copy link
Contributor

Add ios target for using library with Compose for iOS. It is impossible to use these dependencies in project with Compose for iOS without this target:

  • koalaplot-core

image

@gsteckman
Copy link
Member

Hi, I've added the ios() target and updated the GitHub actions to build on MacOS. However, there is a build error. Unfortunately, I don't have a Mac so I cannot troubleshoot the problem locally, and it took the runner almost 10 minutes to get to the point where a missing symbol was found.

If you have a Mac, could you help find the problem?

Link to the build log with the error

@maltsev-gorskij
Copy link
Contributor

maltsev-gorskij commented Jun 14, 2023

@gsteckman can you please try your ci pipeline without commonTest folder?
I have thought thats this maybe a problem with dependencies linking in iOS framework in commonTest source during compiling iOS target. I tried to reproduce the problem and it does not appear only if i remove this folder. I cannot figure out how to fix this concrete problem yet, but it worked for me.

This can be starting point for debugging overall problem

@maltsev-gorskij
Copy link
Contributor

Hi again @gsteckman !
Also see this issue JetBrains/compose-multiplatform#2342

Please try to add
kotlin.native.cacheKind=none
in your gradle.properties and try building project with ios() source set

@gsteckman
Copy link
Member

I merged the PR from @jakepurple13 which includes the cacheKind property. But the builds are still failing due to undefined symbols during linking. There are a lot of warnings of mismatched versions for the simulator, which may be the root cause of the undefined symbols. The odd thing is in the latest commit I removed the iosSimulatorArm64() target, but it is still causing errors, see log for version 11 vs version 9.

When I left iosSomulatorArm64() in, it was version 15.2 vs version 9 - see log.

Any ideas where these version numbers are coming from? I tried searching and looked at some of the Kotlin multiplatform examples, but didn't see any ios specific version information in the build files.

@maltsev-gorskij
Copy link
Contributor

Hello again @gsteckman. I'v created PR with fixes, which helped me to assemble all library artifacts and sucessfully use your library in compose multiplatform #16

@zacharee
Copy link

zacharee commented Aug 5, 2023

Is there a way to get a snapshot build of the repo? JitPack doesn't seem to work anymore.

@maltsev-gorskij
Copy link
Contributor

Is there a way to get a snapshot build of the repo? JitPack doesn't seem to work anymore.

Hi @zacharee.

I'm still waiting for @gsteckman to publish a new release with latest fixes.
For now i'm publishing Koalaplot artifacts to mavenLocal() with publishToMavenLocal gradle task and building my project this way.

@gsteckman
Copy link
Member

Hi @zacharee, I published a 0.4.0-dev1 build with ios artifacts. Please let me know if they don't work ok for you. I don't own any Apple devices so can't test them. Thanks to @maltsev-gorskij for helping to get the ios build working.

@zacharee
Copy link

I tried it, but it doesn't look like iOS artifacts got generated/uploaded. Gradle fails to sync because it can't find the ones for iOS.

@gsteckman
Copy link
Member

I see them in search results at https://central.sonatype.com/search?q=koalaplot, and also can see the files at https://repo1.maven.org/maven2/io/github/koalaplot/.

What is the specific error you are getting?

@zacharee
Copy link

zacharee commented Aug 12, 2023

I tried again and it's syncing now ¯\_(ツ)_/¯. I'll open a new issue if there are problems with functionality on iOS.

@maltsev-gorskij
Copy link
Contributor

Hi @zacharee, I published a 0.4.0-dev1 build with ios artifacts. Please let me know if they don't work ok for you. I don't own any Apple devices so can't test them. Thanks to @maltsev-gorskij for helping to get the ios build working.

No problems. Glad to help ;)

P.S. Thanks for release!

@joreilly
Copy link

joreilly commented Sep 6, 2023

Tried out the iOS support and works great....thanks!

https://twitter.com/joreilly/status/1699444224184201703?s=20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants