icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1k stars 95 forks source link

iOS pod installation problem #46

Closed Chopyhoo closed 4 years ago

Chopyhoo commented 4 years ago

Hi!

On iOS, in addition to the Kotlin library add in Podfile

pod 'MultiPlatformLibraryMvvm', :git => 'https://github.com/icerockdev/moko-mvvm.git', :tag => 'release/0.6.0'

Trying to install via cocoa pods and getting an error:

Pre-downloading: MultiPlatformLibraryMvvm from https://github.com/icerockdev/moko-mvvm.git, tag release/0.6.0 [!] Unable to find a specification for MultiPlatformLibrary depended upon by MultiPlatformLibraryMvvm

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

"Pod repo update" doesn't fix the problem, although without it binding LiveData works fine.

Is there something I'm missing? Thank you

Alex009 commented 4 years ago

hi! you should connect kotlin/native framework as cocoapod with name MultiPlatformLibrary. Just like here https://github.com/icerockdev/moko-mvvm/blob/master/sample/ios-app/Podfile#L19

Alex009 commented 4 years ago

i think issue resolved

shasha1023 commented 3 years ago

Hi @Alex009,

I have the same issue, then I edited my Podfile just like you suggested, but I use releare -> 0.7.1

image

When I run pod install, it says:

[!] No podspec found for MultiPlatformLibrary in ../mpp-library

Is there anything wrong? Thanks!

Alex009 commented 3 years ago

@shasha1023 hi! you have file MultiPlatformLibrary.podspec at path ../mpp-library?

shasha1023 commented 3 years ago

No.

Alex009 commented 3 years ago

@shasha1023 cocoapods search MultiPlatformLibrary.podspec file at path ../mpp-library. example of podspec here - https://github.com/icerockdev/moko-mvvm/blob/master/sample/mpp-library/MultiPlatformLibrary.podspec

sebaslogen commented 1 year ago

The Kotlijn Multiplatform in Android Studio setup automatically creates a shared folder and a shared.pubspec, when I try to rename the framework's baseName in shared/build.gradle.kts to MultiPlatformLibrary the pubspec file still remains shared/shared.pubspec so I get Pod errors and iOS cannot compile 😰

Is there a way to make the library work without the framework rename? If not, is there a way to make the tooling change the framework name in all required places at once? It seems I'm going down a rabbit hole with the framework rename step.

Thanks in advance.