Can a app that uses location service in iOS be auto started at boot time - ios

While I have read in the apple's documentation that VoIP based apps will be auto started after a boot, there is no mention of apps that use GPS. This should mean that apps that are registered for GSP will not be auto started when device boots.
However I need to make sure that my understanding is correct before I move ahead.
Any help is appreciated.

There is no concept of "auto start" in iOS neither the concept of "boot time" from the point of view of 3rd party apps. When the OS starts all applications that were open before the shutdown will be "opened" again and put in inactive state. VoIP and GPS applications can request something like 10s CPU in every 10 mins. These cycles will be restarted automatically after device boot if the application was running before shutdown. However this is not "autostart" behavior.

You can boot launch your application by using background service like voip.
You can activate this service by enabling it on info.plist file.

Related

Can iOS apps communicate via sockets?

I'm going to develop few apps for iOS. Can they communicate to each other via sockets? Let's say one app runs as server (even in background mode) and another as client connects to server app and perform some communication. Does it violate any App Store rules? Any available IPC in iOS if my idea is not working for some reason?
Of course you can and it doesn't violate any rules.
Just just the CoreFoundation libraries.
There's no point in me describing it to you if it already has been all written in the official Apple documentation:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/UsingSocketsandSocketStreams.html
You can find here examples, all approaches and things you can and cannot do.
EDIT:
You didn't make that clear but it seems like you wanted the apps to run on the same device. You can do that but that would mean that one app has to run in background, and to do that you need some kind of hack (for example: background updating location mode ON) and that won't get past apple store. You need a very good reason to have your app ran in background (music in background, update location in background for fitness apps etc.)
Besides, it's a duplicate question:
iOS - Is it possible to communicate between apps via localhost?
As long as your apps are in the same app group, then yes, socket IPC is allowed. If not, then no. Sockets map to file descriptors (Berkeley sockets), and these files are sandboxed to the app or app group. More info: http://ddeville.me/2015/02/interprocess-communication-on-ios-with-berkeley-sockets

iOS refresh bluetooth characteristics

I have created an iOS app that interacts with a bootloader on some custom hardware/firmware to update the application on the hardware. In order to accomplish this, the hardware/firmware has a bootloader application and a regular application. First, I connect my iOS app to the bootloader application and update the regular application. At which point the regular application starts to run and I would like to connect to it with my iOS app.
If I search for peripherals with an Android application it correctly sees my hardware broadcasting as the bootloader application and then switch to broadcasting as the regular application after the update has been completed. However, for some reason, the equivalent iOS app only sees it being broadcast as the bootloader application. I have found that if I restart the iOS device or if I turn the iOS device's bluetooth off and back on after a few seconds it will finally recognize that the regular application is broadcasting.
It seems as though the iOS device is caching the peripheral information. Does anyone know if there is a way to clear the cache or refresh to get the current/valid status of the device?
I have exactly the same issue here, unfortunately this is indeed due to iOS. There are a lot of other threads about this topic but after looking for a while I would recommend this answer :
https://stackoverflow.com/a/25930825
Best of luck, I haven't finished yet and this won't be easy...

Objective-C/CocoaHTTPServer - Is it possible to run CocoaHTTPServer as a background app without any UI?

I want to run CocoaHTTPServer as an independent background app which doesn't have any screens. Other apps in the device should be able to communicate with this app for remote server connectivity. Is it technically possible in iOS ?
Any suggestions are greatly appreciated.
No. It is not possible. CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications. It can't be run as a standalone application. It has to be added as a part of an application. The server is running only while application is in foreground. As soon as you exit from the application (by switching to another app or locking a device) the server will be stopped. The server will be restarted when you enter the application again

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/

On start-up of google tv, show live tv? Start service on boot?

I am pretty new at android development and am working on an android app for google tv. my current hurdle is that i want to start the Live TV app as soon right after the GTV starts.
I am thinking that it would be a Service that loads on startup that tells the Live TV app to start, but i don't know if a Service at startup is possible, nor do i know how to target the Live TV app.
any ideas or suggestions?
My workaround was to make LiveTV be the start up application (Set up in the Google TV UI). Then, I set my service to start on boot, explained here.
http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/
A user can set the startup application from the UI. If setting LiveTV to be the startup app isn't enough (it's the default), you can have your app start, then launch Live TV.
You can also have services that start at launch do it, just as you can on any Android platform.

Resources