Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Add Support for ⌚OS and 📺OS (#827)
Browse files Browse the repository at this point in the history
* Add Support for watchOS and tvOS

* Fix up exception from shared netstandard code to figure out what to send.

* Update Battery.ios.watchos.cs

* Integrate Tizen into the netstandard not supported area.
  • Loading branch information
jamesmontemagno committed Jul 5, 2019
1 parent 067f829 commit a9ba995
Show file tree
Hide file tree
Showing 82 changed files with 1,684 additions and 293 deletions.
105 changes: 0 additions & 105 deletions Samples/Samples.Android/Resources/Resource.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Xamarin.Essentials.sln
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,18 @@ Global
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Debug|x64.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Debug|x86.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Debug|x86.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|Any CPU.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|Any CPU.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|ARM.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|ARM.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|iPhone.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|iPhone.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|iPhoneSimulator.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|x64.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|x64.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|x86.ActiveCfg = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Docs|x86.Build.0 = Debug|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Release|Any CPU.Build.0 = Release|Any CPU
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Release|ARM.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
public static partial class Accelerometer
{
internal static bool IsSupported =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;

static void PlatformStart(SensorSpeed sensorSpeed) =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;

static void PlatformStop() =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ public static partial class AppInfo
static string GetBundleValue(string key)
=> NSBundle.MainBundle.ObjectForInfoDictionary(key)?.ToString();

#if __IOS__ || __TVOS__
static void PlatformShowSettingsUI() =>
UIApplication.SharedApplication.OpenUrl(new NSUrl(UIApplication.OpenSettingsUrlString));
#else
static void PlatformShowSettingsUI() =>
throw new FeatureNotSupportedException();
#endif
}
}
10 changes: 5 additions & 5 deletions Xamarin.Essentials/AppInfo/AppInfo.netstandard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{
public static partial class AppInfo
{
static string PlatformGetPackageName() => throw new NotImplementedInReferenceAssemblyException();
static string PlatformGetPackageName() => throw ExceptionUtils.NotSupportedOrImplementedException;

static string PlatformGetName() => throw new NotImplementedInReferenceAssemblyException();
static string PlatformGetName() => throw ExceptionUtils.NotSupportedOrImplementedException;

static string PlatformGetVersionString() => throw new NotImplementedInReferenceAssemblyException();
static string PlatformGetVersionString() => throw ExceptionUtils.NotSupportedOrImplementedException;

static string PlatformGetBuild() => throw new NotImplementedInReferenceAssemblyException();
static string PlatformGetBuild() => throw ExceptionUtils.NotSupportedOrImplementedException;

static void PlatformShowSettingsUI() => throw new NotImplementedInReferenceAssemblyException();
static void PlatformShowSettingsUI() => throw ExceptionUtils.NotSupportedOrImplementedException;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
public static partial class Barometer
{
internal static bool IsSupported =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;

internal static void PlatformStart(SensorSpeed sensorSpeed) =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;

internal static void PlatformStop() =>
throw new NotImplementedInReferenceAssemblyException();
throw ExceptionUtils.NotSupportedOrImplementedException;
}
}

0 comments on commit a9ba995

Please sign in to comment.