├── iOS ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Entitlements.plist ├── packages.config ├── Main.cs ├── AppDelegate.cs ├── LaunchScreen.storyboard ├── Info.plist └── VersionTrackingSample.iOS.csproj ├── Droid ├── Resources │ ├── drawable │ │ └── icon.png │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-xxhdpi │ │ └── icon.png │ ├── layout │ │ ├── Toolbar.axml │ │ └── Tabbar.axml │ ├── values │ │ └── styles.xml │ └── AboutResources.txt ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── packages.config └── VersionTrackingSample.Droid.csproj ├── packages.config ├── VersionTrackingSample.cs ├── Properties └── AssemblyInfo.cs ├── VersionTrackingSample.csproj ├── VersionTrackingSample.sln ├── VersionsPage.cs └── .gitignore /iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/VersionTrackingSample/master/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/VersionTrackingSample/master/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/VersionTrackingSample/master/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/VersionTrackingSample/master/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /iOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace VersionTrackingSample.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /VersionTrackingSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Xamarin.Forms; 4 | 5 | namespace VersionTrackingSample 6 | { 7 | public class App : Application 8 | { 9 | public App() 10 | { 11 | 12 | 13 | MainPage = new NavigationPage(new VersionsPage()); 14 | } 15 | 16 | protected override void OnStart() 17 | { 18 | // Handle when your app starts 19 | } 20 | 21 | protected override void OnSleep() 22 | { 23 | // Handle when your app sleeps 24 | } 25 | 26 | protected override void OnResume() 27 | { 28 | // Handle when your app resumes 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | using Plugin.VersionTracking; 8 | 9 | namespace VersionTrackingSample.iOS 10 | { 11 | [Register("AppDelegate")] 12 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 13 | { 14 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 15 | { 16 | global::Xamarin.Forms.Forms.Init(); 17 | CrossVersionTracking.Current.Track(); 18 | LoadApplication(new App()); 19 | 20 | return base.FinishedLaunching(app, options); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content; 5 | using Android.Content.PM; 6 | using Android.Runtime; 7 | using Android.Views; 8 | using Android.Widget; 9 | using Android.OS; 10 | using Plugin.VersionTracking; 11 | 12 | namespace VersionTrackingSample.Droid 13 | { 14 | [Activity(Label = "VersionTrackingSample.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 15 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 16 | { 17 | protected override void OnCreate(Bundle bundle) 18 | { 19 | TabLayoutResource = Resource.Layout.Tabbar; 20 | ToolbarResource = Resource.Layout.Toolbar; 21 | 22 | base.OnCreate(bundle); 23 | CrossVersionTracking.Current.Track(); 24 | global::Xamarin.Forms.Forms.Init(this, bundle); 25 | 26 | LoadApplication(new App()); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Droid/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("VersionTrackingSample")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("${AuthorCopyright}")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("VersionTrackingSample.Droid")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("${AuthorCopyright}")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | -------------------------------------------------------------------------------- /Droid/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | Vtracking 7 | CFBundleName 8 | Vtracking 9 | CFBundleIdentifier 10 | com.thatcsharpguy.versiontrackingsample 11 | CFBundleShortVersionString 12 | 3.0 13 | LSRequiresIPhoneOS 14 | 15 | MinimumOSVersion 16 | 8.0 17 | UIDeviceFamily 18 | 19 | 1 20 | 2 21 | 22 | UILaunchStoryboardName 23 | LaunchScreen 24 | UIRequiredDeviceCapabilities 25 | 26 | armv7 27 | 28 | UISupportedInterfaceOrientations 29 | 30 | UIInterfaceOrientationPortrait 31 | UIInterfaceOrientationLandscapeLeft 32 | UIInterfaceOrientationLandscapeRight 33 | 34 | UISupportedInterfaceOrientations~ipad 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationPortraitUpsideDown 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | XSAppIconAssets 42 | Assets.xcassets/AppIcon.appiconset 43 | CFBundleVersion 44 | 3.0 45 | 46 | 47 | -------------------------------------------------------------------------------- /Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "iphone", 5 | "size": "29x29", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "iphone", 10 | "size": "29x29", 11 | "scale": "2x" 12 | }, 13 | { 14 | "idiom": "iphone", 15 | "size": "29x29", 16 | "scale": "3x" 17 | }, 18 | { 19 | "idiom": "iphone", 20 | "size": "40x40", 21 | "scale": "2x" 22 | }, 23 | { 24 | "idiom": "iphone", 25 | "size": "40x40", 26 | "scale": "3x" 27 | }, 28 | { 29 | "idiom": "iphone", 30 | "size": "57x57", 31 | "scale": "1x" 32 | }, 33 | { 34 | "idiom": "iphone", 35 | "size": "57x57", 36 | "scale": "2x" 37 | }, 38 | { 39 | "idiom": "iphone", 40 | "size": "60x60", 41 | "scale": "2x" 42 | }, 43 | { 44 | "idiom": "iphone", 45 | "size": "60x60", 46 | "scale": "3x" 47 | }, 48 | { 49 | "idiom": "ipad", 50 | "size": "29x29", 51 | "scale": "1x" 52 | }, 53 | { 54 | "idiom": "ipad", 55 | "size": "29x29", 56 | "scale": "2x" 57 | }, 58 | { 59 | "idiom": "ipad", 60 | "size": "40x40", 61 | "scale": "1x" 62 | }, 63 | { 64 | "idiom": "ipad", 65 | "size": "40x40", 66 | "scale": "2x" 67 | }, 68 | { 69 | "idiom": "ipad", 70 | "size": "50x50", 71 | "scale": "1x" 72 | }, 73 | { 74 | "idiom": "ipad", 75 | "size": "50x50", 76 | "scale": "2x" 77 | }, 78 | { 79 | "idiom": "ipad", 80 | "size": "72x72", 81 | "scale": "1x" 82 | }, 83 | { 84 | "idiom": "ipad", 85 | "size": "72x72", 86 | "scale": "2x" 87 | }, 88 | { 89 | "idiom": "ipad", 90 | "size": "76x76", 91 | "scale": "1x" 92 | }, 93 | { 94 | "idiom": "ipad", 95 | "size": "76x76", 96 | "scale": "2x" 97 | }, 98 | { 99 | "size": "24x24", 100 | "idiom": "watch", 101 | "scale": "2x", 102 | "role": "notificationCenter", 103 | "subtype": "38mm" 104 | }, 105 | { 106 | "size": "27.5x27.5", 107 | "idiom": "watch", 108 | "scale": "2x", 109 | "role": "notificationCenter", 110 | "subtype": "42mm" 111 | }, 112 | { 113 | "size": "29x29", 114 | "idiom": "watch", 115 | "role": "companionSettings", 116 | "scale": "2x" 117 | }, 118 | { 119 | "size": "29x29", 120 | "idiom": "watch", 121 | "role": "companionSettings", 122 | "scale": "3x" 123 | }, 124 | { 125 | "size": "40x40", 126 | "idiom": "watch", 127 | "scale": "2x", 128 | "role": "appLauncher", 129 | "subtype": "38mm" 130 | }, 131 | { 132 | "size": "44x44", 133 | "idiom": "watch", 134 | "scale": "2x", 135 | "role": "longLook", 136 | "subtype": "42mm" 137 | }, 138 | { 139 | "size": "86x86", 140 | "idiom": "watch", 141 | "scale": "2x", 142 | "role": "quickLook", 143 | "subtype": "38mm" 144 | }, 145 | { 146 | "size": "98x98", 147 | "idiom": "watch", 148 | "scale": "2x", 149 | "role": "quickLook", 150 | "subtype": "42mm" 151 | } 152 | ], 153 | "info": { 154 | "version": 1, 155 | "author": "xcode" 156 | } 157 | } -------------------------------------------------------------------------------- /VersionTrackingSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {7CD351E0-E69F-4656-A07C-7B271C166E69} 7 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | true 9 | Library 10 | VersionTrackingSample 11 | VersionTrackingSample 12 | v4.5 13 | Profile111 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG; 21 | prompt 22 | 4 23 | 24 | 25 | true 26 | bin\Release 27 | prompt 28 | 4 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | packages\Plugin.VersionTracking.1.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.VersionTracking.Abstractions.dll 38 | 39 | 40 | packages\Plugin.VersionTracking.1.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.VersionTracking.dll 41 | 42 | 43 | packages\Xamarin.Forms.2.3.4.224\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll 44 | 45 | 46 | packages\Xamarin.Forms.2.3.4.224\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll 47 | 48 | 49 | packages\Xamarin.Forms.2.3.4.224\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /VersionTrackingSample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionTrackingSample", "VersionTrackingSample.csproj", "{7CD351E0-E69F-4656-A07C-7B271C166E69}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionTrackingSample.iOS", "iOS\VersionTrackingSample.iOS.csproj", "{DF81C334-EE5A-4493-88CA-429B31AFFABE}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionTrackingSample.Droid", "Droid\VersionTrackingSample.Droid.csproj", "{653FD9C0-F66E-4DC8-B318-72E8795B0BB3}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 15 | Release|iPhone = Release|iPhone 16 | Release|iPhoneSimulator = Release|iPhoneSimulator 17 | Debug|iPhone = Debug|iPhone 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 25 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 26 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|iPhone.ActiveCfg = Release|Any CPU 27 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|iPhone.Build.0 = Release|Any CPU 28 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 29 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 30 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|iPhone.ActiveCfg = Debug|Any CPU 31 | {7CD351E0-E69F-4656-A07C-7B271C166E69}.Debug|iPhone.Build.0 = Debug|Any CPU 32 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 33 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 34 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|Any CPU.ActiveCfg = Release|iPhone 35 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|Any CPU.Build.0 = Release|iPhone 36 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 37 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 38 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|iPhone.ActiveCfg = Release|iPhone 39 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|iPhone.Build.0 = Release|iPhone 40 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 41 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 42 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|iPhone.ActiveCfg = Debug|iPhone 43 | {DF81C334-EE5A-4493-88CA-429B31AFFABE}.Debug|iPhone.Build.0 = Debug|iPhone 44 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 49 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 50 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|iPhone.ActiveCfg = Release|Any CPU 51 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|iPhone.Build.0 = Release|Any CPU 52 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 53 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 54 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|iPhone.ActiveCfg = Debug|Any CPU 55 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3}.Debug|iPhone.Build.0 = Debug|Any CPU 56 | EndGlobalSection 57 | EndGlobal 58 | -------------------------------------------------------------------------------- /VersionsPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Plugin.VersionTracking; 3 | using Xamarin.Forms; 4 | 5 | namespace VersionTrackingSample 6 | { 7 | public class VersionsPage : ContentPage 8 | { 9 | public VersionsPage() 10 | { 11 | var versionTracker = CrossVersionTracking.Current; 12 | var grid = new Grid 13 | { 14 | ColumnDefinitions = 15 | { 16 | new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star)}, 17 | new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star)} 18 | }, 19 | RowDefinitions = 20 | { 21 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)}, // First launch 22 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)}, // Titles 23 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)}, // Current 24 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)}, // First 25 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)}, // History titles 26 | new RowDefinition { Height = new GridLength(1, GridUnitType.Auto)} // History 27 | } 28 | }; 29 | 30 | Title = "Version tracking"; 31 | 32 | // First launch 33 | var installsLabel = new Label { Style = HeaderStyle }; 34 | installsLabel.Text = versionTracker.IsFirstLaunchEver ? 35 | "First launch ever!" : 36 | "Meh."; 37 | Grid.SetColumnSpan(installsLabel, 2); 38 | grid.Children.Add(installsLabel); 39 | 40 | // Titles 41 | var versionsTitleLabel = new Label { Style = HeaderStyle, Text = "Versions" }; 42 | Grid.SetColumn(versionsTitleLabel, 0); 43 | Grid.SetRow(versionsTitleLabel, 1); 44 | grid.Children.Add(versionsTitleLabel); 45 | 46 | var buildsTitleLabel = new Label { Style = HeaderStyle, Text = "Builds", }; 47 | Grid.SetColumn(buildsTitleLabel, 1); 48 | Grid.SetRow(buildsTitleLabel, 1); 49 | grid.Children.Add(buildsTitleLabel); 50 | 51 | // Current 52 | var labelCurrentVersion = new Label() 53 | { 54 | Text = $"Current {versionTracker.CurrentVersion}" + (versionTracker.IsFirstLaunchForVersion ? "(first launch)" : "") 55 | }; 56 | Grid.SetColumn(labelCurrentVersion, 0); 57 | Grid.SetRow(labelCurrentVersion, 2); 58 | grid.Children.Add(labelCurrentVersion); 59 | 60 | var labelCurrentBuild = new Label() 61 | { 62 | Text = $"Current: {versionTracker.CurrentBuild}" + (versionTracker.IsFirstLaunchForBuild ? "(first launch)" : "") 63 | }; 64 | Grid.SetColumn(labelCurrentBuild, 1); 65 | Grid.SetRow(labelCurrentBuild, 2); 66 | grid.Children.Add(labelCurrentBuild); 67 | 68 | // First 69 | var labelFirstVersion = new Label() 70 | { 71 | Text = $"First: {versionTracker.FirstInstalledVersion}" 72 | }; 73 | Grid.SetColumn(labelFirstVersion, 0); 74 | Grid.SetRow(labelFirstVersion, 3); 75 | grid.Children.Add(labelFirstVersion); 76 | 77 | var labelFirstBuild = new Label() 78 | { 79 | Text = $"First: {versionTracker.FirstInstalledBuild}" 80 | }; 81 | Grid.SetColumn(labelFirstBuild, 1); 82 | Grid.SetRow(labelFirstBuild, 3); 83 | grid.Children.Add(labelFirstBuild); 84 | 85 | // History titles 86 | var versionHistoryTitle = new Label { Text = "History" }; 87 | Grid.SetColumn(versionHistoryTitle, 0); 88 | Grid.SetRow(versionHistoryTitle, 4); 89 | grid.Children.Add(versionHistoryTitle); 90 | 91 | var buildHistoryTitle = new Label { Text = "History" }; 92 | Grid.SetColumn(buildHistoryTitle, 1); 93 | Grid.SetRow(buildHistoryTitle, 4); 94 | grid.Children.Add(buildHistoryTitle); 95 | 96 | // History 97 | var versionList = new ListView(); 98 | versionList.ItemsSource = versionTracker.VersionHistory; 99 | Grid.SetColumn(versionList, 0); 100 | Grid.SetRow(versionList, 5); 101 | grid.Children.Add(versionList); 102 | 103 | var buildList = new ListView(); 104 | buildList.ItemsSource = versionTracker.BuildHistory; 105 | Grid.SetColumn(buildList, 1); 106 | Grid.SetRow(buildList, 5); 107 | grid.Children.Add(buildList); 108 | 109 | Content = grid; 110 | } 111 | 112 | static Style HeaderStyle = new Style(typeof(Label)) 113 | { 114 | Setters = { 115 | new Setter { Property = Label.FontAttributesProperty, Value = FontAttributes.Bold }, 116 | new Setter { Property = Label.MarginProperty, Value = 5 }, 117 | new Setter { Property = Label.FontSizeProperty, Value = Device.GetNamedSize(NamedSize.Large, typeof(Label)) }, 118 | new Setter { Property = Label.HorizontalTextAlignmentProperty, Value = TextAlignment.Center } 119 | } 120 | }; 121 | 122 | } 123 | } 124 | 125 | 126 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | *.VC.VC.opendb 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | # TODO: Comment the next line if you want to checkin your web deploy settings 144 | # but database connection strings (with potential passwords) will be unencrypted 145 | *.pubxml 146 | *.publishproj 147 | 148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 149 | # checkin your Azure Web App publish settings, but sensitive information contained 150 | # in these scripts will be unencrypted 151 | PublishScripts/ 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Windows Store app package directories and files 174 | AppPackages/ 175 | BundleArtifacts/ 176 | Package.StoreAssociation.xml 177 | _pkginfo.txt 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | ~$* 188 | *~ 189 | *.dbmdl 190 | *.dbproj.schemaview 191 | *.pfx 192 | *.publishsettings 193 | node_modules/ 194 | orleans.codegen.cs 195 | 196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 198 | #bower_components/ 199 | 200 | # RIA/Silverlight projects 201 | Generated_Code/ 202 | 203 | # Backup & report files from converting an old project file 204 | # to a newer Visual Studio version. Backup files are not needed, 205 | # because we have git ;-) 206 | _UpgradeReport_Files/ 207 | Backup*/ 208 | UpgradeLog*.XML 209 | UpgradeLog*.htm 210 | 211 | # SQL Server files 212 | *.mdf 213 | *.ldf 214 | 215 | # Business Intelligence projects 216 | *.rdl.data 217 | *.bim.layout 218 | *.bim_*.settings 219 | 220 | # Microsoft Fakes 221 | FakesAssemblies/ 222 | 223 | # GhostDoc plugin setting file 224 | *.GhostDoc.xml 225 | 226 | # Node.js Tools for Visual Studio 227 | .ntvs_analysis.dat 228 | 229 | # Visual Studio 6 build log 230 | *.plg 231 | 232 | # Visual Studio 6 workspace options file 233 | *.opt 234 | 235 | # Visual Studio LightSwitch build output 236 | **/*.HTMLClient/GeneratedArtifacts 237 | **/*.DesktopClient/GeneratedArtifacts 238 | **/*.DesktopClient/ModelManifest.xml 239 | **/*.Server/GeneratedArtifacts 240 | **/*.Server/ModelManifest.xml 241 | _Pvt_Extensions 242 | 243 | # Paket dependency manager 244 | .paket/paket.exe 245 | paket-files/ 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # JetBrains Rider 251 | .idea/ 252 | *.sln.iml 253 | -------------------------------------------------------------------------------- /iOS/VersionTrackingSample.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | {DF81C334-EE5A-4493-88CA-429B31AFFABE} 7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Exe 9 | VersionTrackingSample.iOS 10 | VersionTrackingSample.iOS 11 | Resources 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\iPhoneSimulator\Debug 18 | DEBUG;ENABLE_TEST_CLOUD; 19 | prompt 20 | 4 21 | iPhone Developer 22 | true 23 | true 24 | true 25 | true 26 | true 27 | 25046 28 | None 29 | i386, x86_64 30 | HttpClientHandler 31 | x86 32 | 33 | 34 | pdbonly 35 | true 36 | bin\iPhone\Release 37 | prompt 38 | 4 39 | iPhone Developer 40 | true 41 | Entitlements.plist 42 | SdkOnly 43 | ARMv7, ARM64 44 | HttpClientHandler 45 | x86 46 | 47 | 48 | pdbonly 49 | true 50 | bin\iPhoneSimulator\Release 51 | prompt 52 | 4 53 | iPhone Developer 54 | true 55 | true 56 | None 57 | i386, x86_64 58 | HttpClientHandler 59 | x86 60 | 61 | 62 | true 63 | full 64 | false 65 | bin\iPhone\Debug 66 | DEBUG;ENABLE_TEST_CLOUD; 67 | prompt 68 | 4 69 | iPhone Developer 70 | true 71 | true 72 | true 73 | true 74 | true 75 | true 76 | Entitlements.plist 77 | SdkOnly 78 | ARMv7, ARM64 79 | HttpClientHandler 80 | x86 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | ..\packages\Plugin.VersionTracking.1.0.1\lib\Xamarin.iOS10\Plugin.VersionTracking.Abstractions.dll 89 | 90 | 91 | ..\packages\Plugin.VersionTracking.1.0.1\lib\Xamarin.iOS10\Plugin.VersionTracking.dll 92 | 93 | 94 | ..\packages\Xamarin.Forms.2.3.4.224\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 95 | 96 | 97 | ..\packages\Xamarin.Forms.2.3.4.224\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 98 | 99 | 100 | ..\packages\Xamarin.Forms.2.3.4.224\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 101 | 102 | 103 | ..\packages\Xamarin.Forms.2.3.4.224\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 104 | 105 | 106 | 107 | 108 | {7CD351E0-E69F-4656-A07C-7B271C166E69} 109 | VersionTrackingSample 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /Droid/VersionTrackingSample.Droid.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {653FD9C0-F66E-4DC8-B318-72E8795B0BB3} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Library 9 | VersionTrackingSample.Droid 10 | VersionTrackingSample.Droid 11 | v7.0 12 | True 13 | Resources\Resource.designer.cs 14 | Resource 15 | Properties\AndroidManifest.xml 16 | Resources 17 | Assets 18 | true 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug 25 | DEBUG; 26 | prompt 27 | 4 28 | None 29 | 30 | 31 | true 32 | pdbonly 33 | true 34 | bin\Release 35 | prompt 36 | 4 37 | true 38 | false 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll 47 | 48 | 49 | ..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll 50 | 51 | 52 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll 53 | 54 | 55 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll 56 | 57 | 58 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll 59 | 60 | 61 | ..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll 62 | 63 | 64 | ..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll 65 | 66 | 67 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll 68 | 69 | 70 | ..\packages\Plugin.VersionTracking.1.0.1\lib\MonoAndroid10\Plugin.VersionTracking.Abstractions.dll 71 | 72 | 73 | ..\packages\Plugin.VersionTracking.1.0.1\lib\MonoAndroid10\Plugin.VersionTracking.dll 74 | 75 | 76 | ..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\FormsViewGroup.dll 77 | 78 | 79 | ..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\Xamarin.Forms.Core.dll 80 | 81 | 82 | ..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 83 | 84 | 85 | ..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 86 | 87 | 88 | ..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 89 | 90 | 91 | 92 | 93 | {7CD351E0-E69F-4656-A07C-7B271C166E69} 94 | VersionTrackingSample 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | --------------------------------------------------------------------------------