Merge pull request #113 from Clancey/feature/template

Added a QuickStart template for "dotnet new"
This commit is contained in:
jonlipsky 2019-08-26 06:52:03 -07:00 коммит произвёл GitHub
Родитель 0d33fa6215 8a847b1545
Коммит 4ea2b803f3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
40 изменённых файлов: 1216 добавлений и 6 удалений

Просмотреть файл

@ -16,16 +16,16 @@ namespace Comet.iOS.Sample {
get;
set;
}
public override void FinishedLaunching (UIApplication application)
UIWindow window;
public override void FinishedLaunching (UIApplication application)
{
base.FinishedLaunching (application);
}
UIWindow window;
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
#if DEBUG
Comet.Reload.Init();
#endif

Просмотреть файл

@ -98,7 +98,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Comet\Comet.csproj">
<Project>{1817646E-E71E-48CF-80A4-3030EF870D61}</Project>
<Project>{F8F78BA6-F213-4916-8E04-78FE51885C7E}</Project>
<Name>Comet</Name>
</ProjectReference>
</ItemGroup>

Просмотреть файл

@ -0,0 +1,3 @@
{
}

Просмотреть файл

@ -0,0 +1,306 @@
{
"author": "Comet",
"classifications": [
"Comet",
"Mobile"
],
"name": "Comet App",
"groupIdentity": "Comet.App",
"identity": "Comet.App.CSharp",
"shortName": "comet-app",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "NewApp",
"primaryOutputs": [
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\MainPage.cs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\README.md"
},
{
"condition": "CreateiOSProject",
"path": "NewApp.iOS\\NewApp.iOS.csproj"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\NewApp.csproj"
}
],
"defaultName": "App",
"preferNameDirectory": "true",
"guids": [
"99E19497-29A6-4B77-B773-BEC55F9B55DC", // .NET Standard Library
"8D9F8CF0-E178-402D-8D40-A88B7B5F3D42", // Android
"91D74A40-E440-42AD-B51F-C2D641C49384", // iOS
"3EA9E612-E717-4E55-9034-C415CD62AF9A", // UWP
"B19C892E-2628-4CA7-AD27-08D406A3B14B" // UITest
],
"symbols": {
"kind": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "quickstart",
"choices": [
{
"choice": "quickstart",
"description": "Quick Start Comet iOS app"
}
]
},
"AppIdentifier": {
"type": "parameter",
"description": "Overrides the Info.plist's CFBundleIdentifier",
"datatype": "string",
"defaultValue": "com.companyname"
},
"AndroidAppIdentifier": {
"type": "parameter",
"description": "Overrides the package name in the AndroidManifest.xml",
"datatype": "string"
},
"iOSAppIdentifier": {
"type": "parameter",
"description": "Overrides the Info.plist's CFBundleIdentifier",
"datatype": "string"
},
"AndroidAppIdentifierReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "AndroidAppIdentifier",
"fallbackVariableName": "AppIdentifier"
},
"replaces": "com.companyname.NewApp.Android"
},
"iOSAppIdentifierReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "iOSAppIdentifier",
"fallbackVariableName": "AppIdentifier"
},
"replaces": "com.companyname.NewApp.iOS"
},
"WindowsSdk": {
"type": "parameter",
"description": "Windows SDK Target Version. Minimum Version is Fall Creator's Update (10.0.16278).",
"dataType": "string",
"replaces": "WindowsSdk"
},
"AndroidSDKVersion": {
"type": "parameter",
"datatype": "string",
"replaces": "AndroidSDKVersion",
"defaultValue": "v9.0"
},
"TargetAndroidAPI": {
"type": "parameter",
"datatype": "string",
"replaces": "TargetAndroidAPI",
"defaultValue": "28"
},
"MinAndroidAPI": {
"type": "parameter",
"datatype": "int",
"replaces": "MinAndroidAPI",
"defaultValue": "21"
},
"SupportLibVersion": {
"type": "parameter",
"datatype": "string",
"replaces": "SupportLibVersion",
"defaultValue": "28.0.0.1"
},
"IncludeXamarinEssentials": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"XamarinEssentialsSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "XamarinEssentialsSdk",
"defaultValue": "1.3.0-pre"
},
"CometSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "CometSdk",
"defaultValue": "0.1.7364-beta"
},
"CometReloadSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "CometReloadSdk",
"defaultValue": "0.0.9-alpha"
},
"ProjectID": {
"type": "generated",
"generator": "guid",
"replaces": "Project_ID"
},
"UserID": {
"type": "generated",
"generator": "guid",
"replaces": "User_ID"
},
"IISPort": {
"type": "generated",
"generator": "port",
"replaces": "IISPortNum"
},
"SSLPort": {
"type": "generated",
"generator": "port",
"replaces": "SSLPortNum"
},
// Project Symbols
"CreateSharedProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateiOSProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateMacProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateAndroidProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateUWPProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateBackendProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateUITestProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"OpenXaml": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"OpenXamlCs": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"LibraryProjectName": {
"type": "parameter",
"dataType": "string",
"replaces": "LibraryProjectName"
}
},
"postActions": [
{
"condition": "OpenMainCs",
"description": "Opens MainPage.cs in the editor.",
"manualInstructions": [],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
},
{
"condition": "OpenReadme",
"description": "Opens README.md in the editor.",
"manualInstructions": [],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
],
"sources": [
{
"modifiers": [
{
"condition": "(!CreateSharedProject)",
"exclude": "NewApp/**/*"
},
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp.iOS/**/*"
]
},
{
"condition": "(!CreateAndroidProject)",
"exclude": [
"NewApp.Android/**/*"
]
},
{
"condition": "(!CreateUWPProject)",
"exclude": [
"NewApp.UWP/**/*"
]
},
{
"condition": "(!CreateMacProject)",
"exclude": [
"NewApp.macOS/**/*"
]
}
]
},
{
"source": "../quickstart/",
"condition": "(kind == \"quickstart\")",
"modifiers": [
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp/NewApp.csproj"
]
},
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp.iOS/**/*"
]
},
{
"condition": "(!CreateAndroidProject)",
"exclude": [
"NewApp.Android/**/*"
]
},
{
"condition": "(!CreateUWPProject)",
"exclude": [
"NewApp.UWP/**/*"
]
},
{
"condition": "(!CreateMacProject)",
"exclude": [
"NewApp.macOS/**/*"
]
}
]
}
]
}

