[tests] Add .NET Xamarin.Forms test app.
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace MyXamarinFormsApp.iOS
|
||||
{
|
||||
// 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 : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
|
||||
{
|
||||
global::Xamarin.Forms.Forms.Init ();
|
||||
LoadApplication (new App ());
|
||||
|
||||
return base.FinishedLaunching (app, options);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon60.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon87.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon180.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon20.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon29.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon76.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon152.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon167.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "Icon1024.png"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon1024.png
Normal file
После Ширина: | Высота: | Размер: 69 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon120.png
Normal file
После Ширина: | Высота: | Размер: 3.7 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon152.png
Normal file
После Ширина: | Высота: | Размер: 4.6 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon167.png
Normal file
После Ширина: | Высота: | Размер: 4.6 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon180.png
Normal file
После Ширина: | Высота: | Размер: 5.1 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon20.png
Normal file
После Ширина: | Высота: | Размер: 1.3 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon29.png
Normal file
После Ширина: | Высота: | Размер: 845 B |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon40.png
Normal file
После Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon58.png
Normal file
После Ширина: | Высота: | Размер: 1.7 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon60.png
Normal file
После Ширина: | Высота: | Размер: 2.5 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon76.png
Normal file
После Ширина: | Высота: | Размер: 2.3 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon80.png
Normal file
После Ширина: | Высота: | Размер: 2.4 KiB |
Двоичные данные
tests/dotnet/MyXamarinFormsApp/Assets.xcassets/AppIcon.appiconset/Icon87.png
Normal file
После Ширина: | Высота: | Размер: 2.7 KiB |
|
@ -0,0 +1,23 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup Condition="'$(_PlatformName)' == 'iOS'">
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
<MonoAOT>True</MonoAOT>
|
||||
<UseAppHost>False</UseAppHost>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target
|
||||
Name="FixFormsNuGetAssemblies"
|
||||
AfterTargets="ResolvePackageAssets"
|
||||
Condition="'$(PkgXamarin_Forms)' != '' And '$(_PlatformName)' == 'iOS'">
|
||||
<ItemGroup>
|
||||
<!-- NOTE: the items below are workarounds for $(AssetTargetFallback) usage -->
|
||||
<!-- see: https://github.com/NuGet/docs.microsoft.com-nuget/issues/1955 -->
|
||||
<Reference Include="Xamarin.Forms.Platform.iOS" HintPath="$(PkgXamarin_Forms)\build\XCODE11\Xamarin.Forms.Platform.iOS.dll" />
|
||||
<Reference Include="Xamarin.Forms.Platform" HintPath="$(PkgXamarin_Forms)\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll" />
|
||||
<RuntimeCopyLocalItems Remove="$(PkgXamarin_Forms)\lib\netstandard2.0\Xamarin.Forms.Platform.dll" />
|
||||
<ResolvedCompileFileDefinitions Remove="$(PkgXamarin_Forms)\lib\netstandard2.0\Xamarin.Forms.Platform.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
<?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,38 @@
|
|||
<?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>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</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>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>MyXamarinFormsApp</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.MyXamarinFormsApp</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>MyXamarinFormsApp</string>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace MyXamarinFormsApp.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");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-ios</TargetFramework>
|
||||
<RuntimeIdentifier>ios-x64</RuntimeIdentifier>
|
||||
<OutputType>Exe</OutputType>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);MyXamarinFormsAppNS\**</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="4.5.0.617" GeneratePathProperty="true" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
|
||||
<!-- The linker resolves some assembly references too eagerly, and fails when it can't find them, so work around this by referencing the missing assemblies-->
|
||||
<!-- ref: https://github.com/mono/linker/issues/1139 -->
|
||||
<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.CodeDom" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.2.20160.6" />
|
||||
<PackageReference Include="System.IO.Ports" Version="5.0.0-preview.2.20160.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="MyXamarinFormsAppNS\MyXamarinFormsAppNS.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="MyXamarinFormsApp.App">
|
||||
<Application.Resources>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace MyXamarinFormsApp
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public App ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
using Xamarin.Forms.Xaml;
|
||||
|
||||
[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="MyXamarinFormsApp.MainPage">
|
||||
<StackLayout>
|
||||
<!-- Place new controls here -->
|
||||
<Label Text="Welcome to Xamarin.Forms!" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace MyXamarinFormsApp
|
||||
{
|
||||
// Learn more about making custom code visible in the Xamarin.Forms previewer
|
||||
// by visiting https://aka.ms/xamarinforms-previewer
|
||||
[DesignTimeVisible (false)]
|
||||
public partial class MainPage : ContentPage
|
||||
{
|
||||
public MainPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="4.0.0.540366" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle ("MyXamarinFormsApp.iOS")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("MyXamarinFormsApp.iOS")]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid ("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion ("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("1.0.0.0")]
|
После Ширина: | Высота: | Размер: 8.7 KiB |
После Ширина: | Высота: | Размер: 10 KiB |
После Ширина: | Высота: | Размер: 34 KiB |
После Ширина: | Высота: | Размер: 7.1 KiB |
После Ширина: | Высота: | Размер: 8.2 KiB |
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238" />
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="gAE-YM-kbH">
|
||||
<objects>
|
||||
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43" />
|
||||
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ" />
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600" />
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||
<rect key="frame" x="270" y="270" width="60" height="60" />
|
||||
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0" />
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB" />
|
||||
<constraints>
|
||||
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39" />
|
||||
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41" />
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder" />
|
||||
</objects>
|
||||
<point key="canvasLocation" x="349" y="339" />
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Icon-60.png" width="180" height="180" />
|
||||
</resources>
|
||||
</document>
|