j

    jimmyt

    11 months ago
    I'm working on a KMM project with CocoaPods dependencies. For some reason unknown to me, the iOS Deployment Target for each Pod target on which my project depends is being set to 8.0 each time I try to sync the project, but the range of supported deployment target versions is 9.0 to 14.5.99, so each time I try to sync the project, it fails on the shared😛odBuild(PodName)Iphonesimulator task. I tried opening up the project in Xcode and changing the versions manually, but this does not work because the iOS Deployment Target is changed back to 8.0 each time I attempt to sync the project. What else can I do about this?
    Matti MK

    Matti MK

    11 months ago
    Bump the targets in your Podfile
    post_install
    block:
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $deploymentTarget
        end
      end
    end
    j

    jimmyt

    11 months ago
    Should this be in Project/iosApp/Podfile ? I tried placing it there, but I'm still running into the same issue.
    Matti MK

    Matti MK

    11 months ago
    Yes
    I'm not sure what the Gradle command does that you are running though. I manually build the dependency and then run pod install to integrate with the iOS project
    What happens if you build, then run pod install, then launch the app with Xcode?
    j

    jimmyt

    11 months ago
    Actually, I'm seeing that there is a Swift compiler error that is causing the build to fail, perhaps before the post_install changes can be applied. Let me try to fix that first, and I'll report back.
    Matti MK

    Matti MK

    11 months ago
    Good luck 🤞