How to find if a user changes his SIM card from his phone(iPhone). we can find "mobileCountryCode,isoCountryCode,mobileCountryCode and mobileNetworkCode" through programatically these are not specific to particular SIM, these are specific to operator, is there any way to identify when user changes his SIM card from his iPhone.
Please any one help me on this.
Thanks in advance.
You are able to sign up for a notification using subscriberCellularProviderDidUpdateNotifier in
CTTelephonyNetworkInfo
However you will only be notified if the swap occurs while your app is running. You will still be unable to detect if the user changes the SIM to another SIM from the same operator when your app is not running.
Hi tony You can use this for finding sim has been changed or not.
NSString *currentIMSINo = CTSIMSupportCopyMobileSubscriberIdentity(NULL);
Related
I want to execute code on background, when user clicks on app icon? Is it possible? I want to turn bluetooth when I click on app icon on Iphone. Thanks a lot !
As per this answer, there is no way to turn on Bluetooth without Apple rejecting your app. Therefore, the best way to have the user turn on Bluetooth is to tell the user to do so(e.g. through an alert/popup).
As for executing code in the background, check out this answer, which describes how threading works in Swift.
I want to capture all the touch events at the system level, I do not mean capturing at one specified app, but all the apps even the SpringBoard.I tried IOHIDEvent(https://github.com/kennytm/iphone-private-frameworks/tree/master/IOKit/hid), but the runtime headers was changed after iOS4, and now I can not get them of iOS6.
May be GSEvent is also a good way, but does anyone known how to do this by GSEvent?
Thank you!
Take a look at EntryDevLevel excellent answer here on how to capture and record clicks on iOS using iOHID:
iOS touch event notifications (private API)
BTW. His solution works on non jailbroken iOS either.
I want to show particular note about incoming number on call screen of an iPhone.
E.g. I have Jane as a contact saved in my Contacts on an iPhone. I also have a note associated with that Jane's contact, let's say that note is "Dentist".
Now If I get call from Jane I should be able to see "Dentist" on call screen.
I am currently using PhoneGap framework.
I have been searching for it but had no luck.
This is not possible on non-jailbroken iPhone. But you can achieve it in some other way like how the sticky notes apps are working,
Ask the user to create a note
Generate a image from the user designed note(using code)
Finally ask the user to assign the image to the contact.
No, you have no way influence how contact is displayed in phone call at not jailbroken iPhone. Information is taken from address book only.
I have a MFi keyboard. It is already paired to the iPhone via bluetooth.
I want to programmatically get the name of the paired keyboard. I searched some forums and they say it's possible to do that...
But how do we get the name using "External Accessory"?
A sample code would help me a lot.
Thanks
Initialize your EAAccessory object and then call the property name on your accessory object
NSLog(#"%#",connectedAccessory.name);
I am working on a radio player for iPhone.
What I need is to provide my position before playing stream.
I am thinking of using CoreLocation, it's ok, but how to determine geo position if user does not allow CoreLocation when asked ?
What would be the best way to determine the position of the iPhone?
I was thinking of getting IP address, but it could be an address from another country. For exemple, user has an iPhone account in United States, and is using my application in 3G in Canada, IP address will be provided by his cell carrier right ?
So I was wondering how to get cell carrier name, without success... using a private framework is not possible.
I am waiting for your great suggestions!
thierry
I would just use core location. If for whatever reason the user declines the core location popup, then just prompt them to enter their location manually (e.g. choose country and city).
You could use the IP address, but then you run into other problems as well (for instance if they are using WiFi on their iPhone or are on an iPod touch.
I think this is not allowed, and by design. If the user doesn't want your app to know where they are, why do you think you have the right to ignore their wishes?