I checked the os_log("%{public}@", log: log, type: type, message) api being invoked but its not showing any logs on the console. Can someone help us on this
Post
Replies
Boosts
Views
Activity
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"
}
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