Просмотреть файл

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Comet.Templates.Multiplatform</id>
<title>Comet Template Pack</title>
<version>0.0.1</version>
<authors>James Clancey</authors>
<description>Templates for building iOS apps with Comet.</description>
<projectUrl>https://github.com/Clancey/Comet</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<iconUrl>https://xamarin.com/content/images/nuget/xamarin.png</iconUrl>
<copyright>Copyright 2019</copyright>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>

119
templates/install.sh Executable file
Просмотреть файл

@ -0,0 +1,119 @@
# /bin/bash
# install.sh
install=false
reset=false
package=false
reset_package() {
echo "===Reset Installed Template==="
echo ""
dotnet new --debug:reinit > /dev/null
echo "Removed user-defined templates."
echo ""
}
make_package() {
echo "===Packaging Templates==="
echo ""
nuget pack comet-templates.nuspec > /dev/null
echo "Succesfully packaged templates."
echo ""
}
install_package() {
echo "===Installing Templates==="
echo ""
echo ""
dotnet new --install $root/Comet.Templates.*.nupkg > /dev/null
echo ""
echo "Successfully installed templates."
echo ""
}
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-r|--reset)
reset=true
;;
-i|--install)
;;
-h|--help)
echo "Options:"
echo " -r|--reset Removes all user-defined templates."
echo " -i|--install Install all user-defined templates."
echo " -p|--package Package the user-defined templates in a nupkg."
echo " -h|--help Display all commands."
exit 0
;;
*)
break
;;
esac
shift
done
if [ "$install" = false ] && [ "$reset" = false ] && [ "$package" = false ]; then
install=true
reset=true
package=true
fi
echo ""
echo "===Prerequisites==="
if [ "$OSTYPE" = "OSX" ]; then
if [ ! -d /usr/local/share/dotnet/sdk ]; then
echo "Hold up..."
echo " dotnet isn't installed, you must install dotnet core to use dotnet new command."
echo " Go do that and try again."
exit 0
fi
echo ""
echo "Found dotnet cli at /usr/local/share/dotnet."
echo ""
elif [ "$OSTYPE" = "WINDOWS" ]; then
if [ ! -d "C:\Program Files\dotnet\sdk" ]; then
echo "Hold up..."
echo " dotnet isn't installed, you must install dotnet core to use dotnet new command."
echo " Go do that and try again."
exit 0
fi
echo ""
echo "Found dotnet cli at C:\Program Files\dotnet\sdk."
echo ""
fi
root=$PWD
# --reset
if [ "$reset" = true ]; then
reset_package
fi
# --package
if [ "$package" = true ]; then
make_package
fi
# --install
if [ "$install" = true ]; then
install_package
fi

Двоичные данные
templates/nuget.exe Normal file

Двоичный файл не отображается.

