Hey folks, I did a quick search and couldn't find ...
# multiplatform
n
Hey folks, I did a quick search and couldn't find resolution here.. Is anyone familiar with this error while building a KMP module in iOS?
Copy code
Cannot locate tasks that match ':syncFramework' as task 'syncFramework' not found in root project 'host-android'.
Sure enough, the 'syncFramework' gradle task is not present in my Android project. My generated podspec has this:
Copy code
spec.script_phases = [
    {
        :name => 'Build mock_framework',
        :execution_position => :before_compile,
        :shell_path => '/bin/sh',
        :script => <<-SCRIPT
            if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
              echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
              exit 0
            fi
            set -ev
            REPO_ROOT="$PODS_TARGET_SRCROOT"
            "$REPO_ROOT/../../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
                -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
                -Pkotlin.native.cocoapods.archs="$ARCHS" \
                -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
        SCRIPT
    }
]
spec.libraries = 'c++'
spec.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
spec.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
Any insight would be much appreciated 🙂
ok, I got beyond this 'syncFramework' error by removing the last two lines:
Copy code
spec.user_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
spec.pod_target_xcconfig = { 'ONLY_ACTIVE_ARCH' => 'YES' }
(by modifying the cocoapod section of my build file.. not by editing the generated podspec file)