Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 17 & Xcode 15.0 (R.C.) - Swift Compiler Error (Xcode) PhoneNumberKit from 11.0 to 12.0 #29

Open
kekko7072 opened this issue Oct 3, 2023 · 3 comments

Comments

@kekko7072
Copy link

kekko7072 commented Oct 3, 2023

I use this flutter plugin and i'm getting this error with iOS 17 and Xcode 15 - RC.

Swift Compiler Error (Xcode): Compiling for iOS 11.0, but module 'PhoneNumberKit' has a minimum deployment target of iOS 12.0: /Users/francescovezzani/Developer/TomorrowTech/software/app/management/build/ios/Debug-dev-iphonesimulator/PhoneNumberKit/PhoneNumberKit.framework/Modules/PhoneNumberKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
/Users/francescovezzani/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.2/ios/Classes/SwiftLibphonenumberPlugin.swift:2:7

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.
`
Can you deploy a fix?
@kekko7072 kekko7072 changed the title iOS 17 & Xcode - Swift Compiler Error (Xcode) PhoneNumberKit from 11.0 to 12.0 iOS 17 & Xcode 15.0 (R.C.) - Swift Compiler Error (Xcode) PhoneNumberKit from 11.0 to 12.0 Oct 3, 2023
@kekko7072
Copy link
Author

kekko7072 commented Oct 3, 2023

I changed my ios/Podfile file for a temporary fix.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
# START - Temporary Fix
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
# END - Temporary Fix
        xcconfig_path = config.base_configuration_reference.real_path
        xcconfig = File.read(xcconfig_path)
        xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
        File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
    end
  end
end

Then do this to make changes:

  1. Run flutter clean
  2. Delete Podfile.lock

@fwilliamconceicao
Copy link

Does anyone will check this?

This lib is being a quite headache in the last 2 months at least having a lot issues with compatibilities.

@fwilliamconceicao
Copy link

I changed my ios/Podfile file for a temporary fix.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
# START - Temporary Fix
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
# END - Temporary Fix
        xcconfig_path = config.base_configuration_reference.real_path
        xcconfig = File.read(xcconfig_path)
        xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
        File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
    end
  end
end

Then do this to make changes:

  1. Run flutter clean
  2. Delete Podfile.lock

@kekko7072 in fact there's already a PR open for this: #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants