Android has an API method: getAllCellInfo() that "returns all observed cell information from all radios on the device including the primary and neighboring cells". On iOS, I've found the CTCarrier class to obtain information about the current user's home cellular service provider. I'm attempting to get all available external cell tower information from an iOS device.
Does iOS have a getAllCellInfo() equivalent?
UIDevice.current
Returns an object representing the current device.
You could maybe extend from UIDevice create your own method and return the stuff that you need, have a look at all the props here: https://developer.apple.com/documentation/uikit/uidevice
Related
Do you know iOS device-level API available to do on-device checks on - whether device 3D Touch working or not Camera works or not and to check all the required hardwares current status and then share it with device replacement team to replace the device if it’s under warranty.
Use case:
Lets think about the use case like. Telecommunication companies who give iPhone at the plan - They have sales data in their database, would like to offer this as additional feature like "Self diagnostic" that will check what all possible hardware status like camera, Touch ID etc and also check if device is under warranty and will trigger request for fix/repair/replacement automatically or with user consent
Something similar to Device Check API's
https://developer.apple.com/documentation/devicecheck
I have saw so many Questions regarding this on SO. All answers say that it is not possible. Apple doesn't allow to do so.
I am using iPhone 6s running on iOS 10.1.1
Yesterday I purchased new Sim Card.Just after inserting my new SIM when I opened WhatsApp. I get a Screen which says:
`Your number has been changed. Do you want to use new number`
How does whatsapp able to do so?
Secondly I installed Airtel App. When I opened the app. It automatically fetched my phone number And Displayed to me.
How these apps are able to read phone number.
Is apple added new methods in iOS 10 or they are using some other logic to do so.
There is an observer subscriberCellularProviderDidUpdateNotifier
as per the docs here
A block object that is dispatched on the default priority global
dispatch queue when the user’s cellular provider information changes.
This occurs, for example, if a user swaps the device’s SIM card with
one from another provider, while your application is running.
To handle changes in cellular service provider information, define a
block in your application and assign it to this property. The block
must be implemented to support being called from any context.
That just notifies you that your sim has been changed.
Regarding your second question you can get the number from contact app using Contacts.framework
There are some changes in privacy in ios 10. A new key you have to add into plist file if you want to access contacts database in your app.
<key>NSContactsUsageDescription</key>
<string>$(PRODUCT_NAME) want use you contacts</string>
I am making an iOS app where i need to get the my current operator details like LAC,MCC,MNC ,Latitude Longitude Signal strength & neighbouring cell tower information, From CoreTelephony Framework CTCarrier class we get only the LAC,MCC,MNC & operator name.
I google it and some forum told that for that we need to use the Apple Private API.
Can any one give me idea how to get this information ?
LAC, CID, MCC, MNC can be retrieved for current serving cell Get CellID, MCC, MNC, LAC, and Network in iOS 5.1
I don't think you can get that kind of information for neighbor cells. CoreTelephony gives you full info only for serving cell. Neighbor cells will give you signal strength, ARFCN and may be some other stuff but not LAC and CID.
Even on a baseband level iPhone doesn't give you that kind of info. I tried to send commands through QMI but it gives the same info. So it's more likely baseband interface limitation. Maybe if we find debugging interface we could get more out of it.
As for latitude and longitude. I don't know of any APIs to retrieve those. iOS does query cell tower location internally from Apple servers but I didn't find any APIs to make you own queries. You better of with public (or not) services that will return you cell tower location - all they need is LAC, CID, MCC, MNC. There are many of those - google, yandex, microsoft, apple. Some are public, others are not.
You can even try to query from iOS cache. iOS caches cell tower locations in a SQLite database. Look for *.db files in /var/root/Library/Caches/locationd
Some of the iOS API's (e.g. DNS-SD) provide info by giving you the int index of a network-interface (e.g. "1").
But Apple's own API for querying network-interfaces - SystemConfiguration.framework - has those API calls blocked/deleted/MIA for iOS (they're all marked as "OS X only").
How do you query these interfaces on iOS?
(FYI: use-case is: "With iOS, Apple officially requires you to manually inspect interfaces returned from DNS-SD requests to decide which ones are bluetooth versus wifi. Apple gives us an interface index, but no further info")
I don't understand why the SystemConfiguration calls are missing from iOS, but it seems you can use the standard ifaddrs.h calls to get some of the core info, as per this SO answer:
https://stackoverflow.com/a/13279757/153422
I know that there's a setUserID method in Flurry, but how would I get the user ID that Flurry sets by default for a device?
Flurry uses SHA1 Mac for iOS and Android ID for Android apps as device identifiers. These are used solely for internal identification purpose, and are not disclosed to developers. You need to use setUserID method to assign a unique user ID for a user in your app. Please be sure not to use this method to pass any private or confidential information about the user.
(Full disclosure: I work at Flurry)