Is it possible to track user movement in Apple watch? - swift

I need to build a watch app that tracks the user movement, so I need to use CoreMotion.
I searched about this feature in watch and I didn't find any useful tutorial.
my question is:
is it possible to record CoreMotion data in Apple watch and then share it on a server somewhere?

Related

Is it possible to create my own Watch Face on Apple Watch? Not compose from an official one

I tried to google it very hard but it seems blocking, I always end up with tutorials to change the complications and publish it for friends...
What I want to perform is create my own Watch Faces for my Apple Watch, with room for official complications. So I would be able to create my own watch face. Chronology did it, so why wouldn't we? I just don't find the documentation for that.
Please note, I don't want to create a "time-centric" application, I am here talking about real Watch Faces. My goal is to create something where the time only take the place of a small complication, with a custom design of mine, and then I have plenty room for complications from my favorites / personal applications !
This question concerns the Apple Watch (And Watch OS), not WearOS.
Many thanks for your help !
Here is Apple official Documentation about how to add a watch face to your app
Support Shared Complications
To ensure that your app’s complications appear as expected in the watch face preview, you must implement your ClockKit data source’s getLocalizableSampleTemplate(for:withHandler:) method. You can’t just add preview images to the assets catalog.
Then, as soon as the user installs a watch face that includes your app’s complications, the system calls your data source’s handleSharedComplicationDescriptors(_:) method. Use this method to prepare your app so that it can provide complication data for the shared complications.
For example, a weather app may provide separate complications for all of the user’s favorite cities. When the user receives a shared watch face, the app must be ready to provide data for the city associated with the incoming complication, even if it’s not already in the user’s favorites list.
Finally, ClockKit calls your data source’s methods to populate the complication’s timeline. This includes calling getTimelineEndDate(for:withHandler:) and getCurrentTimelineEntry(for:withHandler:), and then calling getTimelineEntries(for:after:limit:withHandler:) if your app supports batch downloading future timeline entries.

Access Apples fall detection on the Series 4

Is there a way to get access to Apples fall detection on the Series 4. I would like my watch app to be able to detect when the user falls. I am hoping that Apple would let me get notified when they detect a fall. Is this something that is possible in swift?
Apple hasn't made a public API for fall detection. You can file a suggestion with your developer account in Bug Reporter → watchOS + SDK.

How to Access Contact information on Apple Watch?

Using watchOS 1 or 2, I would like to be able to access either favorite contacts or all contacts on my watching using the picture. I know that I would be have to use the setItem call but I still don't know how to access the contacts from the Apple Watch itself.
There isn't anyway to do exactly what you want in this case. However, you can use one of the ways explained below:
1- Get contacts in the iPhone from internal libraries, and then use WatchConnectivity framework to transfer data from iPhone to Apple Watch.
2- Set up a cloud service, and then move contacts there from the iPhone. User can see them in Apple Watch whenever it is connected to the Internet.
3- Ask user to specify contacts on Apple Watch once, and then show them to the user.
4- Open the contacts of iPhone programmatically in Apple Watch, which is a question answered here.
As you saw, there is no comprehensive way to see contacts directly on Apple Watch without iPhone help, but these ways may help you. WatchKit library is growing every month and every year, so wait for the new releases.

How to Find Nearby iOS Devices (GPS locations) using same app

I want to create an app that allows a user to find the nearby other users location using GPS coordinates who are Logged in to the same app .Also it can be track the location of the devices(Logged in to the same app) which are moving in a car .
Can someone give me an overview of how I can accomplish this. is there any free API available to accomplish this task.
Danielbeard is correct - you would need to be continually storing/updating locations on a server somewhere. Your app does get some running time when it is in the background, but I'm not sure it would be enough to run the web traffic that you'd need.
Check out this post: Running app in background and send frequent http request
And check out the multitasking guide here: Multitasking Guidelines
You can also look at Push Notifications. Hopefully this helps.
In iOS7 MultiPeerConnectivity was introduced to find near by applications, so if you have a coffee shop and someone walks by or in they could get the latest deals, or, you walk into a room and the music changes to what you like as your device exchanges information with another.
http://nshipster.com/multipeer-connectivity/

What are some ways I can sync iPhone Game data between multiple devices?

From the Getting Started with Game Center doc
A player might have the same Game Center enabled game loaded on multiple devices. If your
app has reported progress on an achievement from one device, note that the same
achievement progress data will be provided by Game Center on other devices where the user
plays your game. However, other game state maintained by your app may not be in sync and
should be handled accordingly.
I'm relatively new to iOS development and about to begin researching how to sync local game state data (i.e. which levels the player has completed, which levels the player is currently on, etc.) between the different hardware (iPhone, iTouch, and iPad) running my game and I was hoping I could get some insight from the SO users on some good ways to do this. Do I need to build a web service for this? Can iTunes be used to sync this data? Is there an API specifically built for this?
Thanks for your wisdom!
I think using a web serivice and making a JSON post and request would be a good route.
One suggested method by Apple is to use the Application Preferences, which is backed up by iTunes when the user syncs the phone.
I use NSUserDefaults for this and and it works great!
iCloud is your ticket