kodika / MutataApp

49 stars 9 forks source link

Swift pods are detected by the compiler as pods with mixed languages #3

Closed OmerFlame closed 1 year ago

OmerFlame commented 2 years ago

I am trying to compile my iOS app to Android and I am constantly getting this issue when I try to compile my project that has Pods attached to it:

https://app.warp.dev/block/Dag8aitrgC9k9zaFsYMVIr

How do I fix this issue with my pods? They don't seem to contain any ObjC code at all. They only include some kind of FOUNDATION_EXPORT header files, as well as some umbrella files (possibly generated by CocoaPods itself).

How do I fix this?

kostassite commented 2 years ago

The problem with Pods is that Swift Package Manager includes the whole Pods folder and not just the Sources as it doesn't know where to find the Sources.

You will need to create a Package.swift for each Pod at the moment. We are looking into ways to autogenerate the Package.swift from the Podfile but it is not ready yet. You can write me the needed Pods and I will try to create you some examples.

OmerFlame commented 2 years ago

Take BadgeControl as an example.

OmerFlame commented 2 years ago

Can you give me an example? I am trying my hardest to make it work here.

kostassite commented 2 years ago

We tried it yesterday and didn't work out of the box, so we are creating a new Swift Android toolchain that will support your pods.

kostassite commented 2 years ago

@OmerFlame Do you have a public repo with the iOS project that you are trying to use?

OmerFlame commented 2 years ago

Yes, my project called AltRant. I recently converted all of my CocoaPods dependencies to Swift Package Manager by forking them and creating my versions that are compatible with the Swift Package Manager. Sadly, it STILL doesn't compile because of issues regarding UICollectionView stuff in one of my dependencies and other things that are completely missing (most of the times it's UIKit stuff that is missing).

OmerFlame commented 2 years ago

If you will be able to compile my project using Mutata, I'll be really happy because there seems to be a demand for an Android version and your framework seems to be the absolute perfect candidate for my existing project.

OmerFlame commented 2 years ago

We tried it yesterday and didn't work out of the box, so we are creating a new Swift Android toolchain that will support your pods.

I highly appreciate your efforts. I believe that this project is still in its very early development period. Just trying out your demo project, I was seriously impressed. You got everything to somehow work cross-platform. I believe that these current issues are just growing pains and they will be resolved very soon, seeing how far you got into making UIKit on Android a reality.

I am rooting for your team and I will not be closing this issue until I see my project working on Android, I think that I got really really close and it just needs a little more work. If you need any assistance from me or anything, tell me here!

kostassite commented 2 years ago

@OmerFlame I tried your project and it has some features that are not available at the moment. I hope we have them ready in the next weeks. I will inform you.

OmerFlame commented 2 years ago

What features are not implemented yet? Every time I tried compiling my app in its current state, the compiler gave me a simply MASSIVE amount of errors regarding missing members of UICollectionView and other stuff that are just either being missed by the Swift compiler or just blatantly not there.

OmerFlame commented 2 years ago

@kostassite Are there any updates about the framework?

kostassite commented 1 year ago

Hi @OmerFlame could you please retry using our latest version? It has lots of fixes and updates.