icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
351 stars 21 forks source link

Sample app compilation issues - Missing xcconfig and no such module #12

Closed mattmook closed 3 years ago

mattmook commented 3 years ago

When opening the iOS workspace for the first time, you see the following errors:

image

It would be useful to have better documentation around getting the sample compiling, as this error can easily be fixed by running pod install.

The next issue I hit is:

image

This occurs regardless of running ./gradlew build

Alex009 commented 3 years ago

hi! here my steps for local development:

# clone repo
git clone git@github.com:icerockdev/moko-kswift.git
cd moko-kswift 
# generate podspec files for cocopods intergration. with integration will be generated swift files for cocoapod
./gradlew kSwiftmpp_library_podsPodspec
./gradlew kSwiftMultiPlatformLibraryPodspec
# go to ios dir
cd sample/ios-app
# install pods
pod install
# now we can open xcworkspace and build ios project
open ios-app.xcworkspace
# or run xcodebuild
xcodebuild -scheme ios-app -workspace ios-app.xcworkspace test -destination "platform=iOS Simulator,name=iPhone 12 mini"
xcodebuild -scheme pods-test -workspace ios-app.xcworkspace test -destination "platform=iOS Simulator,name=iPhone 12 mini"

by this steps you should got correct setup.

i add this steps into readme

mattmook commented 3 years ago

Thanks @Alex009 the new instructions work like a treat