Is there a way to upload data to a server from your Apple Watch? - apple-watch

Basically what the title says. I thought it would be cool, that if my smart watch notices, that I‘m asleep, it would make sure that the light is off( maybe do some other things, I don’t know yet). Before I even attempt this, I wonder if it even is possible to get a notification, that I’m sleeping from an Apple Watch to a server or does apple prevent you from doing that. I read some articles, but I’m still confused, that’s why I’m asking here.
Thank you very much in advance

Related

is it possible to override/disable the functionality of the iPhone power button?

After getting my iPhone stolen several times, i thought a utility app that would only allow a user to power off the iPhone if he/she has passed the authorization screen (keycode/fingerprint). This would leave a good amount of time for the owner to be able and track their phone and would prevent thiefs from turning it off so findmyiphone won't work.
I asked on the ios developer forums but no answer. I know that it will most likely not get authorized in the appstore (at least for now), but would still love the functionality on my phone and hopefully others.
Thanks for the help!
Possibly with a jailbreak. But i'm pretty sure that the api's aren't exposed, and the functionality would not be allowed.
No it is impossible, period!
There is only one button in the device and you want to disable it, come on, and how do you feel if you get an app you can not dismiss it?

Volume Hardware Button Input

I have asked this question before, but have not received any real answer. How do iPhone developers, such as the developer of the Camera+ app, detect when the volume buttons are pressed and how do they prevent the system volume change. Please do not just link to an old answer unless it uses a way that is currently App Store safe. If anyone knows, help is greatly appreciated. Thank you!
There is no App Store safe way to do it except to use the framework camera controls. When you use the standard controls, you get the volume controls for free. The reviewer may or may not let you go if you do it some other way, but officially you will be rejected unless you use the standard framework camera controls.
First off, becareful how you handle Hardware inputs, as you know if handle them incorrectly, you will get rejected from the app store
Secondly, read and learn Audio Session Programmming Guide this will help you understand how to handle hardware inputs, also here is the Audio Session Services Reference that will help you when it comes to programming the the listeners.
I can't give you code specific solution because you didnt elaborate where and when this is going to be used (in your app). Also where you handle the listener is up to you, so i have to leave it to you to figure out where to put your listener.
But a good resource is the apple developer library

Can I send locations to a server in background on Iphone?

I'm looking for the answer to my question but it's quite difficult for me. I would like to keep connected to the server in background sending location of the iphone with ios4.
I`m really sad because I think that multitasking of apple is not real multitasking, in fact they only keep the state of the app but they don't allow it to run in background.
May be somebody knows if is possible to send a call by http every 30 or 60 minutes...
Please, any help would be very appreciated. Thanks in advance
Depends on it you are looking to track the user -- like Grindr does (this is not bad, per se, it just must be disclosed to the user -- and PLEASE remember to power down the GPS equipment if you really do not need to do this at certain times).
You are able to register for several different types of "location" registrations, wake up (enough to do something with that information) and wait until the next update.
Look at Multitasking under "Receiving Location Events in the Background". It will give you all the info you need. Short answer: iOS4 may not support what you think you need for this, but it, in fact, does support everything required to do what you are asking.
link text (Membership required)
I know this is an old question, but below is a relevant statement from the Core Location documentation regarding background handling of "significant location change":
Because your application is in the
background, it should do minimal work
and avoid any tasks (such as querying
the network) that might prevent it
from returning before the allocated
time expires. If it does not, your
application may be terminated.
link to documentation containing quote
I'm not sure if the quoted statement is saying to avoid all network "queries", but I think a quick POST of the location should be fine.
I did this but my app got rejected due to this last week. I used the ios5 SDK.
There's a good answer to this question by user RedBlueThing here.
The answer is basically yes, you can process network requests, but you might need to ask the OS for more time to accomplish the task.

What are the odds that this iPhone app will fail?

I've been waiting on an iPhone app to go through the app store approval process. It's been in the queue for about two weeks now.
Apple recently added something to the dev center about reachability, pointing developers to their sample app. In my app, I'm posting to a URL on my server using HTTP - but I'm not doing a reachability check first. If the user tries to submit the request, it will eventually time out and they will see an error.
What are the chances that Apple will fail this app? I'm wondering if I should just quickly implement reachability and "reject binary" myself, submitting a new version. Might save me a couple of days if I'm just going to get rejected anyway.
Implement reachability, if your app uses the web and when there is no connectivity the app doesnt say something along the lines that "this is not working because you have no internet access" then 95 percent it will be rejected by apple
Sounds like you answered your own question to me - not handling that case is a serious UX problem you should definitely fix.
If I were expecting to deal with a reasonable, smart approval process, I would do exactly that -- fix the app to match their new documents. It's a classy move, implying you'd be a good citizen.
You may want to rely on someone who's been through the iPhone app store, though, for an answer with the right amount of cynicism.

How could Apple know that an iPhone app makes use of hidden API?

I wonder if they have any fancy tools that detect usage of hidden API. Does anyone know?
In my experience unless you do something that really makes Apple mad, it isn't going to be rejected. If you were to do something huge, like getting direct camera access to make a video recorder app, it would obviously be rejected.
But if you were to use something small that isn't directly visible, it probably won't get rejected.
No one can really say for sure, because Apple seems to randomly reject apps for various reasons.
Don't make and entire app based off of a Private API, because you will have spent a ton of time and Apple may or may not reject it.
One thing they do is look at the app's link tables.