Post not yet marked as solved
i would like to know why i have crashes with core telephony, i'm using it only to detect what is the connection is it 3g or 4g, also to know if i'm connected to the internet or no
here is the crash trace
0 libobjc.A.dylib 0x1bb8c21c8 objc_msgSend + 8
1 CoreFoundation 0x1a6cbb41c -[__NSDictionaryM objectForKeyedSubscript:] + 184
2 CoreTelephony 0x1a734454c -[CTTelephonyNetworkInfo updateRat:descriptor:] + 144
3 CoreTelephony 0x1a7344430 -[CTTelephonyNetworkInfo queryRatForDescriptor:] + 164
4 CoreTelephony 0x1a73431b8 -[CTTelephonyNetworkInfo connectionStateChanged:connection:dataConnectionStatusInfo:] + 72
5 CoreFoundation 0x1a6de3724 __invoking___ + 148
6 CoreFoundation 0x1a6cb6d04 -[NSInvocation invoke] + 380
7 CoreFoundation 0x1a6cb7308 -[NSInvocation invokeWithTarget:] + 80
8 CoreTelephony 0x1a734d2cc void dispatch::async<-[CoreTelephonyClientMux sink:handleNotification:]::$_2>(dispatch_queue_s*, std::__1::unique_ptr<-[CoreTelephonyClientMux sink:handleNotification:]::$_2, std::__1::default_delete<-[CoreTelephonyClientMux sink:handleNotification:]::$_2> >)::'lambda'(void*)::__invoke(void*) + 44
9 libdispatch.dylib 0x1a69cb81c _dispatch_client_callout + 20
10 libdispatch.dylib 0x1a69d3004 _dispatch_lane_serial_drain + 620
11 libdispatch.dylib 0x1a69d3c00 _dispatch_lane_invoke + 404
12 libdispatch.dylib 0x1a69de4bc _dispatch_workloop_worker_thread + 764
13 libsystem_pthread.dylib 0x1f2a4e7a4 _pthread_wqthread + 276
14 libsystem_pthread.dylib 0x1f2a5574c start_wqthread + 8
Post not yet marked as solved
I want to observe network changes from 4G to 5G use the following code:
if (@available(iOS 12.0, *)) {
[[NSNotificationCenter defaultCenter] addObserverForName:CTServiceRadioAccessTechnologyDidChangeNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
}];
}
When I switch my phone's network from 4G to 5G, it do not work。but when I switch my network between 3G and 4G, it did work.
when I switch network to 5G,
I run CTTelephonyNetworkInfo.new.serviceCurrentRadioAccessTechnology ,it did return CTRadioAccessTechnologyNR which is 5G。
Question
is there a bug on CTServiceRadioAccessTechnologyDidChangeNotification when net changes between 4G and 5G?
is there a way to know network changes between 4G and 5G? Exclude polling。
Post not yet marked as solved
How to Get CellID, MCC, MNC, LAC, and Network in iOS 13 from Objective c?
Post not yet marked as solved
I work for one of the networks. I am able to successful download the eSIM in iPhone for iOS 13.*.
Where I was taken to unknown state (CTCellularPlanProvisioningAddPlanResult) in iOS 14.0 always also it prompt the os screen to install eSIM("Set up Mobile Plan")
Please let me know why it take to unknown state always and why OS screen popup ?, please let me know if any configuration needed specific for iOS 14.x
Also attached the configuration & prototype code for your reference
hud.show(animated: true)
let plan = CTCellularPlanProvisioning()
self.request = CTCellularPlanProvisioningRequest()
self.request?.address = "" // SMDP Address
self.request?.matchingID = "" // Acitvation code.
if let validRequest = self.request {
weak var weakSelf = self
plan.addPlan(with: validRequest) {[weak self] result in
self?.hud.hide(animated: true)
switch result {
case .success:
weakSelf?.alertMessageToUser(title: "Hurray !...", message: "ESIM Downloaded Successfully")
print("Successful")
case .fail:
print("ESIM Download failed, contact your carrier")
case .unknown:
print("Unknown details, contact your carrier")
@unknown default:
print("Unknown details, CONTACT CARRIER")
}
}
}
}
<array>
<dict>
<key>MCC</key>
<string></string> // Country Code
<key>MNC</key>
<string></string> //Network Code
</dict>
</array>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.CommCenter.fine-grained</key>
<array>
<string>spi</string>
<string>sim-authentication</string>
<string>identity</string>
</array>
<key>com.apple.wlan.authentication</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>apple</string>
<string>com.apple.identities</string>
<string>com.apple.certificates</string>
</array>
<key>com.apple.private.system-keychain</key>
I am successful in download eSIM to iPhone for 13.*, Where I was getting the below error for iOS 14.0.1
Logs(OSACTIVITYMODE enabled)
Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.}
BackTrace
thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1frame #0: 0x0000000104cf9428 My Optus`closure #1 in ViewControllerTwo.installESIM_1(result=unknown, self=0x0000000107904d80, weakSelf=0x0000000107904d80) at ViewControllerTwo.swift:44:25 frame #1: 0x0000000104cf99a4 My Optus`thunk for @escaping @callee_guaranteed (@unowned CTCellularPlanProvisioningAddPlanResult) -> () at <compiler-generated>:0
frame #2: 0x0000000194fe412c CoreTelephony`__60-[CTCellularPlanProvisioning addPlanWith:completionHandler:]_block_invoke + 28
frame #3: 0x0000000195053268 CoreTelephony`__90-[CoreTelephonyClient(CellularPlanManager) addPlanWith:appName:appType:completionHandler:]_block_invoke + 36
frame #4: 0x0000000105077b68 libdispatch.dylib`_dispatch_call_block_and_release + 32
frame #5: 0x00000001050795f0 libdispatch.dylib`_dispatch_client_callout + 20
frame #6: 0x0000000105088890 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1000
frame #7: 0x0000000194a271e4 CoreFoundation`CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
frame #8: 0x0000000194a213b4 CoreFoundation`__CFRunLoopRun + 2508
frame #9: 0x0000000194a204bc CoreFoundation`CFRunLoopRunSpecific + 600
frame #10: 0x00000001ab4a5820 GraphicsServices`GSEventRunModal + 164
frame #11: 0x00000001973c4734 UIKitCore`-[UIApplication _run] + 1072
frame #12: 0x00000001973c9e10 UIKitCore`UIApplicationMain + 168
frame #13: 0x0000000104cfb688 My Optus`main at AppDelegate.swift:12:7
frame #14: 0x00000001946e7e60 libdyld.dylib`start + 4
All right, so I have an app that requires reading the data from the SIM card. More precisely I need the Carrier name, MCC, MNC, ISO Country code and current Radio Access Technology (Okay this does not directly come from the SIM card but it is linked). It works perfectly on every phone, but I realized (after testing) that I'm in trouble with the newest iPhones that have an eSIM set up. I have no idea how to tell my app to read the data of the physical SIM card instead of the eSIM.I tried to search a bit on the Web about that but I found absolutely nothing...The code I use:let telephonyInfo: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo()
carrierNetwork = telephonyInfo.serviceCurrentRadioAccessTechnology?.first?.value ?? "null"
carrierNetwork = carrierNetwork.replacingOccurrences(of: "CTRadioAccessTechnology", with: "", options: NSString.CompareOptions.literal, range: nil)
let carrier = telephonyInfo.serviceSubscriberCellularProviders?.first?.value // actually here originally I tried to use ?.values.first, but the result is the same
let countryCode = carrier?.mobileCountryCode ?? "null"
let mobileNetworkName = carrier?.mobileNetworkCode ?? "null"
let carrierName = carrier?.carrierName ?? "null"
let isoCountrycode = carrier?.isoCountryCode?.uppercased() ?? "null"
/* so the problem is that the values I get are the ones from the eSIM when it is set up. If it is not, then I get the values I want. Apparently, when the physical SIM card line is set as primary, it works. But I need that code to systematically use the physical SIM data. */Example:I expect [physical SIM card]: Carrier name: Free, MCC: 208, MNC: 15, ISO Country Code: fr, CTRadioAccessTechnology: WCDMA.But instead, I get [eSIM]: Carrier name: Swisscom, MCC: 228, MNC: 01, ISO Country Code: ch, CTRadioAccessTechnology: LTE.EDIT: If you know how I can read both, that's also fine to me, my goal is to detect if the user uses a Free Mobile [208 15] SIM card.Thank you in advance,
Post not yet marked as solved
Hi,I know this question has been asked before and it all ends up in the same "no-can-do" answer but I'm in the need to ask it myself to get evidence for the company I work for.I'm building an app (iOS with Swift) to keep track of my own cellphone usage to then compare it with my mobile plan, for that I need to get the duration and date of each call made from that phone. The only way to get that information that I could think of is by checking the phone's call history.Is there a way to get the phone's call history or log?Is there an iOS version in which this is or was allowed?Is there any public API to get this information form?Is there any way to get permission from Apple or some kind of entitlement to allow us to get it?According to some co-workers you could get that using CTCallCenter (CoreTelephony) but API Reference says it's deprecated (https://developer.apple.com/reference/coretelephony/ctcallcenter)I would really appreciate any information or facts provided.Cheers.
Post not yet marked as solved
my IOS version is 9.0, Now i want to get the unique value of the Device, i think of using IMEI, but i did some tests, i always cannot get the IMEI of the device,could you tell me other ways to know unique value of the device?