iOS keep app always alive for home automation purpose - ios

I'm building home automation system for my house.
The plan is to have lots of different rfduino nodes talking to one wall mounted iPad through the bluetooth.
So far all working perfect apart from keeping an app alive all the time, device is plugged to the charger.
My question is rather simple and I struggle to find a solution.
How can I keep the app always alive to do its processing but with the screen disabled?
Thanks in advance

Related

Getting an iPhone off wifi

I'm in the process of testing routerequipment, and in that test i'd like to control wireless devices, so that they simulate leaving the area.
On android I have created a small app that receives commands (e.g. watch this on netflix, turn wifi off, browse to this page), to simulate user activity. Though this is great, it's not possible (maybe it is, but I have no iOS development skills, and my research tells me that it's almost impossible to automate, espeacially things as wifi, on iOS, unless you jailbreak it, and use private SDK's).
So my question here is more of a way to get ideas. Does anybody have any idea how to automaticly turn wifi off an iphone to simulate it leaving the wifi coverage area?
Bear in mind that this needs to be automated somehow. The best thing I can think of now is simply cutting the power to the iphone, and turning it back on and let the iPhone boot. Another solution, rather wicked, would be a small model-train leaving the wifi-coverage with the iPhone - haha, how awesome would that be!
Another thing I've tried is jamming by sending deauth-signals to the iPhone. While that works, it does not automaticly log back on the wifi, unless you manually lock and unlock the iphone. It would have been a great and simple solution, but it doesn't work.
I really hope somebody here has a great idea :)
have a great day! :)
/Benjamin

Keep iOS App Awake To Monitor Movement

I'm having trouble getting the main feature of my iOS application to work. I'm trying to create an app that measures the amount of movement over a period of a few hours using CoreMotion. All works fine when the device is awake, however the issue is that the device auto locks after a while and enters the background state, thus my methods for monitoring movement pause.
I'm searching for a possible solution to recording the device's movement whilst it has been locked, which may be to keep the app awake for a few hours at a time. I've looked into a bunch of possible solutions that have been used for this in the past, yet found out that these ways of doing it can now cause the app to be rejected by Apple.
Any help would be much appreciated please.
For anyone who is interested or stuck on a similar problem I figured out the solution to my question. I needed to utilise the iPhone's motion coprocessor, which tracks movement overtime and stores this data on the device. This is part of the CoreMotion framework and can be queried regardless of whether the application was open or not at the time of use. It's also worth mentioning that only the iPhone 5s and later have this hardware, so older devices will no be able to take advantage of this.
I hope this helps anyone who needs it.

Can an app keep running while the screen is locked, on a jailbroken iphone?

I have an idea for an app that I'd like to develop, but before I invest a lot of time learning objective C and the iOS APIs, I'd like to make sure that what I want to do is feasible.
The app I want to make is a purely auditory (sound-only) version of Google Glass. I'm visually impaired, so spending a lot of money on something visual, even though it can read content to you, would not be worth it. But if I could use an iPhone to give many of the same options as Google Glass, that would be great.
Many times, I've wanted a piece of information while walking down the street, where I couldn't easily get to my iPhone, because I have my cane in one hand, and something else in the other. In such cases, it'd be awesome if I could say a command, and get a voice response.
I'd use the microphone built into the Apple earphones for audio input, but I'm not sure if it's possible to listen for audio input while the screen is locked. I'm certain it's not possible with a non-jailbroken iPhone.
Can anyone can tell me if this is possible?
Yes, you can do this.
In order to keep your app running all the time, even when the iPhone is locked, you could build a Launch Daemon. A launch daemon can start when the phone does, and is not subject to the restrictions that iOS puts on sandboxed apps, installed to /var/mobile/Applications/.
You do need to have a jailbroken device to take advantage of Launch Daemons. Here is a good tutorial on building one.
Launch Daemons are also a normal part of OS X, so if you need more information, you might try consulting the OS X docs online. Most aspects of Launch Daemons work the same way on a jailbroken iPhone.
You'll also want to be able to detect certain events, to activate your app. You certainly don't want to be processing an audio stream at all times (maybe you only activate the app when you start walking with your cane). To detect events, like a home button press (or however you want to activate your code), I would take a look at RPetrich's libactivator library.

How to persist communication after shutting down/turning on the device?

I'm developing an iOS application to keep track of certain system information from the device. The application is supposed to keep sending information even if it is in background. Everything is working fine but when I shut down the device and then turn it on, the application is still in background but it won't communicate the information. Can someone help me to become active my application after turning on the device?
when I shut down the device and then turn it on, the application is still in background
No, it isn't. The app launcher pretends that it is, but in reality it's been shut down. And there's no way you can re-open it programmatically (even less chance for opening a currently dead process from within itself....) - The only reasonable solution I could think of is jailbreaking the device and hooking into SpringBoard so it re-launches all open apps upon reboot, but I don't believe that's a viable option for you.
One way you could achieve this is by the application creating local notifications. These will persist through shutting down the device.
See this fine tutorial: http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/

Method for demonstrating iPad application in online meetings

We have recently developed an iPad application and now need to start demonstrating it to customers and prospects as part of our overall product suite during webinars. As part of our Agile methodology, we also need to periodically review the application with key customers without having to distribute it since the application is not a standalone application and requires a connection to web services installed at each customer site.
We have searched high and low for any solution that doesn't involve rooting the device but have been unable to find one. The most common suggestion seems to be to point a webcam at the device, but that comes across as very unprofessional.
I know that there are VGA out adapters that can be plugged into the iPad and we have used these to present through a projector when the customer is physically present, but this is a relatively rare occurrence. Perhaps there are solutions that we are unaware of that can be used to send VGA output back into a desktop device for screen sharing?
Put a Slingbox on your LAN and connect the iPad video to the Slingbox video input. Then use a web browser on your computer to view the Slingbox feed and share your screen with WebEx as usual.
EDIT - BTW, there are other gadgets besides the Slingbox to get composite video into a computer such as Elgato Video Capture to name one.
A better option would be to use http://www.reflectionapp.com/
(Im not affiliated with the company).
I use this app.
http://www.airserverapp.com
It can be used with Windows or Mac.
Easy to use -- the only trouble I have is I keep poking my PC instead of the iPad.

Resources