Pairing with "non-ios" device programmatically - iphone

A further question about Bluetooth and iPhone.
Is it possible to discover nearby "non-ios" devices via bluetooth programmatically? The device uses the Hands-free-Profile. When I go like "General > Bluetooth > On" it works fine and I can pair with it. And thats exactly what I want to do but in my own App. I know the official SDK doesn`t support it. So my questions are:
When I`m member of the "Made for iPod"-Program, will I have access to the Hands-free-Profile API?
Important: The device already exists and I have no influence on it. So no possibility to implement
a special ship or so.
Another opportunity I found is the Private Framework BluetoothManager.h. Is it possible to
discover/pair the device with an iPhone?
In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
Thank you

I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
No, it is not possible with official APIs, even if you are a part of the Made for iPhone program.

In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
A preliminary search didn't find the official rule about it, but Apple specifically forbids apps that duplicate the functionality of their built-ins. So, no, your app will almost certainly not get approved.
And I'm pretty sure the T&C forbid interaction with non-Apple-approved devices, but I'm not sure whether they strictly apply that to bluetooth things.

Yes , using the bluetooth private APIs. You can get a list of remote devices, each a BluetoothDevice object, and use the afferent methods to pair or connect.

Related

find iPhone places using xcode

I would like to know my iPhone places using Xcode like this app.I know all the details related to my iPhones.Kindly help me how to do this.
The actual Find My iPhone implementation details are certainly private and/or using private Apple frameworks (especially as it's a feature that users have to explicitly turn on and off via Settings and there's no user-facing app), but you could use CoreLocation in an app that you create that runs in the background, reporting your location to some server that your own.
I also found an alternative app named iLostMyi, but this requires a jailbroken phone.

Where can I find information about private iPhone APIs?

I am trying to make an iOS application not for the App Store involving customized screen savers, automatic starting and ending of phone calls, and contact restrictions. I have not been able to find resources and information regarding private, undocumented APIs, however. Does anyone have a pointer?
If you just need to know something which is exposed via Objective C - you can look at https://github.com/rpetrich/iphoneheaders (or generate them yourself via class-dump-z)
Many private frameworks are here.
You also should look at http://iphonedevwiki.net/index.php/Main_Page
If you need access to undocumented C APIs and can't find examples...well,your only way in this case is IDA Pro
This is never required, but if you want to do this then this is simply done like testing your app on your iPhone.
Just create an app in the developer account, add your iPhone, get development certificate & provisioning profile then install app directly to your iPhone.

An iOS App how to find all other application on the iPhone?

Bump, Chomp & Appsfire all can list other application on the iPhone, how to do it?
By using Google I found this link quite helpful, it says basically there are two ways to find if certain apps are installed without jailbreaking your device:
checking if a specific URL scheme is supported by the device => canOpenUrl:
comparing the devices currently running processes to known app executable names => sysctl()
Short answer, you can't.
Longer answer you can't without violating the dev agreement and risking app rejection.
There are two methods of doing this (on a non-jailbroken phone):
Check to see if custom URL schemes that are known to be used by certain apps are registered as described in http://www.iphonedevsdk.com/forum/iphone-sdk-development/37103-finding-out-what-apps-installed.html (this allows you to check for certain known apps, not get a list of all installed apps.
The way appsfire does with a desktop 'companion' app, that grabs this info from your iTunes and sends it to their server. (See this article as to why the appsfire developer pulled his app because apple wouldn't approve an update anymore).
Sorry I couldn't be of more help but that's apple!

iOS (Apple): Is there any way for the application to ask the OS to block the device in that application?

I would find useful, in some cases, and under the user's permission, to block the device so only the running application can be accessed unless the usrer's password (pattern or whatever is used to unlock the session) is introduced.
I guess the mecanism should be something like: The application asks the os to do this, the OS asks the user for permission and then the application asks the device to block the application on "exit" or standby (or both).
This would be useful for using an iPhone or iPad as a device for public use. One example could be a Library where visitors can see the book list and some previews in the device. In this case, you don't want the user to access any other resource/application in the system.
Does it make sense?
What your asking is there any type of kiosk mode for iOS devices.
The short answer in no. The longer answer is if you're using a Jail broken device you might be able to relaunch the app on exit, but it would take significant R&D.
I hade a client ask about this last week, after some investigation and thinking I told her,
It's best to look for a case that blocks the home button. Or some kind of security bracket. It'll be cheaper and easier.
Also any App you create with this functionality would be rejected form the App store.
If your looking for advice on programming Jail broken devices there is a Stack Exchange proposal you can follow.
Supposedly there's a way to have a "kiosk" mode with a .mobileconfig file. Both of these articles talk about it, basically covering the same territory:
http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/
http://rick-hawkins.blogspot.ca/2012/01/turning-ipad-into-kiosk-device.html
I was looking into this again and found out that iOS already supports the feature. It is called Guided Access, it was incorporated on iOS 6, it does not require jailbreak and can be used for any app installed on the device.
It makes sense, but I don't think you can do that without jailbreaking the phone. In iOS, the home button cannot be overridden by applications. Besides there is cheaper hardware out there for kiosk-style applications.

Change iPhone settings from an app

Does anyone knows how to change the iPhone settings from interior of an app? For example: close the WiFi, disable 3G, change the sound volume and so on?
Apple is changing settings trough an app: Settings.app. It means that it's possible, I just don't know how.
Apple can do it in her Settings.app indeed.
Because of limitations of the iPhone SDK, some API's are not made public so you can't do everything Apple is able to do within her own OS. However, you can let the user adjust the main volume from your application, using the MPVolumeView class.
All applications written with the public SDK are sandboxed. They only have access to the properties and data which Apple deems feasible to use within that sandbox. Some of the examples you list are possible and some aren't.
Apple can perform these operations within their own applications since they don't use the public SDKs to write their applications - they use an internal SDK which has more functionality than the external one. They're not too worried about Apple employees hacking the phone and getting all your data off the phone.
Most of us wish that Apple could migrate more things to the public APIs (and they often do) but the reality is that the sandbox environment is carefully guarded. I wouldn't hold my breath to expect Apple to move all your examples over. You could always file a radar bug and let them know what you want - it's one way to have your voice heard.