[GpsWatch] copy sample to new location. Should remove on old place after doc updating
|
@ -0,0 +1,57 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MainApp", "GpsWatch\MainApp.csproj", "{5FC2F843-AB41-4E21-826A-4843B88BF8F9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchApp", "WatchApp\WatchApp.csproj", "{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchAppExtension", "WatchAppExtension\WatchAppExtension.csproj", "{C503F263-396E-4F96-B7CD-9EA9726B11BA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Release|iPhone = Release|iPhone
|
||||
Ad-Hoc|iPhone = Ad-Hoc|iPhone
|
||||
AppStore|iPhone = AppStore|iPhone
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{5FC2F843-AB41-4E21-826A-4843B88BF8F9}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{C503F263-396E-4F96-B7CD-9EA9726B11BA}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
using CoreLocation;
|
||||
|
||||
namespace GpsWatch
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
// application events from iOS.
|
||||
[Register ("AppDelegate")]
|
||||
public partial class AppDelegate : UIApplicationDelegate
|
||||
{
|
||||
CLLocationManager locationManager;
|
||||
CLLocationCoordinate2D locationCoordinate;
|
||||
CLAuthorizationStatus status;
|
||||
|
||||
public override UIWindow Window {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
|
||||
{
|
||||
Console.WriteLine ("containing iOS app's state {0}", UIApplication.SharedApplication.ApplicationState);
|
||||
|
||||
status = CLLocationManager.Status;
|
||||
if (UIApplication.SharedApplication.ApplicationState == UIApplicationState.Active)
|
||||
SetupLocationManager ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// This method is called as part of the transiton from background to active state.
|
||||
public override void WillEnterForeground (UIApplication application)
|
||||
{
|
||||
SetupLocationManager ();
|
||||
}
|
||||
|
||||
void SetupLocationManager()
|
||||
{
|
||||
if (locationManager != null)
|
||||
return;
|
||||
|
||||
locationManager = new CLLocationManager ();
|
||||
locationManager.AuthorizationChanged += OnAuthorizationChanged;
|
||||
locationManager.LocationsUpdated += OnLocationsUpdated;
|
||||
}
|
||||
|
||||
void OnAuthorizationChanged (object sender, CLAuthorizationChangedEventArgs e)
|
||||
{
|
||||
Console.WriteLine ("new authorization state = {0}", status);
|
||||
status = e.Status;
|
||||
|
||||
switch (status) {
|
||||
case CLAuthorizationStatus.AuthorizedAlways:
|
||||
locationManager.StartUpdatingLocation ();
|
||||
break;
|
||||
|
||||
case CLAuthorizationStatus.NotDetermined:
|
||||
locationManager.RequestAlwaysAuthorization ();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnLocationsUpdated (object sender, CLLocationsUpdatedEventArgs e)
|
||||
{
|
||||
locationCoordinate = e.Locations.Last ().Coordinate;
|
||||
}
|
||||
|
||||
public override void HandleWatchKitExtensionRequest (UIApplication application, NSDictionary userInfo, Action<NSDictionary> reply)
|
||||
{
|
||||
reply (new NSDictionary ("status", NSNumber.FromUInt32 ((uint)status),
|
||||
"lon", NSNumber.FromDouble (locationCoordinate.Longitude),
|
||||
"lat", NSNumber.FromDouble (locationCoordinate.Latitude)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?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>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using UIKit;
|
||||
using Foundation;
|
||||
using CoreGraphics;
|
||||
using System.Linq;
|
||||
|
||||
namespace GpsWatch
|
||||
{
|
||||
public partial class GpsWatchViewController : UIViewController
|
||||
{
|
||||
UILabel lbl;
|
||||
|
||||
static bool UserInterfaceIdiomIsPhone {
|
||||
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
|
||||
}
|
||||
|
||||
public GpsWatchViewController (IntPtr handle) : base (handle)
|
||||
{
|
||||
}
|
||||
|
||||
public override void DidReceiveMemoryWarning ()
|
||||
{
|
||||
// Releases the view if it doesn't have a superview.
|
||||
base.DidReceiveMemoryWarning ();
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#region View lifecycle
|
||||
|
||||
public override void ViewDidLoad ()
|
||||
{
|
||||
base.ViewDidLoad ();
|
||||
|
||||
Console.WriteLine ("GpsWatchViewController loaded");
|
||||
ShowDescription ();
|
||||
}
|
||||
|
||||
void ShowDescription()
|
||||
{
|
||||
lbl = new UILabel {
|
||||
Lines = 0,
|
||||
LineBreakMode = UILineBreakMode.WordWrap,
|
||||
Text = "This is Main iOS app. It hosts watchkit app and watchkit extension. Watch extension requests location changes from MainApp Aslo and passes it to WatchApp",
|
||||
};
|
||||
lbl.Frame = new CGRect (0, 0, View.Frame.Width - 20, 0);
|
||||
lbl.SizeToFit ();
|
||||
View.AddSubview (lbl);
|
||||
|
||||
lbl.Center = View.Center;
|
||||
}
|
||||
|
||||
|
||||
public override void ViewWillAppear (bool animated)
|
||||
{
|
||||
base.ViewWillAppear (animated);
|
||||
}
|
||||
|
||||
public override void ViewDidAppear (bool animated)
|
||||
{
|
||||
base.ViewDidAppear (animated);
|
||||
}
|
||||
|
||||
public override void ViewWillDisappear (bool animated)
|
||||
{
|
||||
base.ViewWillDisappear (animated);
|
||||
}
|
||||
|
||||
public override void ViewDidDisappear (bool animated)
|
||||
{
|
||||
base.ViewDidDisappear (animated);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using Foundation;
|
||||
|
||||
namespace GpsWatch
|
||||
{
|
||||
[Register ("GpsWatchViewController")]
|
||||
partial class GpsWatchViewController
|
||||
{
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
<?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>CFBundleIdentifier</key>
|
||||
<string>com.your-company.gpswatch</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>MainStoryboard_iPhone</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>MainStoryboard_iPad</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>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>GpsWatch</string>
|
||||
<key>NSLocationAlwaysUsageDescription</key>
|
||||
<string>Allow WatchKit app to use your location</string>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Resources/Images.xcassets/AppIcon.appiconset</string>
|
||||
<key>XSLaunchImageAssets</key>
|
||||
<string>Resources/Images.xcassets/LaunchImage.launchimage</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace GpsWatch
|
||||
{
|
||||
public class Application
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main (string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main (args, null, "AppDelegate");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{5FC2F843-AB41-4E21-826A-4843B88BF8F9}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>GpsWatch</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>MainApp</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
<MtouchI18n>
|
||||
</MtouchI18n>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchI18n>
|
||||
</MtouchI18n>
|
||||
<CodesignProvision>b6200948-2ac1-4893-8373-aa17b1e188f7</CodesignProvision>
|
||||
<IpaPackageName>
|
||||
</IpaPackageName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<IpaIncludeArtwork>true</IpaIncludeArtwork>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
|
||||
<InterfaceDefinition Include="MainStoryboard_iPhone.storyboard" />
|
||||
<InterfaceDefinition Include="MainStoryboard_iPad.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="GpsWatchViewController.cs" />
|
||||
<Compile Include="GpsWatchViewController.designer.cs">
|
||||
<DependentUpon>GpsWatchViewController.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WatchAppExtension\WatchAppExtension.csproj">
|
||||
<Project>{C503F263-396E-4F96-B7CD-9EA9726B11BA}</Project>
|
||||
<Name>WatchAppExtension</Name>
|
||||
<IsAppExtension>True</IsAppExtension>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\Images.xcassets\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Contents.json" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-60%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-72.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-72%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-76.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-76%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Small-50.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Small-50%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Small.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Small%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Spotlight-40.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon-Spotlight-40%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\AppIcon.appiconset\Icon%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Contents.json" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default-568h%402x.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default-Landscape%402x~ipad.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default-Landscape~ipad.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default-Portrait%402x~ipad.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default-Portrait~ipad.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default.png" />
|
||||
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Default%402x.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676" />
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--class Prefix:identifier View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="GpsWatchViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="20" width="768" height="1004" />
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder" />
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque" />
|
||||
<simulatedOrientationMetrics key="orientation" />
|
||||
<simulatedScreenMetrics key="destination" />
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676" />
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--class Prefix:identifier View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="GpsWatchViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568" />
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES" />
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder" />
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" />
|
||||
<simulatedOrientationMetrics key="orientation" />
|
||||
<simulatedScreenMetrics key="destination" type="retina4" />
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"filename": "Icon-Small.png",
|
||||
"size": "29x29",
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Small@2x.png",
|
||||
"size": "29x29",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Spotlight-40@2x.png",
|
||||
"size": "40x40",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon.png",
|
||||
"size": "57x57",
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon@2x.png",
|
||||
"size": "57x57",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-60@2x.png",
|
||||
"size": "60x60",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Small.png",
|
||||
"size": "29x29",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Small@2x.png",
|
||||
"size": "29x29",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Spotlight-40.png",
|
||||
"size": "40x40",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Spotlight-40@2x.png",
|
||||
"size": "40x40",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Small-50.png",
|
||||
"size": "50x50",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-Small-50@2x.png",
|
||||
"size": "50x50",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-72.png",
|
||||
"size": "72x72",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-72@2x.png",
|
||||
"size": "72x72",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-76.png",
|
||||
"size": "76x76",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-76@2x.png",
|
||||
"size": "76x76",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
Normal file
После Ширина: | Высота: | Размер: 7.0 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-72.png
Normal file
После Ширина: | Высота: | Размер: 5.4 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png
Normal file
После Ширина: | Высота: | Размер: 8.0 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-76.png
Normal file
После Ширина: | Высота: | Размер: 5.5 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
Normal file
После Ширина: | Высота: | Размер: 8.2 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png
Normal file
После Ширина: | Высота: | Размер: 4.4 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png
Normal file
После Ширина: | Высота: | Размер: 6.3 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Small.png
Normal file
После Ширина: | Высота: | Размер: 3.6 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
Normal file
После Ширина: | Высота: | Размер: 4.7 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
Normal file
После Ширина: | Высота: | Размер: 4.0 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
Normal file
После Ширина: | Высота: | Размер: 5.5 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon.png
Normal file
После Ширина: | Высота: | Размер: 4.7 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/AppIcon.appiconset/Icon@2x.png
Normal file
После Ширина: | Высота: | Размер: 6.8 KiB |
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default@2x.png",
|
||||
"size": "640x960",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-568h@2x.png",
|
||||
"size": "640x1136",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Portrait~ipad.png",
|
||||
"size": "768x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Portrait@2x~ipad.png",
|
||||
"size": "1536x2048",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Landscape~ipad.png",
|
||||
"size": "1024x768",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Landscape@2x~ipad.png",
|
||||
"size": "2048x1536",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default.png",
|
||||
"size": "320x480",
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default@2x.png",
|
||||
"size": "640x960",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-568h@2x.png",
|
||||
"size": "640x1136",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Portrait~ipad.png",
|
||||
"size": "768x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Portrait@2x~ipad.png",
|
||||
"size": "1536x2048",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "to-status-bar",
|
||||
"size": "768x1004",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "to-status-bar",
|
||||
"size": "1536x2008",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Landscape~ipad.png",
|
||||
"size": "1024x768",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"filename": "Default-Landscape@2x~ipad.png",
|
||||
"size": "2048x1536",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "to-status-bar",
|
||||
"size": "1024x748",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "to-status-bar",
|
||||
"size": "2048x1496",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png
Normal file
После Ширина: | Высота: | Размер: 61 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png
Normal file
После Ширина: | Высота: | Размер: 22 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png
Normal file
После Ширина: | Высота: | Размер: 28 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png
Normal file
После Ширина: | Высота: | Размер: 21 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png
Normal file
После Ширина: | Высота: | Размер: 42 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default.png
Normal file
После Ширина: | Высота: | Размер: 14 KiB |
Двоичные данные
WatchKit/GpsWatch/GpsWatch/Resources/Images.xcassets/LaunchImage.launchimage/Default@2x.png
Normal file
После Ширина: | Высота: | Размер: 38 KiB |
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6724" systemVersion="14A388a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6711"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Xamarin" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GpsWatch" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SampleMetadata>
|
||||
<ID>c0c0b64a-9cfd-11e4-b6c1-a8206629811d</ID>
|
||||
<IsFullApplication>false</IsFullApplication>
|
||||
<Level>Beginning</Level>
|
||||
<Tags>iOS8, Watch, User Interface, Maps + Location, Getting Started</Tags>
|
||||
<SupportedPlatforms>iOS</SupportedPlatforms>
|
||||
<Gallery>true</Gallery>
|
||||
<MinimumLicenseRequirement>Starter</MinimumLicenseRequirement>
|
||||
</SampleMetadata>
|
|
@ -0,0 +1,24 @@
|
|||
GPS Watch
|
||||
==============
|
||||
|
||||
The sample shows how communicate directly with your `containing iOS App` via `OpenParentApplication` method
|
||||
|
||||
Instructions
|
||||
------------
|
||||
|
||||
* Launch WatchApp on Watch Simulator
|
||||
* Launch GpsWatch (MainApp/containing iOS app) and allow location service.
|
||||
|
||||
Build Requirements
|
||||
------------------
|
||||
|
||||
Building this sample requires Xcode 6.2 and iOS 8.0 SDK
|
||||
|
||||
Target
|
||||
------
|
||||
This sample runnable on iPhoneSimulator 8.2 and Watch Simulator
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
Created with Xamarin.iOS by Rustam Zaitov
|
После Ширина: | Высота: | Размер: 14 KiB |
|
@ -0,0 +1,6 @@
|
|||
<?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>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,33 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>WatchApp</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.your-company.gpswatch.watchkitapp</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>com.your-company.gpswatch.watchkitapp</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>com.your-company.gpswatch</string>
|
||||
<key>WKWatchKitApp</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="6724" systemVersion="14A388a" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="AgC-eL-Hgc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6711"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="3735"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Interface Controller-->
|
||||
<scene sceneID="aou-V4-d1y">
|
||||
<objects>
|
||||
<controller id="AgC-eL-Hgc" customClass="InterfaceController">
|
||||
<items>
|
||||
<label alignment="left" text="Longitude" id="wNW-yU-enX"/>
|
||||
<label width="136" alignment="left" text="not available" id="fJT-QF-FwI"/>
|
||||
<separator alignment="left" id="Owd-NT-iOb"/>
|
||||
<label alignment="left" text="Latitude" id="Mqe-gd-aeS"/>
|
||||
<label alignment="left" text="not available" id="tC8-gC-KHG"/>
|
||||
<separator alignment="left" id="Rrk-6v-dIG"/>
|
||||
<label height="39" alignment="left" numberOfLines="0" id="4S8-q0-DNg">
|
||||
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</label>
|
||||
</items>
|
||||
<connections>
|
||||
<outlet property="LatitudeValueLbl" destination="tC8-gC-KHG" id="NdZ-p3-27x"/>
|
||||
<outlet property="LongitudeValueLbl" destination="fJT-QF-FwI" id="BxZ-dk-jW8"/>
|
||||
<outlet property="WarningLbl" destination="4S8-q0-DNg" id="jno-t1-zJC"/>
|
||||
</connections>
|
||||
</controller>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="235" y="347"/>
|
||||
</scene>
|
||||
<!--Glance Interface Controller-->
|
||||
<scene sceneID="BOz-TT-tkC">
|
||||
<objects>
|
||||
<glanceController spacing="0.0" id="0uZ-2p-rRc" customClass="GlanceController">
|
||||
<items>
|
||||
<group alignment="left" id="t8f-Gd-c4y"/>
|
||||
<group alignment="left" id="uCw-4Q-Ouw"/>
|
||||
</items>
|
||||
<edgeInsets key="margins" left="0.0" right="0.0" top="0.0" bottom="14"/>
|
||||
</glanceController>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="235" y="672"/>
|
||||
</scene>
|
||||
<!--Static Notification Interface Controller-->
|
||||
<scene sceneID="AEw-b0-oYE">
|
||||
<objects>
|
||||
<notificationController id="YCC-NB-fut">
|
||||
<items>
|
||||
<label alignment="left" text="Alert Label" id="XkS-y5-khE"/>
|
||||
</items>
|
||||
<notificationCategory key="notificationCategory" id="JfB-70-Muf"/>
|
||||
<connections>
|
||||
<outlet property="notificationAlertLabel" destination="XkS-y5-khE" id="49B-RR-99y"/>
|
||||
<segue destination="gdX-wl-uQE" kind="relationship" relationship="dynamicNotificationInterface" id="fKh-qV-3T2"/>
|
||||
</connections>
|
||||
</notificationController>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="235" y="1001"/>
|
||||
</scene>
|
||||
<!--Notification Controller-->
|
||||
<scene sceneID="KIl-fV-djm">
|
||||
<objects>
|
||||
<controller id="gdX-wl-uQE" customClass="NotificationController"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="553" y="1001"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{D73F8E79-B4DD-4AB0-A767-D9FA3E2FE740};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>WatchApp</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>WatchApp</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<IpaIncludeArtwork>true</IpaIncludeArtwork>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Interface.storyboard" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.WatchApp.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\WatchAppExtension\GlanceController.cs">
|
||||
<Link>GlanceController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WatchAppExtension\GlanceController.designer.cs">
|
||||
<Link>GlanceController.designer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WatchAppExtension\InterfaceController.cs">
|
||||
<Link>InterfaceController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WatchAppExtension\InterfaceController.designer.cs">
|
||||
<Link>InterfaceController.designer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WatchAppExtension\NotificationController.cs">
|
||||
<Link>NotificationController.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WatchAppExtension\NotificationController.designer.cs">
|
||||
<Link>NotificationController.designer.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?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>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
using WatchKit;
|
||||
using Foundation;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
public partial class GlanceController : WKInterfaceController
|
||||
{
|
||||
public GlanceController (IntPtr handle) : base (handle)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Awake (NSObject context)
|
||||
{
|
||||
base.Awake (context);
|
||||
|
||||
// Configure interface objects here.
|
||||
Console.WriteLine ("{0} awake with context", this);
|
||||
}
|
||||
|
||||
public override void WillActivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is about to be visible to the user.
|
||||
Console.WriteLine ("{0} will activate", this);
|
||||
}
|
||||
|
||||
public override void DidDeactivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is no longer visible to the user.
|
||||
Console.WriteLine ("{0} did deactivate", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
|
||||
using Foundation;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
[Register ("GlanceController")]
|
||||
partial class GlanceController
|
||||
{
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>WatchAppExtension</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.your-company.gpswatch.watchkitextension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>com.your-company.gpswatch.watchkitextension</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionAttributes</key>
|
||||
<dict>
|
||||
<key>WKAppBundleIdentifier</key>
|
||||
<string>com.your-company.gpswatch.watchkitapp</string>
|
||||
</dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.watchkit</string>
|
||||
</dict>
|
||||
<key>RemoteInterfacePrincipleClass</key>
|
||||
<string>InterfaceController</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
|
||||
using WatchKit;
|
||||
using Foundation;
|
||||
using CoreLocation;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
public partial class InterfaceController : WKInterfaceController
|
||||
{
|
||||
NSTimer timer;
|
||||
|
||||
public InterfaceController (IntPtr handle) : base (handle)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Awake (NSObject context)
|
||||
{
|
||||
base.Awake (context);
|
||||
|
||||
timer = NSTimer.CreateRepeatingScheduledTimer (5, UpdateUserInterface);
|
||||
UpdateUserInterface (timer);
|
||||
|
||||
// Configure interface objects here.
|
||||
Console.WriteLine ("{0} awake with context", this);
|
||||
}
|
||||
|
||||
public override void WillActivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is about to be visible to the user.
|
||||
Console.WriteLine ("{0} will activate", this);
|
||||
}
|
||||
|
||||
public override void DidDeactivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is no longer visible to the user.
|
||||
Console.WriteLine ("{0} did deactivate", this);
|
||||
}
|
||||
|
||||
void UpdateUserInterface(NSTimer t)
|
||||
{
|
||||
WKInterfaceController.OpenParentApplication (new NSDictionary (), (replyInfo, error) => {
|
||||
if(error != null) {
|
||||
Console.WriteLine (error);
|
||||
return;
|
||||
}
|
||||
|
||||
var status = (CLAuthorizationStatus)((NSNumber)replyInfo["status"]).UInt32Value;
|
||||
var longitude = ((NSNumber)replyInfo["lon"]).DoubleValue;
|
||||
var latitude = ((NSNumber)replyInfo["lat"]).DoubleValue;
|
||||
|
||||
Console.WriteLine ("authorization status {0}", status);
|
||||
switch(status) {
|
||||
case CLAuthorizationStatus.AuthorizedAlways:
|
||||
SetCooridinate(longitude, latitude);
|
||||
HideWarning();
|
||||
break;
|
||||
|
||||
case CLAuthorizationStatus.NotDetermined:
|
||||
SetNotAvailable();
|
||||
ShowWarning("Launch the iOS app first");
|
||||
break;
|
||||
|
||||
case CLAuthorizationStatus.Denied:
|
||||
SetNotAvailable();
|
||||
ShowWarning("Enable Location Service on iPhone");
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void SetCooridinate(double longitude, double latitude)
|
||||
{
|
||||
LongitudeValueLbl.SetText (longitude.ToString ());
|
||||
LatitudeValueLbl.SetText (latitude.ToString ());
|
||||
}
|
||||
|
||||
void SetNotAvailable()
|
||||
{
|
||||
LongitudeValueLbl.SetText ("not available");
|
||||
LatitudeValueLbl.SetText ("not available");
|
||||
}
|
||||
|
||||
void ShowWarning(string warning)
|
||||
{
|
||||
WarningLbl.SetText (warning);
|
||||
WarningLbl.SetHidden (false);
|
||||
}
|
||||
|
||||
void HideWarning()
|
||||
{
|
||||
WarningLbl.SetHidden (true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by Xamarin Studio to store outlets and
|
||||
// actions made in the UI designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using Foundation;
|
||||
using System.CodeDom.Compiler;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
[Register ("InterfaceController")]
|
||||
partial class InterfaceController
|
||||
{
|
||||
[Outlet]
|
||||
WatchKit.WKInterfaceLabel LatitudeValueLbl { get; set; }
|
||||
|
||||
[Outlet]
|
||||
WatchKit.WKInterfaceLabel LongitudeValueLbl { get; set; }
|
||||
|
||||
[Outlet]
|
||||
WatchKit.WKInterfaceLabel WarningLbl { get; set; }
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (WarningLbl != null) {
|
||||
WarningLbl.Dispose ();
|
||||
WarningLbl = null;
|
||||
}
|
||||
|
||||
if (LatitudeValueLbl != null) {
|
||||
LatitudeValueLbl.Dispose ();
|
||||
LatitudeValueLbl = null;
|
||||
}
|
||||
|
||||
if (LongitudeValueLbl != null) {
|
||||
LongitudeValueLbl.Dispose ();
|
||||
LongitudeValueLbl = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
using WatchKit;
|
||||
using Foundation;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
public partial class NotificationController : WKUserNotificationInterfaceController
|
||||
{
|
||||
public NotificationController (IntPtr handle) : base (handle)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Awake (NSObject context)
|
||||
{
|
||||
base.Awake (context);
|
||||
|
||||
// Configure interface objects here.
|
||||
Console.WriteLine ("{0} awake with context", this);
|
||||
}
|
||||
|
||||
public override void WillActivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is about to be visible to the user.
|
||||
Console.WriteLine ("{0} will activate", this);
|
||||
}
|
||||
|
||||
public override void DidDeactivate ()
|
||||
{
|
||||
// This method is called when the watch view controller is no longer visible to the user.
|
||||
Console.WriteLine ("{0} did deactivate", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
19
WatchKit/GpsWatch/WatchAppExtension/NotificationController.designer.cs
сгенерированный
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
|
||||
using Foundation;
|
||||
|
||||
namespace WatchAppExtension
|
||||
{
|
||||
[Register ("NotificationController")]
|
||||
partial class NotificationController
|
||||
{
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"aps": {
|
||||
"alert": "Test message content",
|
||||
"title": "Optional title",
|
||||
"category": "myCategory"
|
||||
},
|
||||
|
||||
"WatchKit Simulator Actions": [
|
||||
{
|
||||
"title": "First Button",
|
||||
"identifier": "firstButtonAction"
|
||||
}
|
||||
],
|
||||
|
||||
"customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to choose between them in when selecting to debug the notification interface of your Watch App."
|
||||
}
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{C503F263-396E-4F96-B7CD-9EA9726B11BA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>WatchAppExtension</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>WatchAppExtension</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>i386</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchProfiling>true</MtouchProfiling>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<IpaIncludeArtwork>true</IpaIncludeArtwork>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
|
||||
<BuildIpa>true</BuildIpa>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>Automatic:AppStore</CodesignProvision>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="Entitlements.plist" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GlanceController.cs" />
|
||||
<Compile Include="GlanceController.designer.cs">
|
||||
<DependentUpon>GlanceController.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InterfaceController.cs" />
|
||||
<Compile Include="InterfaceController.designer.cs">
|
||||
<DependentUpon>InterfaceController.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NotificationController.cs" />
|
||||
<Compile Include="NotificationController.designer.cs">
|
||||
<DependentUpon>NotificationController.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="PushNotificationPayload.json" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WatchApp\WatchApp.csproj">
|
||||
<Project>{447DDC3C-AFD1-480F-B1D3-E8B9ED0DBA62}</Project>
|
||||
<Name>WatchApp</Name>
|
||||
<IsWatchApp>True</IsWatchApp>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|