24
templates/quickstart/.vscode/launch.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "build",
"name": "Launch",
"type": "comet",
"request": "launch",
"program": "${workspaceRoot}/ignored",
"cwd": "${workspaceRoot}",
// "debugServer": 4711
},
{
"name": "Attach",
"type": "comet",
"request": "attach",
"address": "localhost",
"port": 55555
}
]
}

15
templates/quickstart/.vscode/tasks.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "comet",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

Просмотреть файл

@ -0,0 +1,76 @@
using Comet.iOS;
using Foundation;
using UIKit;
namespace NewApp.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 class AppDelegate : UIApplicationDelegate
{
// class-level declarations
public override UIWindow Window
{
get;
set;
}
UIWindow window;
public override void FinishedLaunching(UIApplication application)
{
base.FinishedLaunching(application);
}
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
//-:cnd:noEmit
#if DEBUG
Comet.Reload.Init();
#endif
//+:cnd:noEmit
window = new UIWindow
{
RootViewController = new MainPage().ToViewController()
};
window.MakeKeyAndVisible();
return true;
}
public override void OnResignActivation(UIApplication application)
{
// Invoked when the application is about to move from active to inactive state.
// This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
// or when the user quits the application and it begins the transition to the background state.
// Games should use this method to pause the game.
}
public override void DidEnterBackground(UIApplication application)
{
// Use this method to release shared resources, save user data, invalidate timers and store the application state.
// If your application supports background execution this method is called instead of WillTerminate when the user quits.
}
public override void WillEnterForeground(UIApplication application)
{
// Called as part of the transition from background to active state.
// Here you can undo many of the changes made on entering the background.
}
public override void OnActivated(UIApplication application)
{
// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
}
public override void WillTerminate(UIApplication application)
{
// Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
}
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 408 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 28 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 22 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 25 KiB

Просмотреть файл

