acoutts / flutter_libphonenumber

Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps. Includes a TextInputFormatter to allow real-time AsYouType formatting.
MIT License
59 stars 72 forks source link

Parse method does not work on new iOS 16.4.1 #42

Closed mdeimert closed 1 year ago

mdeimert commented 1 year ago

Parse method does not work on 16.4.1 iOS getting this error:

Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 1119 named com.apple.commcenter.coretelephony.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 1119 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.}

I've tested the same build on iOS 16.4.0 and the plugin works fine.

ghost commented 1 year ago

Whoa nice find! Looking at the phonenumberkit repo, it seems to be a known issue.

https://github.com/marmelroy/PhoneNumberKit/issues/626

I'll bump the pod version and get that pushed now.

mdeimert commented 1 year ago

Thanks a lot!

ghost commented 1 year ago

I seem to be having an issue with cocoapods right now, across several projects so it must be a cocoapods CDN issue.

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: URL using bad/illegal format or missing URL

I might just need to wait a few hours, I'll give it another try later tonight / tomorrow morning.

mdeimert commented 1 year ago

This might help @acoutts-nydig :

I got it working by using below commands:

pod repo remove trunk

and then

pod install or pod update

mdeimert commented 1 year ago

Hi @acoutts-nydig were you able to check it out? - it's important for my production app :( Sorry to bother.

ghost commented 1 year ago

I just released 2.1.0 with the latest PhoneNumberKit - give that a try please.

Also note the breaking change that we need to manually include the dependency in our Podfile now. I filed this issue asking how we can work around it: https://github.com/marmelroy/PhoneNumberKit/issues/638

pod "PhoneNumberKit", :git => "https://github.com/marmelroy/PhoneNumberKit", :tag => "3.5.9"

They stopped publishing updates to cocoapods and only put it on git now, and you can't define a git dependency in a podspec file.

mdeimert commented 1 year ago

Hi Thanks for the update.

Im getting this error now:

Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): No such module 'PhoneNumberKit'
/Users/mike/.pub-cache/hosted/pub.dev/flutter_libphonenumber_ios-1.1.0/ios/Classes/SwiftFlutterLibphonenumberIosPlugin.swift:2:7

After updaing package i did flutter clean removed Podfile.lock and updated Podfile with the PhoneNumberKit line.

mdeimert commented 1 year ago

@acoutts-nydig In think this podspec dependency still needs to be there:

image

I've added it manually on my local to flutter_libphonenumber_ios.podspec and the build goes smoothly and plugin works fine on 16.4.1. But we will need it on your master branch 👍

ghost commented 1 year ago

aha! of course - have to include it in the podspec as well.

mdeimert commented 1 year ago

@acoutts-nydig You will bump the version or it will be the same? :) Thanks in advance.

ghost commented 1 year ago

Published 2.1.1 with the fix

mdeimert commented 1 year ago

Tested & works good on 16.4.1. Thank you for quick reaction!