diff --git a/.gitignore b/.gitignore index cb8ae0f..15863ca 100644 --- a/.gitignore +++ b/.gitignore @@ -199,4 +199,6 @@ FakesAssemblies/ *.plg # Visual Studio 6 workspace options file -*.opt \ No newline at end of file +*.opt + +.fake diff --git a/FakeDemo/.nuget/NuGet.exe b/FakeDemo/.nuget/NuGet.exe new file mode 100755 index 0000000..c41a0d0 Binary files /dev/null and b/FakeDemo/.nuget/NuGet.exe differ diff --git a/FakeDemo/App.cs b/FakeDemo/App.cs new file mode 100644 index 0000000..a987928 --- /dev/null +++ b/FakeDemo/App.cs @@ -0,0 +1,28 @@ +using Xamarin.Forms; + +namespace FakeDemo +{ + public class App : Application + { + public App() + { + // The root page of your application + MainPage = new MainPage(); + } + + protected override void OnStart() + { + // Handle when your app starts + } + + protected override void OnSleep() + { + // Handle when your app sleeps + } + + protected override void OnResume() + { + // Handle when your app resumes + } + } +} diff --git a/FakeDemo/Droid/Assets/AboutAssets.txt b/FakeDemo/Droid/Assets/AboutAssets.txt new file mode 100644 index 0000000..a9b0638 --- /dev/null +++ b/FakeDemo/Droid/Assets/AboutAssets.txt @@ -0,0 +1,19 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/FakeDemo/Droid/FakeDemo.Droid.csproj b/FakeDemo/Droid/FakeDemo.Droid.csproj new file mode 100644 index 0000000..876027a --- /dev/null +++ b/FakeDemo/Droid/FakeDemo.Droid.csproj @@ -0,0 +1,93 @@ + + + + Debug + AnyCPU + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669} + Library + FakeDemo.Droid + Assets + Resources + Properties\AndroidManifest.xml + Resource + Resources\Resource.designer.cs + True + True + FakeDemo.Droid + v5.1 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + None + false + + + full + true + bin\Release + prompt + 4 + false + false + + + + + + + + ..\packages\Xamarin.Android.Support.v4.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\FormsViewGroup.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + + + + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E} + FakeDemo + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FakeDemo/Droid/MainActivity.cs b/FakeDemo/Droid/MainActivity.cs new file mode 100644 index 0000000..4720b38 --- /dev/null +++ b/FakeDemo/Droid/MainActivity.cs @@ -0,0 +1,26 @@ +using System; + +using Android.App; +using Android.Content; +using Android.Content.PM; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Android.OS; + +namespace FakeDemo.Droid +{ + [Activity(Label = "FakeDemo.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] + public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity + { + protected override void OnCreate(Bundle bundle) + { + base.OnCreate(bundle); + + global::Xamarin.Forms.Forms.Init(this, bundle); + + LoadApplication(new App()); + } + } +} + diff --git a/FakeDemo/Droid/Properties/AndroidManifest.xml b/FakeDemo/Droid/Properties/AndroidManifest.xml new file mode 100644 index 0000000..ac01f84 --- /dev/null +++ b/FakeDemo/Droid/Properties/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/FakeDemo/Droid/Properties/AssemblyInfo.cs b/FakeDemo/Droid/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..180caf8 --- /dev/null +++ b/FakeDemo/Droid/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using Android.App; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("FakeDemo.Droid")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("jonwood")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/FakeDemo/Droid/Resources/AboutResources.txt b/FakeDemo/Droid/Resources/AboutResources.txt new file mode 100644 index 0000000..10f52d4 --- /dev/null +++ b/FakeDemo/Droid/Resources/AboutResources.txt @@ -0,0 +1,44 @@ +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the "Resources" directory of the application: + +Resources/ + drawable/ + icon.png + + layout/ + main.axml + + values/ + strings.xml + +In order to get the build system to recognize Android resources, set the build action to +"AndroidResource". The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/FakeDemo/Droid/Resources/Resource.designer.cs b/FakeDemo/Droid/Resources/Resource.designer.cs new file mode 100644 index 0000000..c2ec09e --- /dev/null +++ b/FakeDemo/Droid/Resources/Resource.designer.cs @@ -0,0 +1,61 @@ +#pragma warning disable 1591 +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.17020 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +[assembly: Android.Runtime.ResourceDesignerAttribute("FakeDemo.Droid.Resource", IsApplication=true)] + +namespace FakeDemo.Droid +{ + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] + public partial class Resource + { + + static Resource() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + public static void UpdateIdValues() + { + } + + public partial class Attribute + { + + static Attribute() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Attribute() + { + } + } + + public partial class Drawable + { + + // aapt resource value: 0x7f020000 + public const int icon = 2130837504; + + static Drawable() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Drawable() + { + } + } + } +} +#pragma warning restore 1591 diff --git a/FakeDemo/Droid/Resources/drawable-hdpi/icon.png b/FakeDemo/Droid/Resources/drawable-hdpi/icon.png new file mode 100644 index 0000000..964f110 Binary files /dev/null and b/FakeDemo/Droid/Resources/drawable-hdpi/icon.png differ diff --git a/FakeDemo/Droid/Resources/drawable-xhdpi/icon.png b/FakeDemo/Droid/Resources/drawable-xhdpi/icon.png new file mode 100644 index 0000000..3c01e60 Binary files /dev/null and b/FakeDemo/Droid/Resources/drawable-xhdpi/icon.png differ diff --git a/FakeDemo/Droid/Resources/drawable-xxhdpi/icon.png b/FakeDemo/Droid/Resources/drawable-xxhdpi/icon.png new file mode 100644 index 0000000..0d8c1c5 Binary files /dev/null and b/FakeDemo/Droid/Resources/drawable-xxhdpi/icon.png differ diff --git a/FakeDemo/Droid/Resources/drawable/icon.png b/FakeDemo/Droid/Resources/drawable/icon.png new file mode 100644 index 0000000..b0ba715 Binary files /dev/null and b/FakeDemo/Droid/Resources/drawable/icon.png differ diff --git a/FakeDemo/Droid/packages.config b/FakeDemo/Droid/packages.config new file mode 100644 index 0000000..a8cf6f0 --- /dev/null +++ b/FakeDemo/Droid/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/FakeDemo/FakeDemo.csproj b/FakeDemo/FakeDemo.csproj new file mode 100644 index 0000000..4ebd1aa --- /dev/null +++ b/FakeDemo/FakeDemo.csproj @@ -0,0 +1,60 @@ + + + + Debug + AnyCPU + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E} + Library + FakeDemo + FakeDemo + v4.5 + Profile78 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + MainPage.xaml + + + + + + + packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll + + + packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + + packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll + + + + + + + + MSBuild:UpdateDesignTimeXaml + + + \ No newline at end of file diff --git a/FakeDemo/FakeDemo.sln b/FakeDemo/FakeDemo.sln new file mode 100644 index 0000000..e726a95 --- /dev/null +++ b/FakeDemo/FakeDemo.sln @@ -0,0 +1,71 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo", "FakeDemo.csproj", "{28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.iOS", "iOS\FakeDemo.iOS.csproj", "{D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.Droid", "Droid\FakeDemo.Droid.csproj", "{12FD5DA4-EDC0-4AA3-BED4-8DC064575669}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.UITests", "UITests\FakeDemo.UITests.csproj", "{559CFEA0-A995-4A1B-8013-B14DB9B9738F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|iPhone.Build.0 = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|Any CPU.Build.0 = Release|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|iPhone.ActiveCfg = Release|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|iPhone.Build.0 = Release|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|iPhone.Build.0 = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|Any CPU.Build.0 = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhone.ActiveCfg = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhone.Build.0 = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|iPhone.Build.0 = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|Any CPU.Build.0 = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|iPhone.ActiveCfg = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|iPhone.Build.0 = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|iPhone.ActiveCfg = Debug|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|iPhone.Build.0 = Debug|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|Any CPU.ActiveCfg = Release|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|Any CPU.Build.0 = Release|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|iPhone.ActiveCfg = Release|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|iPhone.Build.0 = Release|iPhone + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + EndGlobalSection +EndGlobal diff --git a/FakeDemo/MainPage.xaml b/FakeDemo/MainPage.xaml new file mode 100644 index 0000000..e965be3 --- /dev/null +++ b/FakeDemo/MainPage.xaml @@ -0,0 +1,8 @@ + + + + diff --git a/FakeDemo/MainPage.xaml.cs b/FakeDemo/MainPage.xaml.cs new file mode 100644 index 0000000..004ac86 --- /dev/null +++ b/FakeDemo/MainPage.xaml.cs @@ -0,0 +1,12 @@ +using Xamarin.Forms; + +namespace FakeDemo +{ + public partial class MainPage : ContentPage + { + public MainPage() + { + InitializeComponent(); + } + } +} diff --git a/FakeDemo/Properties/AssemblyInfo.cs b/FakeDemo/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4f757c1 --- /dev/null +++ b/FakeDemo/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("FakeDemo")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("jonwood")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/FakeDemo/UITests/AppInitializer.cs b/FakeDemo/UITests/AppInitializer.cs new file mode 100644 index 0000000..7983a89 --- /dev/null +++ b/FakeDemo/UITests/AppInitializer.cs @@ -0,0 +1,22 @@ +using System; +using System.IO; +using System.Linq; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace FakeDemo.UITests +{ + public class AppInitializer + { + public static IApp StartApp(Platform platform) + { + if (platform == Platform.Android) + { + return ConfigureApp.Android.StartApp(); + } + + return ConfigureApp.iOS.StartApp(); + } + } +} + diff --git a/FakeDemo/UITests/FakeDemo.UITests.csproj b/FakeDemo/UITests/FakeDemo.UITests.csproj new file mode 100644 index 0000000..759fe5f --- /dev/null +++ b/FakeDemo/UITests/FakeDemo.UITests.csproj @@ -0,0 +1,61 @@ + + + + Debug + AnyCPU + {559CFEA0-A995-4A1B-8013-B14DB9B9738F} + Library + FakeDemo.UITests + FakeDemo.UITests + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + ..\packages\Xamarin.UITest.1.0.0\lib\Xamarin.UITest.dll + + + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + + + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7} + FakeDemo.iOS + False + False + + + {12FD5DA4-EDC0-4AA3-BED4-8DC064575669} + FakeDemo.Droid + False + False + + + + + + + + + + + \ No newline at end of file diff --git a/FakeDemo/UITests/Tests.cs b/FakeDemo/UITests/Tests.cs new file mode 100644 index 0000000..4358dc3 --- /dev/null +++ b/FakeDemo/UITests/Tests.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using System.Linq; +using NUnit.Framework; +using Xamarin.UITest; +using Xamarin.UITest.Queries; + +namespace FakeDemo.UITests +{ + [TestFixture(Platform.Android)] + [TestFixture(Platform.iOS)] + public class Tests + { + IApp app; + Platform platform; + + public Tests(Platform platform) + { + this.platform = platform; + } + + [SetUp] + public void BeforeEachTest() + { + app = AppInitializer.StartApp(platform); + } + + [Test] + public void WelcomeTextIsDisplayed() + { + AppResult[] results = app.WaitForElement(c => c.Marked("Welcome to Xamarin Forms!")); + app.Screenshot("Welcome screen."); + + Assert.IsTrue(results.Any()); + } + } +} + diff --git a/FakeDemo/UITests/packages.config b/FakeDemo/UITests/packages.config new file mode 100644 index 0000000..4962ca5 --- /dev/null +++ b/FakeDemo/UITests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/FakeDemo/build.fsx b/FakeDemo/build.fsx new file mode 100644 index 0000000..22989ec --- /dev/null +++ b/FakeDemo/build.fsx @@ -0,0 +1,15 @@ +#r "packages/FAKE/tools/FakeLib.dll" // 1 +open Fake // 2 + +Target "Test" (fun _ -> // 3 + trace "Testing stuff..." +) + +Target "Build" (fun _ -> + trace "Heavy build action" +) + +"Build" // 4 + ==> "Test" + +Run "Test" // 5 \ No newline at end of file diff --git a/FakeDemo/build.sh b/FakeDemo/build.sh new file mode 100755 index 0000000..e4a06cb --- /dev/null +++ b/FakeDemo/build.sh @@ -0,0 +1,5 @@ +if [ ! -f packages/FAKE/tools/FAKE.exe ]; then + mono .nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion -Prerelease +fi + +mono packages/FAKE/tools/FAKE.exe build.fsx $@ \ No newline at end of file diff --git a/FakeDemo/iOS/AppDelegate.cs b/FakeDemo/iOS/AppDelegate.cs new file mode 100644 index 0000000..a9f911e --- /dev/null +++ b/FakeDemo/iOS/AppDelegate.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Foundation; +using UIKit; + +namespace FakeDemo.iOS +{ + [Register("AppDelegate")] + public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate + { + public override bool FinishedLaunching(UIApplication app, NSDictionary options) + { + global::Xamarin.Forms.Forms.Init(); + + // Code for starting up the Xamarin Test Cloud Agent + #if ENABLE_TEST_CLOUD + Xamarin.Calabash.Start(); + #endif + + LoadApplication(new App()); + + return base.FinishedLaunching(app, options); + } + } +} + diff --git a/FakeDemo/iOS/Entitlements.plist b/FakeDemo/iOS/Entitlements.plist new file mode 100644 index 0000000..e9a3005 --- /dev/null +++ b/FakeDemo/iOS/Entitlements.plist @@ -0,0 +1,7 @@ + + + + + + + diff --git a/FakeDemo/iOS/FakeDemo.iOS.csproj b/FakeDemo/iOS/FakeDemo.iOS.csproj new file mode 100644 index 0000000..c8f9e04 --- /dev/null +++ b/FakeDemo/iOS/FakeDemo.iOS.csproj @@ -0,0 +1,125 @@ + + + + Debug + iPhoneSimulator + {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {D33D65BB-03FE-4EC3-8EC0-1A851EB86CF7} + Exe + FakeDemo.iOS + Resources + FakeDemo.iOS + + + true + full + false + bin\iPhoneSimulator\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + false + i386 + None + true + true + + + full + true + bin\iPhone\Release + prompt + 4 + Entitlements.plist + ARMv7, ARM64 + false + iPhone Developer + + + full + true + bin\iPhoneSimulator\Release + prompt + 4 + i386 + false + None + + + true + full + false + bin\iPhone\Debug + DEBUG;ENABLE_TEST_CLOUD; + prompt + 4 + false + ARMv7, ARM64 + Entitlements.plist + true + iPhone Developer + true + + + + + + + + ..\packages\Xamarin.TestCloud.Agent.0.16.1\lib\Xamarin.iOS10\Calabash.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + + ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + + + + + {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E} + FakeDemo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FakeDemo/iOS/ITunesArtwork b/FakeDemo/iOS/ITunesArtwork new file mode 100644 index 0000000..d0136ea Binary files /dev/null and b/FakeDemo/iOS/ITunesArtwork differ diff --git a/FakeDemo/iOS/ITunesArtwork@2x b/FakeDemo/iOS/ITunesArtwork@2x new file mode 100644 index 0000000..fa2ebf7 Binary files /dev/null and b/FakeDemo/iOS/ITunesArtwork@2x differ diff --git a/FakeDemo/iOS/Info.plist b/FakeDemo/iOS/Info.plist new file mode 100644 index 0000000..58019d7 --- /dev/null +++ b/FakeDemo/iOS/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDisplayName + FakeDemo + CFBundleIdentifier + com.companyname.fakedemo + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + MinimumOSVersion + 7.0 + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CFBundleIconFiles + + Icon-60@2x + Icon-60@3x + Icon-76 + Icon-76@2x + Default + Default@2x + Default-568h + Default-568h@2x + Default-Landscape + Default-Landscape@2x + Default-Portrait + Default-Portrait@2x + Icon-Small-40 + Icon-Small-40@2x + Icon-Small-40@3x + Icon-Small + Icon-Small@2x + Icon-Small@3x + + UILaunchStoryboardName + LaunchScreen + + + diff --git a/FakeDemo/iOS/Main.cs b/FakeDemo/iOS/Main.cs new file mode 100644 index 0000000..5e1ddfe --- /dev/null +++ b/FakeDemo/iOS/Main.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Foundation; +using UIKit; + +namespace FakeDemo.iOS +{ + 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"); + } + } +} + diff --git a/FakeDemo/iOS/Resources/Default-568h@2x.png b/FakeDemo/iOS/Resources/Default-568h@2x.png new file mode 100644 index 0000000..26c6461 Binary files /dev/null and b/FakeDemo/iOS/Resources/Default-568h@2x.png differ diff --git a/FakeDemo/iOS/Resources/Default-Portrait.png b/FakeDemo/iOS/Resources/Default-Portrait.png new file mode 100644 index 0000000..5d0d1ab Binary files /dev/null and b/FakeDemo/iOS/Resources/Default-Portrait.png differ diff --git a/FakeDemo/iOS/Resources/Default-Portrait@2x.png b/FakeDemo/iOS/Resources/Default-Portrait@2x.png new file mode 100644 index 0000000..0ee2688 Binary files /dev/null and b/FakeDemo/iOS/Resources/Default-Portrait@2x.png differ diff --git a/FakeDemo/iOS/Resources/Default.png b/FakeDemo/iOS/Resources/Default.png new file mode 100644 index 0000000..b74643c Binary files /dev/null and b/FakeDemo/iOS/Resources/Default.png differ diff --git a/FakeDemo/iOS/Resources/Default@2x.png b/FakeDemo/iOS/Resources/Default@2x.png new file mode 100644 index 0000000..dbd6bd3 Binary files /dev/null and b/FakeDemo/iOS/Resources/Default@2x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-60@2x.png b/FakeDemo/iOS/Resources/Icon-60@2x.png new file mode 100644 index 0000000..4b03c42 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-60@2x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-60@3x.png b/FakeDemo/iOS/Resources/Icon-60@3x.png new file mode 100644 index 0000000..b03ca1b Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-60@3x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-76.png b/FakeDemo/iOS/Resources/Icon-76.png new file mode 100644 index 0000000..587982e Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-76.png differ diff --git a/FakeDemo/iOS/Resources/Icon-76@2x.png b/FakeDemo/iOS/Resources/Icon-76@2x.png new file mode 100644 index 0000000..cd4e2c8 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-76@2x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small-40.png b/FakeDemo/iOS/Resources/Icon-Small-40.png new file mode 100644 index 0000000..6acff94 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small-40.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small-40@2x.png b/FakeDemo/iOS/Resources/Icon-Small-40@2x.png new file mode 100644 index 0000000..b833aac Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small-40@2x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small-40@3x.png b/FakeDemo/iOS/Resources/Icon-Small-40@3x.png new file mode 100644 index 0000000..ab8654e Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small-40@3x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small.png b/FakeDemo/iOS/Resources/Icon-Small.png new file mode 100644 index 0000000..33db7e7 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small@2x.png b/FakeDemo/iOS/Resources/Icon-Small@2x.png new file mode 100644 index 0000000..bf45e25 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small@2x.png differ diff --git a/FakeDemo/iOS/Resources/Icon-Small@3x.png b/FakeDemo/iOS/Resources/Icon-Small@3x.png new file mode 100644 index 0000000..7ad3891 Binary files /dev/null and b/FakeDemo/iOS/Resources/Icon-Small@3x.png differ diff --git a/FakeDemo/iOS/Resources/LaunchScreen.storyboard b/FakeDemo/iOS/Resources/LaunchScreen.storyboard new file mode 100644 index 0000000..a639c2f --- /dev/null +++ b/FakeDemo/iOS/Resources/LaunchScreen.storyboard @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FakeDemo/iOS/packages.config b/FakeDemo/iOS/packages.config new file mode 100644 index 0000000..14e9a6b --- /dev/null +++ b/FakeDemo/iOS/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/FakeDemo/packages.config b/FakeDemo/packages.config new file mode 100644 index 0000000..d6824ed --- /dev/null +++ b/FakeDemo/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file