Post

Replies

Boosts

Views

Activity

How to know 5G network type from code in iOS?
 let networkInfo = CTTelephonyNetworkInfo()     let carrierType = networkInfo.serviceCurrentRadioAccessTechnology     guard let carrierTypeName = carrierType?.first?.value else {         return "UNKNOWN"     }     switch carrierTypeName {     case CTRadioAccessTechnologyGPRS, CTRadioAccessTechnologyEdge, CTRadioAccessTechnologyCDMA1x:         return "2G"     case CTRadioAccessTechnologyLTE:         return "4G"     default:         return "3G"     }
1
0
1.3k
May ’21
Unable to submit BGProcessingTaskRequest in a Custom Framework
am building a Framework which has to do some network call and data flush in the background. when I try to submit BGTaskScheduler.shared.submit(request) getting Error Domain=BGTaskSchedulerErrorDomain Code=1. In the Framework am not getting option to add Background Mode Capabilities. but I added them in the info plist file of the framework Permitted background task scheduler identifiers and 'Required background modes'. even after making these changes am getting error which I use it in the App. I also tried adding the Capabilities, task schedule identifiers in the Host App even then getting the same error
0
0
601
Nov ’20