link iPhone control app to main iPad app - iphone

Does anyone know what might be the best way to go about doing this? My CS research prof. suggested that Bluetooth might be the best way to go.
I am working on a music app for iPad and want to make a separate app on an iPhone/iPod touch to act as a remote control for the main app. Just sending a few button/slider/etc messages to a few IBActions.
Thanks.

This is the right approach.
Refer to the CoreBluetooth Framework Reference for all the necessary information.
There is also sample code.

Related

Getting notification of iOS device usage in background

Might be i am using a wrong title but i will try to explain here what i want.
In iOS i need to implement a functionality to get notify if the user is using their iOS device.
My app will be running in background using location services and i need to find out if the the user is using their device. It is doable as i have looked into this application which is sending notifications in background to the drivers who is suing their devices while driving.
https://itunes.apple.com/fr/app/cellcontrol/id661169580?l=en&mt=8&ign-mpt=uo=2
So i need similar kind of functionality to find out if a user is using iOS device or not. If anyone of you can suggest me any approach then it would be great for me to start.
Thank you!
Note: I have tried to find out touch events in background but that is not possible as i have done some research on this.
You won't be able to receive touch events when the app is in background using public API's. However, you can do that with the help of mobileSubstrate library ( http://iphonedevwiki.net/index.php/MobileSubstrate - The MobileHooker component is the one that would be used). by hooking your process to the OS. As an example, the display recorder app in Cydia tracks global gestures while recording the screen. This will be a cydia tweak and you will need to jailbreak your device to do all that.
Coming to your specific use-case, the example app you cited should be using one of the exceptions for background applications mentioned in https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html (see the section - "Implementing Long-Running Background Tasks"), probably the one to receive updates from external accessories.

Incoming call wakes iOS background App?

is it possible to wake an App in the background up, when a call comes in, and access CoreTelephony to send some infos over the web?
I'm practically a n00b in iOS development right now, but got asked a question if iOS is capable to do this. I searched in the iOS reference too, but with no luck.
It would be great if someone with more experience could answer it. Thanks a lot!
Steno
Please, have a look at the document about executing code in the background.
If you go to section "Implementing a VoIP Application", you will see that it is actually possible for your app to be awaken periodically so that it can check if it has anything to do (in your case, if I understand you correctly you would use CTCall to check for calling state).
So, basically, when awaken, your app could check for any incoming call and then use Core Telephony, as you say.
The only trouble about this is that if your app cannot be considered to a a VOIP app, Apple will not let it into the App Store.
It is not possible to have your code run when a call is received.

iPhone locked in portrait mode

My question is similar to this thread
which says to lock the iPhone in portrait mode and doesnot allow it to go to landscape mode.
This can be done easily but my concern is I want to lock all the applications running to the portrait mode in iOS 4.
That is if I have locked the orientation mode and has minimised my application then the none of the application in iPhone shall go to landscape mode.
So my question is
Is it possible
if yes then how? Any ideas or link will be really appreciated.
Edit: I know this is already available in iOs 4.0 but its hard to find also this is just for information purpose.
For those who disagree: check out the link
Thanks in advance...
Edit: Finally as per everyones suggestion I think it is not at all possible to lock other applications orientation through our application.
How would you feel if any 3rd application is accesing the orientation of your application and that of device.
So Its all handled out by Apple itself. Also as told no application is allowed to effect the system variable..
So in case you succeed in finding out the hack for this thing... Then also your application is gonna rejected by apple...
Still all the best for ur research :P
Sorry, but you can't lock the orientation via public APIs, and if you are going to use private APIs, Apple will never approve your app.
An iPhone app cant affect system wide variables such as screen lock. If you could, then there would be nothing keeping you from accessing all the other data on the device as well. Sorry, but if you want your app approved by Apple, you'll have to give up on this feature.

Control iPad with other iOS device

I am working on an app for the iPad and would like to be able to include the option to use a separate iOS device to control it. I have seen examples of this with games (notably Chopper 2), but have no idea how it is done.
Can anyone point me in the direction of the iOS frameworks that back this feature? I have looked through the SDK but cannot find the relevant sections.
Thanks
Im sure they use Game Kit or you could use the lower level Bonjour discovery.
Read through the GameKit docs.
You can start there. I guess the controller is actually a separate feature of the app that just sends messages over the network, using sockets to send and receive the data.
Send over the network from the controller. Receive them on the ipad in a running thread or however the service you use handles it. process the received messages.
Agreed with #alJaree. I'm working on something similar, though I've found it much easier to implement through Unity. Prime31 has a number of sweet plugins that allow you to implement things like Bluetooth through gamekit in a single line of code. I'm on my ipad right now so I cant be sure of the exact URL, but I think it's just prime31.com, in their 'unity' section.

iphone screensaver (with clock)

Could I create an iPhone app that replaces/modifies the default clock screen saver and show something else instead (e.g. my own special clock or whatever)?
How do I go about doing that? I'd appreciate a link to a tutorial on the subject, or to example code that does something like this.
(disclaimer: total iPhone dev noob here)
It's not possible to override any of the functionality on the existing apps/features on the iPhone, including the screen that is shown when the phone is locked. You could write an app that mimicked that functionality when launched, but I don't think that's what you're looking to do.
I think this would be a violation of apples UI guidelines and there is a good chance it would not be accepted to the app store.