Skip to content

Commit 1907c27

Browse files
committed
Merge pull request parse-community#383 from ParsePlatform/nlutsenko.watch.starter
Add watchOS starter project.
2 parents 208244c + c7d109c commit 1907c27

File tree

16 files changed

+1485
-0
lines changed

16 files changed

+1485
-0
lines changed

Parse.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright (c) 2015-present, Parse, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
10+
import WatchKit
11+
import Parse
12+
13+
class ExtensionDelegate: NSObject, WKExtensionDelegate {
14+
15+
func applicationDidFinishLaunching() {
16+
// Enable storing and querying data from Local Datastore.
17+
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
18+
Parse.enableLocalDatastore()
19+
20+
// Make sure to replace with your Parse app credentials:
21+
Parse.setApplicationId("your_application_id", clientKey: "your_client_key")
22+
23+
// Track application opened event in Analytics
24+
PFAnalytics.trackAppOpenedWithLaunchOptions(nil)
25+
}
26+
27+
func applicationDidBecomeActive() {
28+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
29+
}
30+
31+
func applicationWillResignActive() {
32+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
33+
// Use this method to pause ongoing tasks, disable timers, etc.
34+
}
35+
36+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>ParseStarter Extension</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundlePackageType</key>
18+
<string>XPC!</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleSignature</key>
22+
<string>????</string>
23+
<key>CFBundleVersion</key>
24+
<string>1</string>
25+
<key>NSExtension</key>
26+
<dict>
27+
<key>NSExtensionAttributes</key>
28+
<dict>
29+
<key>WKAppBundleIdentifier</key>
30+
<string>com.parse.starter.watchkitapp</string>
31+
</dict>
32+
<key>NSExtensionPointIdentifier</key>
33+
<string>com.apple.watchkit</string>
34+
</dict>
35+
<key>RemoteInterfacePrincipalClass</key>
36+
<string>$(PRODUCT_MODULE_NAME).InterfaceController</string>
37+
<key>WKExtensionDelegateClassName</key>
38+
<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
39+
</dict>
40+
</plist>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright (c) 2015-present, Parse, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
10+
import WatchKit
11+
import Foundation
12+
import Parse
13+
14+
class InterfaceController: WKInterfaceController {
15+
16+
override func awakeWithContext(context: AnyObject?) {
17+
super.awakeWithContext(context)
18+
19+
// Configure interface objects here.
20+
}
21+
22+
override func willActivate() {
23+
// This method is called when watch view controller is about to be visible to user
24+
super.willActivate()
25+
}
26+
27+
override func didDeactivate() {
28+
// This method is called when watch view controller is no longer visible
29+
super.didDeactivate()
30+
}
31+
32+
}

0 commit comments

Comments
 (0)