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

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.

Related

Creating Complications for Apple watch

I know how to create the basic watch complications.
I want to create complication like native Battery one (Circular Ring).
How can I fetch live data for the complications, maybe API call, or data from iPhone?
Can I create more then one same complication type?
I want to create complication like native Battery one (Circular Ring).
How can I fetch live data for the complications, maybe API call, or data from iPhone? -
Use WatchKit.framework to do this and use WCSession class to
perform the session talking between the phone and the watch.
You could also use the background tasks API introuduced in WatchOS 3
to make API calls in the background -
https://developer.apple.com/library/content/releasenotes/General/WhatsNewInwatchOS/Articles/watchOS3.html
To update complications in watch OS 3 - https://developer.apple.com/reference/watchkit/wkapplicationrefreshbackgroundtask
Can I create more then one same complication type?
No you cannot, one app can have only one type of complication.

iOS give users default downloadable content

I'm facing this problem while designing my iOS app. Suppose that a user purchases an app and downloads it to the iPhone. I would like to provide him with a default consumable item the first time he runs the app to use whenever he wants , however I would also like to track if the user has already consumed the item. This way if he decides to reinstall the app we can restore the transactions (if he used the item) or we can avoid possible intents to download different kind of content by reinstalling app and consuming default items each time. (Guess NSUserDefaults is not an option here).
One approach that came to my mind was using UDID(or any iOS 6 alternatives) to keep a record on server of the user's device the moment he uses the default item. But this will limit items just to the device from which they consumed content.
It would be great to support all the user's devices (like inAppPurchases), but I can't figure out a way to implement this.
Any suggestions or help would be great.
Thanks a lot.
In order to tie information to a user (not just a device she used at one time), you'll need to ask the user to identify herself and save it someplace other than the device. In other words, a backend that implements registration and login.
From scratch, this can be a lot of effort that an iOS developer didn't count on. Fortunately, there are several services in the world that provide a substantial head start. Here's a nice round-up. I've had direct experience only with Parse.com, and think it's excellent.

Detecting which app is running on iOs device and returning data describing the category of the app

I am about to start work on a project that will aid in teaching new vocabulary, in an interruption-driven style, presenting new words, via interrupts, for the user to learn at optimal times.
I am looking for a way to detect which app is running. I found some posts that touched on retrieving the running app list part of my question, "Can we retrieve the applications currently running in iPhone and iPad". Is this still viable to use in iOS 6?
I cannot find any relevant posts about retrieving data about the type/category of app that is running (media player/game/pdf viewer etc.). Do iOS apps contain any meta data or way of retrieving this type of data?
Naturally, to interrupt the user at an optimal time it would have to take the type of app in use, into consideration.
I am open minded about alternative ways of detecting when interrupts may be optimal and open to criticism of my current plan.
You can get a list of running processes (aka apps), as noted here, but you can't get any meta data on them from the OS. From a UX perspective, you might consider a solution where the user manually schedules the interruptions, or gives you a schedule window. For instance, maybe every day between 3 and 4, start notifying me. Personally, I delete spammy apps super quickly, so I'd consider doing something other than interruptions.

iPhone app: How to implement in-app purchased game levels

So, I understand that it's possible to set up in-app purchases for iPhone apps to purchase non-consumables like game levels. I understand the logic behind the purchase part, but what I don't understand is, how can I deliver the new game level.
For example: I build an app that contains the first level and they purchase additional levels. Is it better to build all the other levels into the app and whenever they purchase the app, it unlocks it with a plist entry or something? That doesn't seem very update-able to me. Every time I come up with a new level, I'd have to update the app.
So, what I don't understand then, is what is how do I package up a level and download it as a separate entity that can accessed by the game? Would the level just be some XML with images in a ZIP folder or something? How does the level get added to the game? What are best practices for this type of thing?
I Googled and have found NOTHING about this.
I'm a little bit confused by the concept and any help would be appreciated. I'm not looking for someone to write the game for me, I just need pointed in the right direction so I can develop it on my own.
Your game level is whatever you want it to be; you are the designer, after all.
You should look at NSBundle documentation, which can include property lists, image resources (etc) as well as additional code. Package your bundle (zip is convenient), download asynchronously using NSURLConnection, and install be checking the NSDocuments directory for bundles and load with NSBundle.
Or for a simple game level using existing resources, just download a plist that describes it.
You don't need to have your own server; you can download from me.com if you have a MobileMe account, or any similar service.
I would read over the In-App Purchase Programming Guide. It has all the info you need.
In summary: a user will perform the in-app purchase and get a digital receipt from Apple. Your iPhone application should then contact your server to download the new levels, using the receipt as a verification of purchase.
If you don't have a server available to distribute your levels, you might want to consider a third-party service such as UrbanAirship.

iPhone: Setting up an app for use as an "In App Purchase"

Regarding In App Purchases, I can find a lot of information on all the technicalities of actually making purchases and interacting with the store (how to retrieve product information, verify receipts, etc), but I can't seem to find information on guidelines or special instructions for preparing the actual "apps" or "components," whatever they're to be considered, which will act as the In App Purchases.
For instance, once a component is downloaded into an app, where does it exist in the overall architecture of the app? How do they combine to join forces? How do they know about one another. If I have a game, and using In App Purchases I allow users to both download new levels, but also download new game play modes that can affect any of the built-in or downloaded levels, how do I prepare all of these assets so that they integrate?
I'm not looking for a tutorial, per se, but would love to know if anyone has had experience with In App Purchases or knows of a useful reference besides Apple's In App Purchase programming guide which only speaks to the specifics of making the actual download transaction.
The things you download aren't really "apps", they're just data files like anything else your app can download.
Sometimes, they're not really that, they're just effective "switches", i.e. all of the functionality and data is there in your code already, but it's just protected by a line of code like
if (user has purchased extra levels)
add extra items to menu/list
You aren't allowed to download new executable code; I admit I'm not sure how carefully Apple works to prevent you from downloading scripts that control your program's behavior, since it would be very difficult for them to tell what is intrinsic to your original app or not.
In my own programs, I've put the control logic and tables into the main application, and separated out big resource files into a separate ZIP file. When the user buys the add-on pack, they do download that ZIP file of images which keeps the original application size down, and the program just uses those images out of the documents directory instead of the application bundle like it would if they were built in.
I am using the Urban Airship in-app purchase support, which insulates you from running your own server or learning most details of the StoreKit, at the cost of a slice of your revenue.
You can let the levels be in the app from the beginning and just let them become available when the user pays an in-app level. This is by far the most simple solution.
If you want to have downloadable levels you will need to set up an own server that will deliver and check correct purchase transactions with apples servers. You will also need to create all the download and architecture to load and use these levels into your app.
But, you can have a look here http://urbanairship.com/in-app-purchase/ for help in creating downloadable items.
This code will get you going: works on the simulator too: https://github.com/boxerab/InAppPurchase