Compiling for iOS 12.0, but module ‘Capacitor’ has a minimum deployment target

Forums How to solve Compiling for iOS 12.0, but module ‘Capacitor’ has a minimum deployment target

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #122294
    albanaavdiu
    Participant

    Problem :
    Compiling for iOS 12.0, but module ‘Capacitor’ has a minimum deployment target of iOS 13.0: /Users/user/Library/Developer/Xcode/DerivedData/App-gaupmbtshmqbxzekeowabwveibft/Index.noindex/Build/Products/Debug-iphonesimulator/Capacitor/Capacitor.framework/Modules/Capacitor.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

    Solution :

    1. Set platform in your Podfile
    If you don’t have a Podfile, generate one:

    cd ios/App
    pod init

    Then edit the Podfile and set the platform:
    platform :ios, ‘13.0’

    Then run:
    cd ios/App
    pod install

    grep -rnw ‘./’ -e ‘12.0’ –include=”*.pbxproj” –include=”*.plist”
    (If the value reverts back to 12.0, this happens because Pods.xcodeproj is auto-generated by CocoaPods. You should not manually edit it because CocoaPods will overwrite it):

    sed -i ” ‘s/IPHONEOS_DEPLOYMENT_TARGET = 12.0;/IPHONEOS_DEPLOYMENT_TARGET = 13.0;/g’ ios/App/App.xcodeproj/project.pbxproj

    If still the same after npx cap sync android:
    Correct Podfile structure:

    workspace ‘App.xcworkspace’ # ✅ Add this line first
    platform :ios, ‘14.0’
    use_frameworks!

    # workaround to avoid Xcode caching of Pods that requires
    # Product -> Clean Build Folder after new Cordova plugins installed
    # Requires CocoaPods 1.6 or newer
    install! ‘cocoapods’, :disable_input_output_paths => true

     

    #122298
    albanaavdiu
    Participant

    After saving :
    cd ios/App
    pod install

    Force override all deployment targets to 14.0
    Open your Podfile and add this block at the end:
    post_install do |installer|
    installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings[‘IPHONEOS_DEPLOYMENT_TARGET’] = ‘14.0’
    end
    end
    end

    Reinstall pods
    cd ios/App
    rm -rf Pods Podfile.lock
    pod install

    Re-check the results:
    grep -rnw ‘./’ -e ‘IPHONEOS_DEPLOYMENT_TARGET’ –include=”*.pbxproj”

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.