You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After configuring the app on a Macbook Apple Silicon I got this error when trying to build it:
flutter build ios --simulator
...
Swift Compiler Error (Xcode): Cannot find type 'PhoneNumberKit' in scope
/Users/andrebaldo/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.3/ios/Classes/SwiftLibphonenumberPlugin.swift:6:24
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
To fix it you can just update the code on this file:
/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.3/ios/Classes/SwiftLibphonenumberPlugin.swift
line 7
from this: let phoneNumberKit: PhoneNumber = PhoneNumber()
to this: let phoneNumberKit: PhoneNumberUtility = PhoneNumberUtility()
and line 128
from this: let partialFormatter: PartialFormatter = PartialFormatter(phoneNumberKit: phoneNumberKit, defaultRegion: isoCode.uppercased())
to this: let partialFormatter: PartialFormatter = PartialFormatter(utility: phoneNumberKit, defaultRegion: isoCode.uppercased())
To Reproduce
Steps to reproduce the behavior:
Code Snippet
Use case
Interaction with the widget
See error
5 ...
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
** Targeted platforms (please complete the following information):**
OS [e.g. Android, iOS, ...]
Web [✔ or ❌]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Since the package was published 12 months ago and never updated, it seems that the ios version for PhoneNumberKit is already outdated. I overrode the flutter_libphonenumber_ios to the latest version "^1.4.0".
flutter_libphonenumber_ios: "^1.4.0"
I ran flutter pub get, removed Podfile.lock and run pod install --repo-update. I only encountered this error after updating to XCode 16.2 and ios 18.2.
Describe the bug
After configuring the app on a Macbook Apple Silicon I got this error when trying to build it:
flutter build ios --simulator
...
Swift Compiler Error (Xcode): Cannot find type 'PhoneNumberKit' in scope
/Users/andrebaldo/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.3/ios/Classes/SwiftLibphonenumberPlugin.swift:6:24
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
Package version
intl_phone_number_input: ^0.7.4
Flutter version
Flutter 3.24.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision dec2ee5c1f (3 weeks ago) • 2024-11-13 11:13:06 -0800
Engine • revision a18df97ca5
Tools • Dart 3.5.4 • DevTools 2.37.3
To fix it you can just update the code on this file:
/.pub-cache/hosted/pub.dev/libphonenumber_plugin-0.3.3/ios/Classes/SwiftLibphonenumberPlugin.swift
line 7
from this: let phoneNumberKit: PhoneNumber = PhoneNumber()
to this: let phoneNumberKit: PhoneNumberUtility = PhoneNumberUtility()
and line 128
from this: let partialFormatter: PartialFormatter = PartialFormatter(phoneNumberKit: phoneNumberKit, defaultRegion: isoCode.uppercased())
to this: let partialFormatter: PartialFormatter = PartialFormatter(utility: phoneNumberKit, defaultRegion: isoCode.uppercased())
To Reproduce
Steps to reproduce the behavior:
5 ...
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
** Targeted platforms (please complete the following information):**
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: