Skip to content

Commit

Permalink
Implemented workaround for crash documented here: ufuf#5
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-wilson committed Jun 3, 2019
1 parent 39998ec commit 01182d8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions AdvancedTimer.Forms.Plugin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8.1">
<id>info.dmwilson.AdvancedTimer.Forms.Plugin</id>
<version>1.0.2.0-alpha2</version>
<version>1.0.2.0-alpha5</version>
<title>AdvancedTimer Plugin for Xamarin.Forms</title>
<authors>Ufuk ARSLAN,David M. Wilson</authors>
<owners>David M. Wilson</owners>
<licenseUrl>https://github.com/d-m-wilson/AdvancedTimer/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/d-m-wilson/AdvancedTimer</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
This is a .NET Standard 2.0 version of the AdvancedTimer plugin by Ufuk Arslan. The code has not been modified, only the project types and references.
This is a .NET Standard 2.0 version of the AdvancedTimer plugin by Ufuk Arslan.

Timer object and its methods are implemented for extended support for timers.
You can start, stop, change interval of a timer.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using AdvancedTimer.Forms.Plugin.Abstractions;
using System;
using Xamarin.Forms;
using AdvancedTimer.Forms.Plugin.Droid;
using System.Timers;
using AdvancedTimer.Forms.Plugin.Abstractions;
using Xamarin.Forms;

[assembly: Dependency(typeof(AdvancedTimerImplementation))]
namespace AdvancedTimer.Forms.Plugin.Droid
{
/// <summary>
Expand All @@ -19,7 +17,10 @@ public class AdvancedTimerImplementation : IAdvancedTimer
/// <summary>
/// Used for registration with dependency service
/// </summary>
public static void Init() { }
public static void Init()
{
DependencyService.Register<IAdvancedTimer, AdvancedTimerImplementation>();
}

/// <summary>
/// Used for initializing timer and options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using AdvancedTimer.Forms.Plugin.Abstractions;
using System;
using Xamarin.Forms;
using AdvancedTimer.Forms.Plugin.iOS;
using System;
using System.Timers;
using AdvancedTimer.Forms.Plugin.Abstractions;
using Xamarin.Forms;

[assembly: Dependency(typeof(AdvancedTimerImplementation))]
namespace AdvancedTimer.Forms.Plugin.iOS
{
/// <summary>
/// AdvancedTimer Implementation
/// </summary>
[Foundation.Preserve(AllMembers = true, Conditional = false)]
public class AdvancedTimerImplementation : IAdvancedTimer
{
Timer timer;
Expand All @@ -19,7 +18,10 @@ public class AdvancedTimerImplementation : IAdvancedTimer
/// <summary>
/// Used for registration with dependency service
/// </summary>
public static void Init() { }
public static void Init()
{
DependencyService.Register<IAdvancedTimer, AdvancedTimerImplementation>();
}

/// <summary>
/// Used for initializing timer and options
Expand Down

0 comments on commit 01182d8

Please sign in to comment.