WatchKit native applications - ios

Is it possible to create native WatchKit applications, which would be able to run without an extension running on a paired iPhone ?

Not at the moment:
Apple Watch requires the presence of an iPhone to run third-party apps. To create a third-party app, you need two separate bundles: a WatchKit app (that runs on Apple Watch) and a WatchKit extension (that runs on the user’s iPhone). The WatchKit app contains only the storyboards and resource files associated with your app’s user interface. The WatchKit extension contains the code for managing the WatchKit app’s user interface and for responding to user interactions.
But it will come soon :
The iOS 8.2 SDK beta including WatchKit is available immediately for iOS Developer Program members at developer.apple.com/watchkit. The WatchKit site includes programming guides, human interface guidelines, templates and more. Starting later next year (meaning 2015), developers will be able to create fully native apps for Apple Watch.

Related

How to submit an independant Apple Watch app? [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I have created an Apple Watch application using XCode 6.3 for iOS SDK 8.3. I tried to upload it to the itunesconnect.apple.com site. I can't find any options to upload Apple Watch apps. There are options only for iOS apps and OS X apps.
Please guide me with this.
2019 Update
As of watchOS 6.0 it is possible to create apps that run on the watch without the need to install a corresponding app on the paired iOS device.
You can follow Apple's instructions to convert an existing watch app into an independent watch app, or just create a new stand-alone watch app in Xcode.
The App Store Connect process is still essentially the same - Create an iOS app. You do not need to provide any iOS app screenshots, only watch screen shots.
Original answer
Apple Watch apps are hosted inside an iOS app, as an iOS extension - so to submit an Apple Watch app you need to submit an iOS app.
From the Apple Watch Programming Guide
Apple Watch requires the presence of an iPhone to run third-party
apps. To create a third-party app, you need two separate bundles: a
WatchKit app (that runs on Apple Watch) and a WatchKit extension (that
runs on the user’s iPhone). The WatchKit app contains only the
storyboards and resource files associated with your app’s user
interface. The WatchKit extension contains the code for managing the
WatchKit app’s user interface and for responding to user interactions.
Because a WatchKit app extends the behavior of your existing iOS app, the WatchKit app and WatchKit extension are bundled together and packaged inside your iOS app bundle. During installation of your iOS app, the system prompts the user to install the WatchKit app when a paired Apple Watch is present.
When you submit your hosting iOS app to App Store you have an option to provide Apple Watch application screen shots to go along with your main app screenshots.

Can I use the Apple watch as an individual device without the iPhone?

In my case, I need to make an in-house communication system using Apple watches (without iPhones) There I'm planning to use UDP or TCP protocol for voice communication.
And is it can able to receive a notification without iPhone?
watch OS 6 and above now allows independent Watch apps.
Check out it's WWDC: Creating Independent Watch Apps
watchOS 6 enables a whole new level of watchOS experiences by allowing
fully independent apps and apps built just for Apple Watch, and by
bringing the App Store to Apple Watch. Discover how to leverage the
power of many iOS frameworks and technologies, now on watchOS, to
create fully independent experiences on Apple Watch.
For lower versions, an Apple Watch app installs as an extension to an iPhone app. You would need an iPhone to access the AppStore to install an iPhone app, which provides an extension app to the Apple Watch.
In this case, you can create a simply, bare minimum iPhone app but with a complex Apple Watch app extension.

Why is my Apple Watch Simulator black?

I have a requirement to create a watchkit app.
Please let me know if it is possible to create a separate app with watch kit or do we have to do this with extensions.
I am testing my application in a simulator. The iPhone simulator and the Apple watch simulator both are coming up. The Apple watch simulator is black, no screen is coming up.
My System harddisk : 320 GB , RAM : 5 GB.
If you haven't read this already, have a look at it. In short it looks like you can only achieve this using extensions at the moment.
This article explains what they expect from you as a 3rd party watch app developer.
Apple Watch requires the presence of an iPhone to run third-party apps. To create a third-party app, you need two separate bundles: a WatchKit app (that runs on Apple Watch) and a WatchKit extension (that runs on the user’s iPhone). The WatchKit app contains only the storyboards and resource files associated with your app’s user interface. The WatchKit extension contains the code for managing the WatchKit app’s user interface and for responding to user interactions.
Also
Because a WatchKit app extends the behavior of your existing iOS app, the WatchKit app and WatchKit extension are bundled together and packaged inside your iOS app bundle. During installation of your iOS app, the system prompts the user to install the WatchKit app when a paired Apple Watch is present.
It's not possible to develop standalone WatchKit app. As you said - it has to be an extension. Also your iPhone app has to do something - it can not be just a container for your extension.
Watch Apps have to be set up as App extensions and cannot be created as stand-alone apps. This is just not what Apple has designed the Watch for, rather view it as an additional screen of your iOS device. Apple also recommends to have as much of your ressource-intensive code as possible in the main iOS-App - e.g. background tasks.
As to why your screen is black:
Make sure you are building the Watch App-Scheme. Then even if your Watch app does not have any UI elements yet, you should see the time in the upper right corner of the watch simulator.

Where to submit an Apple Watch app on iTunesConnect [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I have created an Apple Watch application using XCode 6.3 for iOS SDK 8.3. I tried to upload it to the itunesconnect.apple.com site. I can't find any options to upload Apple Watch apps. There are options only for iOS apps and OS X apps.
Please guide me with this.
2019 Update
As of watchOS 6.0 it is possible to create apps that run on the watch without the need to install a corresponding app on the paired iOS device.
You can follow Apple's instructions to convert an existing watch app into an independent watch app, or just create a new stand-alone watch app in Xcode.
The App Store Connect process is still essentially the same - Create an iOS app. You do not need to provide any iOS app screenshots, only watch screen shots.
Original answer
Apple Watch apps are hosted inside an iOS app, as an iOS extension - so to submit an Apple Watch app you need to submit an iOS app.
From the Apple Watch Programming Guide
Apple Watch requires the presence of an iPhone to run third-party
apps. To create a third-party app, you need two separate bundles: a
WatchKit app (that runs on Apple Watch) and a WatchKit extension (that
runs on the user’s iPhone). The WatchKit app contains only the
storyboards and resource files associated with your app’s user
interface. The WatchKit extension contains the code for managing the
WatchKit app’s user interface and for responding to user interactions.
Because a WatchKit app extends the behavior of your existing iOS app, the WatchKit app and WatchKit extension are bundled together and packaged inside your iOS app bundle. During installation of your iOS app, the system prompts the user to install the WatchKit app when a paired Apple Watch is present.
When you submit your hosting iOS app to App Store you have an option to provide Apple Watch application screen shots to go along with your main app screenshots.

How to establish a communication channel between Apple Watch Extension/App and iOS App

I'm exploring the WatchKit SDK.
When I have a WatchKit app, is it possible to set values (e.g. Text, settings) from the iPhone app on the WatchKit app? Can I call functions in the WatchKit app extension from the iPhone app?
If someone managed to do this, could he/she post an example? Thanks!
You can use App Group and sharedDefaults to share data between the WatchApp/Extension and the App on the phone.
see example:
WatchKit SDK not retrieving data from NSUserDefaults
Study up on iOS8 Extension/App Groups/sharedDefaults and watchkit extension will make more sense.
This sample takes a UIImage from Shinobi chart, save it to defaults as image.
Then extension picks up the image through defaults and shows it on watch
https://github.com/ChrisGrant/ChartWatch
This one uses multipeer connectivity to have watch talk to phone.
https://github.com/jsclayton/swatches
but this uses Bluetooth and I presume the Watch OS also communicates to the phone using bluetooth so not sure if they'll both be allowed.
We have no devices to test on yet so the /swatches app is just watch simuator talking to iphone simulator on same mac.
If youve ever done low level AV programming you know the app may run on the simulator but fail on the device because the simulator can cheat an use Mac OSX media layer. May be the same for bluetooth.
other samples
https://github.com/search?q=WKInterfaceController&type=Code
There are several solutions: CoreData, NSKeyedUnarchiver and NSUserDefaults. With a common background for sharing the common data resource (Database, file or user default settings), this is enabling App Groups capabilities on both targets project properties.
In the following post is explained how to do it with default settings and you can also download the demo project.
With watchOS2 now Apple supports Watch Connectivity Framework to pass information from watch extension to app and vice versa.
Taken from Apple's docs
Communicating with Your Companion iOS App
The Watch Connectivity framework lets you create a bidirectional communications channel between your WatchKit extension and your companion iOS app. Use this channel to coordinate activities between the two processes. For example, you might use this framework to push updated information from your iOS app to your WatchKit extension. The framework provides options for transferring data in the background or while both apps are active and replaces the existing openParentApplication:reply: method of the WKInterfaceController class.
For more information the classes of the Watch Connectivity framework, see Watch Connectivity Framework Reference.
Taken from Apple's Developers Library
You can see this library
https://github.com/mutualmobile/MMWormhole
It do Message passing between iOS apps and extensions.
looks like the links with brain.clear are not pointing to the right destination for ShinobiChart example
https://github.com/ShinobiControls/ChartWatch

Resources