CTTelephonyNetworkInfo.currentRadioAccessTechnology is deprecated in iOS 12. so is there any api to get the network type?. we can use NWPathMonitor to know wifi, cellular, ethernet type but not 3g,4g,5g etc. Is there any complete solution for this.
Determine network type in iOS 14 Swift 5 without Thirdparty Library
1.4k Views Asked by SreekanthI At
2
There are 2 best solutions below
0
Gordon Dove
On
CTTelephonyNetworkInfo.currentRadioAccessTechnology was deprecated in iOS 12, but only because iOS 12 introduced multisim support; hence there is no single radio access technology.
The same information is available in the dictionary CTTelephonyNetworkInfo.serviceCurrentRadioAccessTechnology.
In most cases, you can just use CTTelephonyNetworkInfo.serviceCurrentRadioAccessTechnology[CTTelephonyNetworkInfo.dataServiceIdentifier]
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in NETWORKING
- How to avoid duplicates with the pull-based subscribe model?
- How to simulate CSMA/CD protocol in ns3?
- Network System - Cisco Packet Tracer
- Adhoc / mesh network not working (with and without batman-adv)
- Algorithm for finding a subset of nodes in a weighted connected graph such that the distance between any pair nodes are under a postive number?
- Python Client-Server Communication with Protocol
- I registered a service in eureka which is resolving through java code. But it is not able to resolve its name when hitting through chrome or postman
- Share files from the server without data or internet usage
- Player names not synchronizing in unity Mirror Networking
- My phone can not visit the server on macos in the same local network
- Unable to ping remote websites from an ipV6 only ubuntu ec2 Instance
- Linux Networking - Routing packets from one network interface to another
- wrong output from Supernetting algorithm
- Mapping localhost port on host to docker container
- Microsoft Message Analyzer disable resolving IP address to their domain names a.k.a turn off AutoIP feature
Related Questions in SWIFT5
- How to do a Tuple extension in current Swift? It seems to be available experimentally
- No such module 'SwiftData'
- Is it perfectly correct that this computed property will work like a "pointer" in current Swift?
- Combining drawing animation with live video using Swift and Pencilkit
- Is it absolutely the case that Swift >will not< deep copy a large array, when one "guard let" the array?
- Is there a way to drop the comma and space elements when using Date.FormatStyle?
- NavigationStackView .searchable modifier not visible when embedded in NavigationSplitView
- Get height of a view inside ZStack in SwiftUI
- How to add axis titles with DGCharts in Swift?
- swift | Nothing in multiple TableView with custom cell
- Xcode 15: After deploy build to TestFlight, fonts have another style
- xcode datatask not running
- How can I change the source location of an OSLog Message?
- QLPreviewControllerRepresentation does not conform to protocol UIViewControllerRepresentable
- NSBatchInsert does not work for CoreData Transformable Attribute e.g. Dictionary<String, String>
Related Questions in IOS14
- Create custom interactive tooltip in swiftUI
- Is it possible to disable the back navigation menu in SwiftUI?
- Set UITableViewCell secondaryText multiple lines
- Orientation issue occurs While Rotate landscape mode to portrait mode In SwiftUI
- Get height of a view inside ZStack in SwiftUI
- How to add Done button to Number Pad keyboard in swiftUI iOS 14
- Resolve: background(alignment:content:) is only available in iOS 15.0 or newer
- How to add axis titles with DGCharts in Swift?
- SwiftUI Interation with Widget on iOS 14
- Is there a way that I can use to create a Dynamic Sheet Height using in SwiftUI (iOS14.7)?
- conflicts with navigation view on SwiftUI
- iOS 13 ObservedObject is not updating the UI while StateObject doing same in iOS 14
- Issue with Combine when migrating to iOS 14
- iOS Universal Linking with Browsers other than Safari
- I can not debug ionic app on macOS ventura. What has changed?
Related Questions in NWPATHMONITOR
- nw_path_monitor_t / NWPathMonitor: is cancelling on background / resuming on foreground necessary?
- How to detect the switching to different wifi networks in iOS?
- NWPathMonitor error when monitoring the internet connection
- Use NWPathMonitor with Swift Modern Concurrency (AsyncStream) vs GCD (DispatchQueue)
- Issue with NWPathMonitor class on internet changes
- Convert NWPathMonitor into a string
- Why does webSocketTask.receive never complete and how do I force completion in my Swift app?
- Why doesn't path.status report the network connection status correctly in my Swift app?
- NSNotificationCenter posting notifications doesn't work
- Swift, iOS: Reachability (NWPathMonitor) vs. Ping
- Determine network type in iOS 14 Swift 5 without Thirdparty Library
- Best Approach for handling Network Connectivity Issue - Swift 5
- How to find out if a Wi-Fi is with or without an internet connection
- NWEndPoint: it returns nil when getting gateway's IP address from another VC
- NWPathMonitor's pathUpdateHandler block is getting called on app background to foreground transition
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?