How to get list Internet Access Point programmatically on iOS?
Are there any public or private API's to do this?
This info was applicable to iOS 7 and most likely not applicable to newer iOS versions.
I think it make sense to disassemble and look in two places:
a) CoreTelephony framework.
It has API's like:
CTServerConnectionGetAttachAPNSetttings
Also it has a key for some function kCTDeviceManagementAPNList. I am not sure where should it be passed, but it looks like it's used to retreive a list of APN's
b) ManagedConfiguration framework
You can set APN through using configuration profile. So, you probably can find in there API's which are used to store/retreive them.
As AlexWien correctly pointed out. Both of these things are private API's. I am not aware of public API's which can get APN's info.
Related
I am doing an android application, I'd like to know how to connect sensor devices/applications to Bluemix IoTF using API keys, by saying that I just want to minimize the registration task from client side(sensor devices)as much as possible. I know how to register devices with deivce Id,token and authentication manually. but I just like to know that is there any other easy way around to do it. It would be great If I got some one shed light on this from scratch. Thanks in advance.
There is a rich set of REST based APIs available at:
https://docs.internetofthings.ibmcloud.com/devices/api.html
and fully documented here:
https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#/
One can use excellent REST based testing tools such as Postman for REST testing.
The reason I mention the REST APIs is that they provide a way for scripting or automating the registration of devices. There is an API called "Add device" that, when called, will register a new device instance of a specific device type against your IoT Foundation instance.
I could imagine a new device that knows it is not registered executing a self registration request to define itself as a new device type. What I would next suggest is that you read the links above and see if they make sense. If they answer your question fully, great. If not, simply post a new question that is specifically targeted at a specific areas and we'll be watching this set of tags and respond back as quickly as we can.
I have read that one could use the class dump command line tool to identify private APIs in a project/application. I went through several tutorials but it was not useful to identify the private APIs i have used in my application.
So could someone please help me, by giving me step by step instructions as how to identify private APIs using class dump.
If there is any better, easier way of identifying private APIs, please share it with me.
The only way that you're going to have a private API in your own project is if you put it there yourself (or use some open source code that you didn't realize implemented private APIs). That said, people have ran into private-api related app approval issues even when not really using private apis.
One way to check your application for private API's is by using App Scanner.
http://www.chimpstudios.com/appscanner/
I haven't used it myself but I've had it recommended by colleagues.
Can one programmatically add/remove the contacts inside the CFArray returned by ABPersonCopyArrayOfAllLinkedPeople, thus, effectively, linking and un-linking different records of contacts from various sources to show as "unified" in the iOs phone book?
As far as I've been able to determine, there is no public API exposed for linking or unlinking contacts, at least in the iOS 6 SDK. However, it does appear that you can create links between contacts by calling the undocumented, private function bool ABPersonLinkPerson(ABRecordRef from, ABRecordRef to). That signature may not be exactly right--I haven't tested this too thoroughly.
Your app is of course unlikely to be approved if you make use of private APIs, but if you're trying to, say, make a fake address book for the sake of unit testing and you want some linked contacts in that, this could be useful.
I received some helpful info from NSGod that informed me that using BWToolkit would possibly be rejected from Apple for using private APIs. The only object I used from BWToolkit was the BWSplitView (I needed the ability to toggleCollapse - like iTunes' Ping Sidebar - slides in and out). If anyone has any info on this possibly not working for the app store, or an alternative, it would be greatly appreciated!
You can find a fairly detailed discussion of this subject here: http://bwalkin.lighthouseapp.com/projects/36323-bwtoolkit/tickets/72
The gist is "It doesn't matter what you use in IB as long as you use the unchanged framework you will get rejected.", but removing the BWTokenField code from the framework is enough to get approval.
ByteProject has released a new version of the BWtoolkit without any private api.
They removed BWTokenField, which uses NSTokenAttachmentCell and this is private API3
more info here : http://byteproject.net/
Why isn't the TerminateWithSuccess method of the SharedApplication implemented in MonoTouch? How can I invoke it? or even better, how can I programmatically close the application?
terminateWithSuccess is private API, which is why MonoTouch does not surface it. You should still be able to call it by using a Selector.
Selector s = new Selector("terminateWithSuccess");
UIApplication.SharedApplication.PerformSelector(s, UIApplication.SharedApplication, 0)
FWIW- I received this last week- Looks like the time is UP for this method...
Thank you for submitting your update to xxxx to the App Store. During our review of your application we found it is using private APIs, which is in violation of the iPhone Developer Program License Agreement section 3.3.1; "3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs." While your application has not been rejected, it would be appropriate to resolve this issue in your next update.
The following non-public APIs are included in your application:
terminateWithSuccess
If you have defined methods in your source code with the same names as the above mentioned APIs, we suggest altering your method names so that they no longer collide with Apple's private APIs to avoid your application being flagged with future submissions.
Please resolve this issue in your next update to xxx.
After posting the question i figured it out, but Matt beat me to it. Here's another way:
UIApplication.SharedApplication.PerformSelector(new Selector("terminateWithSuccess"), null, 0f);