@ -0,0 +1,246 @@
{
"images": [
{
"filename": "AppIcon-20@2x.png",
"size": "20x20",
"scale": "2x",
"idiom": "iphone"
},
{
"filename": "AppIcon-20@3x.png",
"size": "20x20",
"scale": "3x",
"idiom": "iphone"
},
{
"filename": "AppIcon-29@2x.png",
"size": "29x29",
"scale": "2x",
"idiom": "iphone"
},
{
"filename": "AppIcon-29@3x.png",
"size": "29x29",
"scale": "3x",
"idiom": "iphone"
},
{
"filename": "AppIcon-40@2x.png",
"size": "40x40",
"scale": "2x",
"idiom": "iphone"
},
{
"filename": "AppIcon-40@3x.png",
"size": "40x40",
"scale": "3x",
"idiom": "iphone"
},
{
"filename": "AppIcon-60@2x.png",
"size": "60x60",
"scale": "2x",
"idiom": "iphone"
},
{
"filename": "AppIcon-60@3x.png",
"size": "60x60",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "20x20",
"scale": "1x",
"idiom": "ipad"
},
{
"filename": "AppIcon-20@2x-2.png",
"size": "20x20",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "29x29",
"scale": "1x",
"idiom": "ipad"
},
{
"filename": "AppIcon-29@2x-1.png",
"size": "29x29",
"scale": "2x",
"idiom": "ipad"
},
{
"filename": "AppIcon-20@2x-1.png",
"size": "40x40",
"scale": "1x",
"idiom": "ipad"
},
{
"filename": "AppIcon-40@2x-1.png",
"size": "40x40",
"scale": "2x",
"idiom": "ipad"
},
{
"filename": "AppIcon-83.5@2x.png",
"size": "83.5x83.5",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "76x76",
"scale": "1x",
"idiom": "ipad"
},
{
"filename": "AppIcon-76@2x.png",
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
},
{
"filename": "AppIcon-1024@1x.png",
"size": "1024x1024",
"scale": "1x",
"idiom": "ios-marketing"
},
{
"size": "60x60",
"scale": "2x",
"idiom": "car"
},
{
"size": "60x60",
"scale": "3x",
"idiom": "car"
},
{
"role": "notificationCenter",
"size": "24x24",
"subtype": "38mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "notificationCenter",
"size": "27.5x27.5",
"subtype": "42mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "companionSettings",
"size": "29x29",
"scale": "2x",
"idiom": "watch"
},
{
"role": "companionSettings",
"size": "29x29",
"scale": "3x",
"idiom": "watch"
},
{
"role": "appLauncher",
"size": "40x40",
"subtype": "38mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "appLauncher",
"size": "44x44",
"subtype": "40mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "appLauncher",
"size": "50x50",
"subtype": "44mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "quickLook",
"size": "86x86",
"subtype": "38mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "quickLook",
"size": "98x98",
"subtype": "42mm",
"scale": "2x",
"idiom": "watch"
},
{
"role": "quickLook",
"size": "108x108",
"subtype": "44mm",
"scale": "2x",
"idiom": "watch"
},
{
"size": "1024x1024",
"scale": "1x",
"idiom": "watch-marketing"
},
{
"size": "16x16",
"scale": "1x",
"idiom": "mac"
},
{
"size": "16x16",
"scale": "2x",
"idiom": "mac"
},
{
"size": "32x32",
"scale": "1x",
"idiom": "mac"
},
{
"size": "32x32",
"scale": "2x",
"idiom": "mac"
},
{
"size": "128x128",
"scale": "1x",
"idiom": "mac"
},
{
"size": "128x128",
"scale": "2x",
"idiom": "mac"
},
{
"size": "256x256",
"scale": "1x",
"idiom": "mac"
},
{
"size": "256x256",
"scale": "2x",
"idiom": "mac"
},
{
"size": "512x512",
"scale": "1x",
"idiom": "mac"
},
{
"size": "512x512",
"scale": "2x",
"idiom": "mac"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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,52 @@
<?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>CFBundleDisplayName</key>
<string>NewApp.iOS</string>
<key>CFBundleIdentifier</key>
<string>com.microsoft.NewApp-iOS</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>12.2</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</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>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>CFBundleName</key>
<string>NewApp.iOS</string>
<key>UIAppFonts</key>
<array>
<string>fa-solid-900.ttf</string>
</array>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="CometLogo" translatesAutoresizingMaskIntoConstraints="NO" id="WgY-5b-ztH">
<rect key="frame" x="87" y="430" width="240" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="I3S-Ph-e84"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="WgY-5b-ztH" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="rDj-bn-Al3"/>
<constraint firstItem="WgY-5b-ztH" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="zXa-xa-HHv"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="CometLogo" width="16" height="16"/>
</resources>
</document>

Просмотреть файл

@ -0,0 +1,15 @@
using UIKit;
namespace NewApp.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,157 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{BA2C8415-B3DC-409B-980E-DDDA5A5345BD}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{edc1b0fa-90cd-4038-8fad-98fe74adb368}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>NewApp.iOS</RootNamespace>
<AssemblyName>NewApp.iOS</AssemblyName>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
<MtouchExtraArgs>--enable-repl</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<LangVersion>latest</LangVersion>
<MtouchExtraArgs>--interpreter</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Essentials" Version="XamarinEssentialsSdk" />
<PackageReference Include="Clancey.Comet.Reload" Version="CometReloadSdk"/>
<PackageReference Include="Clancey.Comet" Version="CometSdk"/>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-1024@1x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-20@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-20@2x-1.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-20@2x-2.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-20@3x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-29@2x-1.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-29@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-29@3x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-40@2x-1.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-40@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-40@3x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-60@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-60@3x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-76@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-83.5@2x.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NewApp\NewApp.csproj">
<Project>{DC8AAC73-C9C3-4936-9F2B-EC8906A3A7E0}</Project>
<Name>NewApp</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\fa-solid-900.ttf" />
<BundleResource Include="Resources\CometLogo.png" />
<BundleResource Include="Resources\CometLogo@2x.png" />
<BundleResource Include="Resources\CometLogo@3x.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</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("NewApp.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NewApp.iOS")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
// 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")]

Двоичные данные
templates/quickstart/NewApp.iOS/Resources/CometLogo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.3 KiB

Двоичные данные
templates/quickstart/NewApp.iOS/Resources/CometLogo@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
templates/quickstart/NewApp.iOS/Resources/CometLogo@3x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 26 KiB

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2017 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NewApp.iOS" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

Двоичные данные
templates/quickstart/NewApp.iOS/Resources/fa-solid-900.ttf Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,24 @@
using System;
using Comet;
namespace NewApp
{
public class MainPage : View
{
readonly State<int> count = 0;
[Body]
View body() => new VStack
{
new Text(() => $"Value: {count.Value}")
.Color(Color.Black)
.FontSize(32),
new Button("Increment", () => count.Value ++ )
.Frame(width:320, height:44)
.Background(Color.Black)
.Color(Color.White)
.Padding(20)
,
};
}
}

Просмотреть файл

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Clancey.Comet" Version="CometSdk" />
<PackageReference Include="Clancey.Comet.Reload" Version="CometReloadSdk" />
<PackageReference Include="Xamarin.Essentials" Version="XamarinEssentialsSdk" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,17 @@
# Welcome to Comet!
## Pre-Requisites
1. Install Xamarin.iOS, Mono, and Xcode.
2. Install the Comet extension for VS Code
3. Install NuGet packages
## Running your first Comet app
1. Start debugging
You will be prompted to select a simulator to run, and a version. After that you should see your project build, the simulator launch, and your app appear.
## How to Get Help
File an issue [here](https://github.com/Clancey/Comet)!