gpt4 book ai didi

ios - 在 iOS 上使用 libPhoneNumber 列出所有国家/地区的代码和调用代码

转载 作者:行者123 更新时间:2023-11-30 14:17:13 25 4
gpt4 key购买 nike

我遇到了这个Stackoverflow Thread about listing countries and it's calling codes using libPhoneNumber library

解决办法是这样的

Use the getSupportedRegions() method, then iterate these regions calling getCountryCodeForRegion().

但是,接受的解决方案不适用于 iOS 版本的 libPhoneNumber。 getSupportedRegions() 在 iOS 版本上不可用

有什么想法可以在 iOS 使用 libPhoneNumber 中执行此操作吗?

最佳答案

解决方案是:

import libPhoneNumber_iOS


override func viewDidLoad() {
super.viewDidLoad()

let phoneUtil = NBPhoneNumberUtil()
let regions = phoneUtil.getSupportedRegions()
}

关于ios - 在 iOS 上使用 libPhoneNumber 列出所有国家/地区的代码和调用代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30979188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com