summaryrefslogtreecommitdiffstats
path: root/tests/manual/planets-qml/planets-watchos/PlanetsClient
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/planets-qml/planets-watchos/PlanetsClient')
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.h12
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.m46
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/Contents.json95
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon120.pngbin0 -> 2629 bytes
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon180.pngbin0 -> 5401 bytes
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/LaunchScreen.storyboard27
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/Main.storyboard73
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/Info.plist45
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.h13
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.m48
-rw-r--r--tests/manual/planets-qml/planets-watchos/PlanetsClient/main.m16
11 files changed, 375 insertions, 0 deletions
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.h b/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.h
new file mode 100644
index 000000000..8ec37d7ee
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.h
@@ -0,0 +1,12 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+
+@end
+
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.m b/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.m
new file mode 100644
index 000000000..b44f13fd3
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/AppDelegate.m
@@ -0,0 +1,46 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@end
+
+@implementation AppDelegate
+
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ // Override point for customization after application launch.
+ return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ // 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.
+ // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
+}
+
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
+}
+
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ // 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.
+}
+
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+
+@end
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000..a3ed4cb66
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,95 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "icon120.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "icon180.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+} \ No newline at end of file
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon120.png b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon120.png
new file mode 100644
index 000000000..c8ff9a2eb
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon120.png
Binary files differ
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon180.png b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon180.png
new file mode 100644
index 000000000..8d312e8a4
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Assets.xcassets/AppIcon.appiconset/icon180.png
Binary files differ
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/LaunchScreen.storyboard b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 000000000..fdf3f97d1
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="EHf-IW-A2E">
+ <objects>
+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+ <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="53" y="375"/>
+ </scene>
+ </scenes>
+</document>
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/Main.storyboard b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/Main.storyboard
new file mode 100644
index 000000000..d15768d40
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Base.lproj/Main.storyboard
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11535.1" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+ <device id="retina4_7" orientation="portrait">
+ <adaptation id="fullscreen"/>
+ </device>
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11523"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="tne-QT-ifu">
+ <objects>
+ <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+ <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Host Name (or IP address)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yQD-6e-UAt">
+ <rect key="frame" x="16" y="28" width="343" height="21"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bpy-NM-f5W">
+ <rect key="frame" x="16" y="162" width="343" height="30"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <state key="normal" title="Apply"/>
+ <connections>
+ <action selector="applyButtonClicked:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Vac-dy-zbh"/>
+ </connections>
+ </button>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Port" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Myw-mc-Fnd">
+ <rect key="frame" x="16" y="95" width="343" height="21"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="8080" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3ss-x9-aC2">
+ <rect key="frame" x="16" y="124" width="343" height="30"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <nil key="textColor"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits"/>
+ </textField>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="127.0.0.1" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="lbT-LC-4Rv">
+ <rect key="frame" x="16" y="57" width="343" height="30"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <nil key="textColor"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits"/>
+ </textField>
+ </subviews>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </view>
+ <connections>
+ <outlet property="applyButton" destination="bpy-NM-f5W" id="6ch-bt-ccO"/>
+ <outlet property="hostNameTextField" destination="lbT-LC-4Rv" id="mNc-AV-o4s"/>
+ <outlet property="portTextField" destination="3ss-x9-aC2" id="zzX-4j-Sk4"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+</document>
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/Info.plist b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Info.plist
new file mode 100644
index 000000000..d05247386
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/Info.plist
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.h b/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.h
new file mode 100644
index 000000000..63f2b6ec1
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.h
@@ -0,0 +1,13 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#import <UIKit/UIKit.h>
+#import <WatchConnectivity/WatchConnectivity.h>
+
+@interface ViewController : UIViewController
+@property (weak, nonatomic) IBOutlet UITextField *hostNameTextField;
+@property (weak, nonatomic) IBOutlet UITextField *portTextField;
+@property (weak, nonatomic) IBOutlet UIButton *applyButton;
+
+@end
+
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.m b/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.m
new file mode 100644
index 000000000..985a08a1d
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/ViewController.m
@@ -0,0 +1,48 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#import "ViewController.h"
+
+@interface ViewController () <WCSessionDelegate>
+
+@end
+
+@implementation ViewController
+
+- (void)session:(WCSession *)session activationDidCompleteWithState:(WCSessionActivationState)activationState error:(NSError *)error {
+
+}
+
+- (void)sessionDidBecomeInactive:(WCSession *)session {
+
+}
+
+- (void)sessionDidDeactivate:(WCSession *)session {
+
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+
+ if ([WCSession isSupported]) {
+ WCSession *session = [WCSession defaultSession];
+ session.delegate = self;
+ [session activateSession];
+ }
+}
+
+- (IBAction)applyButtonClicked:(id)sender {
+ if ([[WCSession defaultSession] isReachable]) {
+ NSDictionary *dictionary = @{
+ @"host" : [self.hostNameTextField text],
+ @"port" : [self.portTextField text]
+ };
+
+ [[WCSession defaultSession] sendMessage:dictionary
+ replyHandler:^(NSDictionary *replyHandler) {}
+ errorHandler:^(NSError *error) {}];
+ }
+}
+
+@end
diff --git a/tests/manual/planets-qml/planets-watchos/PlanetsClient/main.m b/tests/manual/planets-qml/planets-watchos/PlanetsClient/main.m
new file mode 100644
index 000000000..22b991ddd
--- /dev/null
+++ b/tests/manual/planets-qml/planets-watchos/PlanetsClient/main.m
@@ -0,0 +1,16 @@
+//
+// main.m
+// PlanetsClient
+//
+// Created by Oleg Yadrov on 10/13/16.
+// Copyright © 2016 Oleg Yadrov. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}