Hi guys! I’m looking for how to make a mpp project...
# multiplatform
e
Hi guys! I’m looking for how to make a mpp project work with the following structure: - MPP Kotlin Module [domain] - iOS App [iosApp] So far my only option to get it to work is manually move the generated framework to my iOS xCode Project. Nonetheless I get this “image not found” runtime error on a daily basis. Is there any way to bind the build process of the iOS App to build and bind the Kotlin framework? I’ve been all over Google looking for an answer with no success so far…
r
Well you can just run gradle in the XCode build steps
e
yes this is actually what I do, but when it comes to running the app I get the “image not found” error. Any chance you could check this script
Copy code
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

case "$PLATFORM_NAME" in
iphoneos)
TARGET=ios_arm64
TASK=linkMainDebugFrameworkIos
;;
iphonesimulator)
TARGET=ios_x64
TASK=linkMainDebugFrameworkIos
;;
*)
echo "Unknown platform: $PLATFORM_NAME"
exit 1
;;
esac

pwd
echo "$TARGET"
echo "$PLATFORM_NAME"
echo "$TASK"

mkdir -p "$SRCROOT/build/konan/bin/"
rm -rf "$SRCROOT/build/konan/bin/xcode"
cp -r "$SRCROOT/../domain/build/bin/ios/mainDebugFramework" "$SRCROOT/build/konan/bin/xcode"

cd ..
"$SRCROOT/../gradlew" -p "$SRCROOT/../" "$TASK"
r
I’m just using Gradle, no bash script needed