From a18f51c8d5bfe116ec37f12cc989a858dff10821 Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Wed, 18 Oct 2023 00:28:02 +0700 Subject: [PATCH 1/3] update requirements for v3.0 --- .../basics/installation-and-quickstart.md | 16 +++++++------- .../basics/installation/setup-install-mac.md | 22 +++++++------------ .../basics/installation/setup-install-win.md | 14 ++++-------- articles/basics/supported-platforms.md | 22 +++++++++---------- 4 files changed, 30 insertions(+), 44 deletions(-) diff --git a/articles/basics/installation-and-quickstart.md b/articles/basics/installation-and-quickstart.md index 89c48438c9e..84e7541f00a 100644 --- a/articles/basics/installation-and-quickstart.md +++ b/articles/basics/installation-and-quickstart.md @@ -21,25 +21,25 @@ The installers require a working internet connection in order to complete. ### macOS Requirements - OS X 10.10 Yosemite or newer -- macOS 11.2 Big Sur (or latest) is recommended +- macOS 13.2 Ventura (or latest) is recommended - Intel processor (M1 support is planned) -- Mono 6.10 or newer -- Node.js 12 or newer +- .NET 6.0 or newer +- Node.js 16 or newer > Read the [step-by-step guide for macOS](installation/setup-install-mac.md). ### Windows Requirements -- Windows 7 or newer -- Windows 10 is recommended -- Node.js 12 or newer +- Windows 10 or newer +- .NET 6.0 or newer +- Node.js 16 or newer > Read the [step-by-step guide for Windows](installation/setup-install-win.md). ### Linux Requirements -- Mono 6.0 or newer -- Node.js 12 or newer +- .NET 6.0 or newer +- Node.js 16 or newer
diff --git a/articles/basics/installation/setup-install-mac.md b/articles/basics/installation/setup-install-mac.md index 27df5344076..c5061f47c07 100644 --- a/articles/basics/installation/setup-install-mac.md +++ b/articles/basics/installation/setup-install-mac.md @@ -4,7 +4,7 @@ This is a step-by-step tutorial that takes you through setting up Fuse X and cre
-Mono and Node.js are required to install this software. +.NET and Node.js are required to install this software.
@@ -17,10 +17,10 @@ A working internet connection is required to install this software. ## Requirements - OS X 10.10 Yosemite or newer -- macOS 11.3 Monterey (or latest) is recommended +- macOS 13.2 Ventura (or latest) is recommended - Intel processor (works on M1 via Rosetta) -- Mono 6.10 or newer -- Node.js 12 or newer +- .NET 6.0 or newer +- Node.js 16 or newer ## Running the installer @@ -30,29 +30,23 @@ You should have downloaded a file called `fuse-x-2.0.0-mac.dmg` or similar. Open This chapter will guide you through it. -
- -You can [skip this chapter](#starting-fuse-x) if you already know how to do this. - -
- ### Prerequisites -Make sure you have up-to-date Mono and Node.js installations on your system. +Make sure you have up-to-date .NET and Node.js installations on your system. This can be verified by running the following commands. ```s -$ mono --version +$ dotnet --version -Mono JIT compiler version 6.10.0.0 (or newer) +6.0.300 (or newer) ... ``` ```s $ node --version -v12.0.0 (or newer) +v16.0.0 (or newer) ``` ### Opening the installer diff --git a/articles/basics/installation/setup-install-win.md b/articles/basics/installation/setup-install-win.md index 50cecc610f4..5daa7fc6c6d 100644 --- a/articles/basics/installation/setup-install-win.md +++ b/articles/basics/installation/setup-install-win.md @@ -16,9 +16,9 @@ A working internet connection is required to install this software. ## Requirements -- Windows 7 or newer -- Windows 10 is recommended -- Node.js 12 or newer +- Windows 10 or newer +- .NET 6.0 or newer +- Node.js 16 or newer ## Running the installer @@ -28,15 +28,9 @@ You should have downloaded a file called `fuse-x-2.0.0-win.exe` or similar. Open This chapter will guide you through it. -
- -You can [skip this chapter](#starting-fuse-x) if you already know how to do this. - -
- ### Prerequisites -Make sure you have an up-to-date Node.js installation on your system. +Make sure you have up-to-date .NET and Node.js installations on your system. ### Opening the installer diff --git a/articles/basics/supported-platforms.md b/articles/basics/supported-platforms.md index 76ab15582e2..95e84bfff9a 100644 --- a/articles/basics/supported-platforms.md +++ b/articles/basics/supported-platforms.md @@ -13,28 +13,26 @@ Please note that beta versions of both macOS and Windows are not officially supp
-### macOS Requirements - - OS X 10.10 Yosemite or newer -- macOS 11.2 Big Sur (or latest) is recommended +- macOS 13.2 Ventura (or latest) is recommended - Intel processor (M1 support is planned) -- Mono 6.10 or newer -- Node.js 12 or newer +- .NET 6.0 or newer +- Node.js 16 or newer > Read the [step-by-step guide for macOS](installation/setup-install-mac.md). ### Windows Requirements -- Windows 7 or newer -- Windows 10 is recommended -- Node.js 12 or newer +- Windows 10 or newer +- .NET 6.0 or newer +- Node.js 16 or newer > Read the [step-by-step guide for Windows](installation/setup-install-win.md). ### Linux Requirements -- Mono 6.0 or newer -- Node.js 12 or newer +- .NET 6.0 or newer +- Node.js 16 or newer
@@ -54,8 +52,8 @@ Please note that some computers have multiple GPUs, and that [a problem with Win ## Export targets -* Android 4.1 (Jelly Bean, API 16) and newer -* iOS 9.0 and newer +* Android 4.4 (KitKat, API 19) and newer +* iOS 11.0 and newer
From 5a5ca9b0d3c57593e3575c3bf88d4c5fc9f56f0d Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Wed, 18 Oct 2023 00:43:55 +0700 Subject: [PATCH 2/3] update uno-projects.md --- articles/basics/uno-projects.md | 514 ++++++++++++++++---------------- 1 file changed, 252 insertions(+), 262 deletions(-) diff --git a/articles/basics/uno-projects.md b/articles/basics/uno-projects.md index c3a8156ad12..2392f0bf923 100644 --- a/articles/basics/uno-projects.md +++ b/articles/basics/uno-projects.md @@ -1,6 +1,6 @@ -# Uno Projects (`.unoproj`) +# Uno projects (`.unoproj`) -Uno is a portable, lightweight dialect of C# that sits at the heart of Fuse and allows you to export native apps for iOS and Android. To learn more about Uno, see the [Native Interop section](../native-interop/native-interop.md). +Uno is a portable, lightweight dialect of C# that sits at the heart of Fuse and allows you to export native apps for iOS and android. To learn more about Uno, see the [Native Interop section](../native-interop/native-interop.md). Fuse projects are basically Uno projects which references the Fuse libraries. The Fuse libraries are written in the Uno language. @@ -8,31 +8,31 @@ An Uno project file (`.unoproj`) is a plain JSON text file, that has this basic ```json { - "Packages": [ + "references": [ "Fuse", "FuseJS" ], - "Includes": [ + "includes": [ "*" ] } ``` -The Uno project file is where you specify what your project depends on, what it consists of, and optionally how to package it up as a native app for iOS or Android. +The Uno project file is where you specify what your project depends on, what it consists of, and optionally how to package it up as a native app for iOS or android. An Uno project can either be a *library project* consisting of assets and components for use in other projects, or an actual *app project*. The presence of an @App class in the project indicates that the project is an app project. -## Packages +## References -The `Packages` section is the list of packages to be referenced in your project. Packages are pre-compiled Uno projects ready to use, registered with a canonical package name in the Uno package manager. +The `references` section is the list of libraries to be referenced in your project. References are pre-compiled Uno projects ready to use, registered with a canonical library name. -To make a Fuse project, you typically have to reference at least the `Fuse` and `FuseJS` packages. When scaffolding your application, however, Fuse will include a standard set of packages to get you up and running. +To make a Fuse project, you typically have to reference at least the `Fuse` and `FuseJS` libraries. When scaffolding your application, however, Fuse will include a standard set of libraries to get you up and running. -What packages you reference may affect the *permissions* your app requires. +What libraries you reference may affect the *permissions* your app requires. ```json { - "Packages": [ + "references": [ "Fuse", "FuseJS" ] @@ -42,56 +42,56 @@ What packages you reference may affect the *permissions* your app requires. ## Macros The Uno project format supports a basic macro system. -This feature is used to implement many of the top-level properties, such as [Title](#title) and [Version](#version). +This feature is used to implement many of the top-level properties, such as [title](#title) and [version](#version). -For instance, say you set the `Version` property as follows: +For instance, say you set the `version` property as follows: ```json { - "Version": "0.9.4" + "version": "0.9.4" } ``` -By default, both [Android.VersionName](#android-versionname) and [iOS.BundleVersion](#ios-bundleversion) are set as follows: +By default, both [android.versionName](#android-versionname) and [ios.bundleVersion](#ios-bundleversion) are set as follows: ```json { - "Android": { - "VersionName": "$(Version)" + "android": { + "versionName": "$(version)" }, - "iOS": { - "BundleVersion": "$(Version)" + "ios": { + "bundleVersion": "$(version)" } } ``` -This will make those properties inherit the top-level `Version` property. +This will make those properties inherit the top-level `version` property. ## Projects -The `Projects` section is optional, and allows you to reference other Uno projects in the local file system. By relative paths to other `.unoproj` files. +The `projects` section is optional, and allows you to reference other Uno projects in the local file system. By relative paths to other `.unoproj` files. ```json { - "Projects": [ + "projects": [ "../../SomeOtherProject/SomeOtherProject.unoproj" ] } ``` -## Includes and Excludes +## Includes and excludes -The `Includes` and `Excludes` properties lets you control which files to include in your project. They are both arrays of strings, as shown in the snippet below: +The `includes` and `excludes` properties lets you control which files to include in your project. They are both arrays of strings, as shown in the snippet below: ```json { - "Includes": [ + "includes": [ "*.ux", "js/**/*.js", "SomeUnoClass.uno:Source", "ForeignCode.java:Java:android" ], - "Excludes": [ + "excludes": [ "js/ExcludeThisFilePlease.js", "node_modules/" ] @@ -106,7 +106,7 @@ A glob pattern, as described further down in this document. ```json { - "Includes": [ + "includes": [ "*.ux", "js/**/*.js", "Foo.uno" @@ -187,217 +187,207 @@ Use globstar (`**`) for explicit recursion: -### `FileName:Type` +### `filename:type` This tells the Uno compiler to include a single file, interpreting it as a certain [type](#allowed-include-types). ```json { - "Includes": [ - "MainView.ux:UX" + "includes": [ + "MainView.ux:ux" ] } ``` -### `FileName:Type:Condition` +### `filename:type:condition` In addition to a file of a certain [type](#allowed-include-types), you may specify a condition that will determine if the file will be included or not. ```json { - "Includes": [ - "AndroidOnly.java:Java:Android", - "iOSOnly.hh:ObjCHeader:iOS", - "iOSOnly.mm:ObjCSource:iOS" + "includes": [ + "AndroidOnly.java:java:android", + "iOSOnly.hh:objcheader:ios", + "iOSOnly.mm:objcsource:ios" ] } ``` -### Allowed Include Types +### Allowed include types -- `UX` - Declares a UX markup file (automatic when adding files with the .ux extension). -- `Source` - An Uno source file (automatic when adding files with the .uno extension). -- `Bundle` - A file that will be included in the app bundle and can then be accessed at run time. This can for example be image files like PNG or JPEG, or data files like JSON or XML. It is also needed for when you need to require stand-alone JavaScript files. -- `CSource` - A C source file. -- `CHeader` - A C header file. -- `ObjCSource` - An Objective-C source file. -- `ObjCHeader` - An Objective-C header file. -- `Java` - A Java code file with the .java file ending -- `Extensions` - A UXL extension file. -- `File` - Used to declare a file as an integral part of the project, but one that does not need to be compiled or bundled in the application. +- `ux` - Declares a UX markup file (automatic when adding files with the .ux extension). +- `source` - An Uno source file (automatic when adding files with the .uno extension). +- `bundle` - A file that will be included in the app bundle and can then be accessed at run time. This can for example be image files like PNG or JPEG, or data files like JSON or XML. It is also needed for when you need to require stand-alone JavaScript files. +- `csource` - A C source file. +- `cheader` - A C header file. +- `objcsource` - An Objective-C source file. +- `objcheader` - An Objective-C header file. +- `java` - A Java code file with the .java file ending +- `extensions` - A UXL extension file. +- `file` - Used to declare a file as an integral part of the project, but one that does not need to be compiled or bundled in the application. ## All properties -### Title +### title -The user-readable title of your app. Defaults to `$(Name)`. +The user-readable title of your app. Defaults to `$(name)`. *unrealisticallyLongNameForAnApp.unoproj*: ```json { - "Title": "ShorterName" + "title": "ShorterName" } ``` -### Description +### description User-readable description of your app. Empty by default. ```json { - "Description": "An app that helps you organize, track and analyze cat pictures on the internet." + "description": "An app that helps you organize, track and analyze cat pictures on the internet." } ``` -### Copyright +### copyright -Your app's copyright notice. Defaults to `Copyright (C) $(Publisher)`. +Your app's copyright notice. Defaults to `Copyright (C) $(publisher)`. ```json { - "Copyright": "Copyright © 2003-2016 $(Publisher)" + "copyright": "Copyright © 2003-2016 $(publisher)" } ``` -### Publisher +### publisher -The legal entity in charge of publishing the application. Defaults to `$(Publisher)`. +The legal entity in charge of publishing the application. Defaults to `$(publisher)`. ```json { - "Publisher": "VeryBusinessCorp Inc." + "publisher": "VeryBusinessCorp Inc." } ``` -### Version +### version The current version of your app, Defaults to `0.0.0`. ```json { - "Version": "1.2.9" + "version": "1.2.9" } ``` -### VersionCode +### versionCode -Some platforms (currently only Android) want an integral version code in addition to a version string. Further documentation can be found [here](http://developer.Android.com/tools/publishing/versioning.html#appversioning). Defaults to `0`. +Some platforms (currently only Android) want an integral version code in addition to a version string. Further documentation can be found [here](http://developer.android.com/tools/publishing/versioning.html#appversioning). Defaults to `0`. ```json { - "VersionCode": 125 + "versionCode": 125 } ``` -### RootNamespace +### rootNamespace -The root namespace to use. Defaults to `$(QIdentifier)`. +The root namespace to use. Defaults to `$(qidentifier)`. ```json { - "RootNamespace": "MyCompany.MyApp" + "rootNamespace": "MyCompany.MyApp" } ``` -### BuildDirectory +### buildDirectory Where to place temporary files and executables for various build configurations and targets. Defaults to `build`. ```json { - "BuildDirectory": "build" + "buildDirectory": "build" } ``` Paths are relative to the project root by default. Note that it can be unwise to use absolute paths, as it can cause issues when building from another machine with a different setup. -### OutputDirectory +### outputDirectory Where to place temporary files and executables for *the current build target and configuration*. -Defaults to `$(BuildDirectory)/@(Target)/@(Configuration)`. +Defaults to `$(buildDirectory)/@(target)/@(configuration:toLower)`. ```json { - "OutputDirectory": "$(BuildDirectory)/@(Target)/@(Configuration)" + "outputDirectory": "$(buildDirectory)/@(target)/@(configuration:toLower)" } ``` -### CacheDirectory +### cacheDirectory Where to place Uno's cache files. Defaults to `.uno`. ```json { - "CacheDirectory": ".cache" + "cacheDirectory": ".uno" } ``` -### UnoCoreReference - -Whether or not UnoCore should be referenced. You will probably never need this, as it's only used internally. Defaults to `true`. - -```json -{ - "UnoCoreReference": true -} -``` - -### Mobile +### mobile A dictionary of options that apply to all mobile targets. -#### Mobile.UriScheme +#### mobile.uriScheme Specifies an URI scheme that can be used to launch your app. -For instance, setting `"UriScheme": "abcd"` will make your app launch when an `abcd://` URI is launched. +For instance, setting `"uriScheme": "abcd"` will make your app launch when an `abcd://` URI is launched. ```json { - "Mobile": { - "UriScheme": "abcd" + "mobile": { + "uriScheme": "abcd" } } ``` -#### Mobile.KeepAlive +#### mobile.keepAlive If set to `true`, the screen won't dim and eventually turn off while your app is open. Defaults to `false`. ```json { - "Mobile": { - "KeepAlive": false + "mobile": { + "keepAlive": false } } ``` -#### Mobile.ShowStatusbar +#### mobile.showStatusbar Whether or not to show the status bar. Defaults to `true`. ```json { - "Mobile": { - "ShowStatusbar": true + "mobile": { + "showStatusbar": true } } ``` -#### Mobile.RunsInBackground +#### mobile.runsInBackground Controls whether or not your app should continue running when the user presses the home button. Defaults to `true`. ```json { - "Mobile": { - "RunsInBackground": false + "mobile": { + "runsInBackground": false } } ``` -#### Mobile.Orientations +#### mobile.orientations Specifies which screen orientations are allowed. @@ -412,177 +402,177 @@ Can be one of the following values: ```json { - "Mobile": { - "Orientations": "Portrait" + "mobile": { + "orientations": "Portrait" } } ``` -### Android +### android A dictionary of options that apply to Android targets only. -#### Android.ApplicationLabel +#### android.applicationLabel -A user-readable label for the application, specific to Android. This is the Android equivalent of the top-level [Title](#title) property. defaults to `$(Title)`. +A user-readable label for the application, specific to android. This is the Android equivalent of the top-level [title](#title) property. defaults to `$(title)`. ```json { - "Android": { - "ApplicationLabel": "MyFancyApp" + "android": { + "applicationLabel": "MyFancyApp" } } ``` -#### Android.Description +#### android.description -The same as [Description](#description), but specific to Android. Defaults to `$(Description)`. +The same as [description](#description), but specific to android. Defaults to `$(description)`. ```json { - "Android": { - "Description": "This is an Android-specific description!" + "android": { + "description": "This is an Android-specific description!" } } ``` -#### Android.VersionCode +#### android.versionCode -The same as [VersionCode](#versioncode), but specific to Android. Defaults to `$(VersionCode)`. +The same as [versionCode](#versioncode), but specific to android. Defaults to `$(versionCode)`. ```json { - "Android": { - "VersionCode": 412 + "android": { + "versionCode": 412 } } ``` -#### Android.VersionName +#### android.versionName -The same as [Version](#version), but specific to Android. Defaults to `$(Version)`. +The same as [version](#version), but specific to android. Defaults to `$(version)`. ```json { - "Android": { - "VersionName": "0.5.2" + "android": { + "versionName": "0.5.2" } } ``` -#### Android.Package +#### android.package -The name of the java package to use for Android export. Defaults to `$(QIdentifier)`. +The name of the java package to use for Android export. Defaults to `$(qidentifier)`. ```json { - "Android": { - "Package": "com.mycompany.myapp" + "android": { + "package": "com.mycompany.myapp" } } ``` -#### Android.PreviewPackage -The name of the java package to use for Android export in preview mode. Defaults to `Android.Package`. +#### android.previewPackage +The name of the java package to use for Android export in preview mode. Defaults to `android.package`. It's only used during `fuse preview android`, to differentiate between a normal package and a preview package. Use this setting if you want to have both a preview version and an exported version of your app installed on the device simultaneously. ```json { - "Android": { - "PreviewPackage": "com.mycompany.myapp.preview" + "android": { + "previewPackage": "com.mycompany.myapp.preview" } } ``` -#### Android.Icons +#### android.icons -Instead of providing one uniformly sized icon to be used on all platforms, we can specify different icons for different screen densities, specific to Android. These are grouped according to Android's [generalized densities](http://developer.Android.com/guide/practices/screens_support.html#range). All of them default to `$(Icon)`. +Instead of providing one uniformly sized icon to be used on all platforms, we can specify different icons for different screen densities, specific to android. These are grouped according to Android's [generalized densities](http://developer.android.com/guide/practices/screens_support.html#range). All of them default to `$(icon)`. -*Note:* This only applies to Android, however we can achieve the same on iOS using [iOS.Icons](#ios-icons). +*Note:* This only applies to Android, however we can achieve the same on iOS using [ios.icons](#ios-icons). ```json { - "Android": { - "Icons": { - "LDPI": "Icon-ldpi-36x36.png", - "MDPI": "Icon-mdpi-48x48.png", - "HDPI": "Icon-hdpi-72x72.png", - "XHDPI": "Icon-xhdpi-96x96.png", - "XXHDPI": "Icon-xxhdpi-144x144.png", - "XXXHDPI": "Icon-xxxhdpi-192x192.png" + "android": { + "icons": { + "ldpi": "icon-ldpi-36x36.png", + "mdpi": "icon-mdpi-48x48.png", + "hdpi": "icon-hdpi-72x72.png", + "xhdpi": "icon-xhdpi-96x96.png", + "xxhdpi": "icon-xxhdpi-144x144.png", + "xxxhdpi": "icon-xxxhdpi-192x192.png" } } } ``` -#### Android.Key +#### android.Key See [signing](../preview-and-export/signing.md). -#### Android.Geo.ApiKey +#### android.geo.apiKey Your Google Maps API key, for use with [MapView](../fuse/controls/mapview.md). ```json { - "Android": { - "Geo": { - "ApiKey": "" + "android": { + "geo": { + "apiKey": "" } } } ``` -#### Android.GooglePlay.SenderID +#### android.googlePlay.senderID In order to use the [push notification api](../fuse/pushnotifications/push.md) on Android, you have to specify a project ID from the [Google Developers Console](https://console.developers.google.com/). ```json { - "Android": { - "GooglePlay": { - "SenderID": "111781901112" + "android": { + "googlePlay": { + "senderID": "111781901112" } } } ``` -#### Android.NDK.PlatformVersion +#### android.ndk.platformVersion The NDK platform version to use. Defaults to `9`. ```json { - "Android": { - "NDK": { - "PlatformVersion": 9 + "android": { + "ndk": { + "platformVersion": 9 } } } ``` -#### Android.SDK +#### android.sdk Specifies version constraints for the Android SDK to build against. The following example shows the default values of each property. ```json { - "Android": { - "SDK": { - "BuildToolsVersion": "23.0.0", - "CompileVersion": 19, - "MinVersion": 10, - "TargetVersion": 19 + "android": { + "sdk": { + "buildToolsVersion": "23.0.0", + "compileVersion": 19, + "minVersion": 10, + "targetVersion": 19 } } } ``` -### iOS +### ios -#### iOS.BundleIdentifier +#### ios.bundleIdentifier The iOS bundle identifier. @@ -590,129 +580,129 @@ Corresponds to [CFBundleIdentifier](https://developer.apple.com/library/ios/docu ```json { - "iOS": { - "BundleIdentifier": "com.mycompany.myapp" + "ios": { + "bundleIdentifier": "com.mycompany.myapp" } } ``` -#### iOS.PreviewBundleIdentifier -The iOS bundle identifier in preview mode. Defaults to `iOS.BundleIdentifier`. +#### ios.previewBundleIdentifier +The iOS bundle identifier in preview mode. Defaults to `ios.bundleIdentifier`. It's only used during `fuse preview ios`, to differentiate between a normal bundle and a preview bundle. Use this setting if you want to have both a preview version and an exported version of your app installed on the device simultaneously. ```json { - "iOS": { - "PreviewBundleIdentifier": "com.mycompany.myapp.preview" + "ios": { + "previewBundleIdentifier": "com.mycompany.myapp.preview" } } ``` -#### iOS.BundleName +#### ios.bundleName -A user-readable label for the application specific to iOS. This is the iOS equivalent of [Android.ApplicationLabel](#android-applicationlabel). +A user-readable label for the application specific to ios. This is the iOS equivalent of [android.applicationLabel](#android-applicationlabel). Corresponds to [CFBundleName](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-109585). -Defaults to `$(Title)`. +Defaults to `$(title)`. ```json { - "iOS": { - "BundleName": "MyAwesomeApp" + "ios": { + "bundleName": "MyAwesomeApp" } } ``` -#### iOS.BundleVersion +#### ios.bundleVersion -The same as [Version](#version), but specific to iOS. -Defaults to `$(Version)`. +The same as [version](#version), but specific to ios. +Defaults to `$(version)`. Corresponds to [CFBundleVersion](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364). ```json { - "iOS": { - "BundleVersion": "0.5.2" + "ios": { + "bundleVersion": "0.5.2" } } ``` -#### iOS.DeploymentTarget +#### ios.deploymentTarget The minimum iOS version your app can run on. -Defaults to `8.0`. +Defaults to `11.0`. ```json { - "iOS": { - "DeploymentTarget": "8.0" + "ios": { + "deploymentTarget": "11.0" } } ``` -#### iOS.Icons +#### ios.icons -Instead of providing one uniformly sized icon to be used on all platforms, we can specify different icons for different sizes and screen densities, specific to iOS. -All of them default to `$(Icon)`. These icons are applied to release builds, meaning a preview build will keep the Fuse preview icon. +Instead of providing one uniformly sized icon to be used on all platforms, we can specify different icons for different sizes and screen densities, specific to ios. +All of them default to `$(icon)`. These icons are applied to release builds, meaning a preview build will keep the Fuse preview icon. Corresponds to [CFBundleIconFiles](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW10). -*Note:* This only applies to iOS, however we can achieve the same on Android using [Android.Icons](#android-icons). - -```json -{ - "iOS": { - "Icons": { - "iPhone_20_2x": "Icon-iPhone-20@2x.png", - "iPhone_20_3x": "Icon-iPhone-20@3x.png", - "iPhone_29_2x": "Icon-iPhone-29@2x.png", - "iPhone_29_3x": "Icon-iPhone-29@3x.png", - "iPhone_40_2x": "Icon-iPhone-40@2x.png", - "iPhone_40_3x": "Icon-iPhone-40@3x.png", - "iPhone_60_2x": "Icon-iPhone-60@2x.png", - "iPhone_60_3x": "Icon-iPhone-60@3x.png", - "iPad_20_1x": "Icon-iPad-20@1x.png", - "iPad_20_2x": "Icon-iPad-20@2x.png", - "iPad_29_1x": "Icon-iPad-29@1x.png", - "iPad_29_2x": "Icon-iPad-29@2x.png", - "iPad_40_1x": "Icon-iPad-40@1x.png", - "iPad_40_2x": "Icon-iPad-40@2x.png", - "iPad_76_1x": "Icon-iPad-76@1x.png", - "iPad_76_2x": "Icon-iPad-76@2x.png", - "iPad_83.5_2x": "Icon-iPad-83.5@2x.png", - "iOS-Marketing_1024_1x": "iOS-Marketing-1024@1x.png" +*Note:* This only applies to iOS, however we can achieve the same on Android using [android.icons](#android-icons). + +```json +{ + "ios": { + "icons": { + "iphone_20_2x": "icon-iPhone-20@2x.png", + "iphone_20_3x": "icon-iPhone-20@3x.png", + "iphone_29_2x": "icon-iPhone-29@2x.png", + "iphone_29_3x": "icon-iPhone-29@3x.png", + "iphone_40_2x": "icon-iPhone-40@2x.png", + "iphone_40_3x": "icon-iPhone-40@3x.png", + "iphone_60_2x": "icon-iPhone-60@2x.png", + "iphone_60_3x": "icon-iPhone-60@3x.png", + "ipad_20_1x": "icon-iPad-20@1x.png", + "ipad_20_2x": "icon-iPad-20@2x.png", + "ipad_29_1x": "icon-iPad-29@1x.png", + "ipad_29_2x": "icon-iPad-29@2x.png", + "ipad_40_1x": "icon-iPad-40@1x.png", + "ipad_40_2x": "icon-iPad-40@2x.png", + "ipad_76_1x": "icon-iPad-76@1x.png", + "ipad_76_2x": "icon-iPad-76@2x.png", + "ipad_83.5_2x": "icon-iPad-83.5@2x.png", + "ios_marketing_1024_1x": "iOS-Marketing-1024@1x.png" } } } ``` -#### iOS.LaunchImages +#### ios.launchImages -Specifies launch images of different sizes to be used on iOS. +Specifies launch images of different sizes to be used on ios. Corresponds to [UILaunchImages](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW28). ```json { - "iOS": { - "LaunchImages": { - "iPhone_Portrait_iPhoneX_3x": "...", // 1125x2436 - "iPhone_Landscape_iPhoneX_3x": "...", // 2436x1125 - "iPhone_Portrait_2x": "...", // 640x960 - "iPhone_Portrait_R4": "...", // 640x1136 - "iPhone_Portrait_R47": "...", // 750x1334 - "iPhone_Portrait_R55": "...", // 1242x2208 - "iPhone_Landscape_R55": "...", // 2208x1242 - "iPad_Portrait_1x": "...", // 768x1024 - "iPad_Portrait_2x": "...", // 1536x2048 - "iPad_Landscape_1x": "...", // 1024x768 - "iPad_Landscape_2x": "..." // 2048x1536 + "ios": { + "launchImages": { + "iphone_portrait_iphonex_3x": "...", // 1125x2436 + "iphone_landscape_iphonex_3x": "...", // 2436x1125 + "iphone_portrait_2x": "...", // 640x960 + "iphone_portrait_r4": "...", // 640x1136 + "iphone_portrait_r47": "...", // 750x1334 + "iphone_portrait_r55": "...", // 1242x2208 + "iphone_landscape_r55": "...", // 2208x1242 + "ipad_portrait_1x": "...", // 768x1024 + "ipad_portrait_2x": "...", // 1536x2048 + "ipad_landscape_1x": "...", // 1024x768 + "ipad_landscape_2x": "..." // 2048x1536 } } } ``` -#### iOS.SystemCapabilities +#### ios.systemCapabilities Capabilities are App Services which need special declarations in the Xcode project. @@ -722,38 +712,38 @@ For more info on the valid values for `AssociatedDomains`, `KeychainSharing` & ` ```json { - "iOS": { - "SystemCapabilities": { - "ApplicationGroups": ["group.A", "group.B"], - "DataProtection": true, - "GameCenter": true, - "HealthKit": true, - "HomeKit": true, - "InAppPurchase": true, - "InterAppAudio": true, - "KeychainSharing": ["AAA", "BBB"], - "Push": true, - "AssociatedDomains": ["CCC", "DDD"], - "PersonalVPN": true, - "WirelessAccessoryConfiguration": true + "ios": { + "systemCapabilities": { + "applicationGroups": ["group.A", "group.B"], + "dataProtection": true, + "gameCenter": true, + "healthKit": true, + "homeKit": true, + "inAppPurchase": true, + "interAppAudio": true, + "keychainSharing": ["AAA", "BBB"], + "push": true, + "associatedDomains": ["CCC", "DDD"], + "personalVPN": true, + "wirelessAccessoryConfiguration": true } } } ``` -#### iOS.PList +#### ios.plist A dictionary of entries that will be included in the `Info.plist` file of the iOS bundle. Note that not all property list entries will work – only the ones that are included here. -##### iOS.PList.MKDirectionsApplicationSupportedModes +##### ios.plist.MKDirectionsApplicationSupportedModes An array of strings, specifying the modes of transportation for which the app is capable of giving map directions. Reference can be found [here](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW33). ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "MKDirectionsApplicationSupportedModes": [ "MKDirectionsModeCar", "MKDirectionsModeBus" @@ -763,15 +753,15 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat } ``` -##### iOS.PList.UIRequiredDeviceCapabilities +##### ios.plist.UIRequiredDeviceCapabilities An array of strings, specifying which device-related capabilities must be available for the app to function. Reference can be found [here](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3). ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UIRequiredDeviceCapabilities": [ "camera-flash", "gps" @@ -781,21 +771,21 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat } ``` -##### iOS.PList.NSHealthShareUsageDescription +##### ios.plist.NSHealthShareUsageDescription A message that will be shown to the user when the app is requesting HealthKit data. ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "NSHealthShareUsageDescription": "We need access to your HealthKit data because..." } } } ``` -##### iOS.PList.UIApplicationExitsOnSuspend +##### ios.plist.UIApplicationExitsOnSuspend When `true`, the app will terminate rather than being sent to the background when the user presses the home button. Defaults to `false`. @@ -803,15 +793,15 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UIApplicationExitsOnSuspend": false } } } ``` -##### iOS.PList.UIFileSharingEnabled +##### ios.plist.UIFileSharingEnabled Specifies whether the app can share files through iTunes when connected to a computer. Defaults to `false`. @@ -820,15 +810,15 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UIFileSharingEnabled": true } } } ``` -##### iOS.PList.UINewsstandApp +##### ios.plist.UINewsstandApp Specifies whether the app presents its contents in the iOS Newsstand app. Defaults to `false`. @@ -836,27 +826,27 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UINewsstandApp": true } } } ``` -##### iOS.PList.UIPrerenderedIcon +##### ios.plist.UIPrerenderedIcon ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UIPrerenderedIcon": true } } } ``` -##### iOS.PList.UISupportedExternalAccessoryProtocols +##### ios.plist.UISupportedExternalAccessoryProtocols An array of strings specifying which external accessory protocols your app is capable of communicating over. Defaults to `[]`. @@ -864,8 +854,8 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UISupportedExternalAccessoryProtocols": [ "my-external-accessory-protocol" ] @@ -875,12 +865,12 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ``` -##### iOS.PList.UIViewEdgeAntialiasing +##### ios.plist.UIViewEdgeAntialiasing Specifies whether Core Animation layers use antialiasing when drawing a layer that is not aligned to pixel boundaries. Defaults to `false`. @@ -888,8 +878,8 @@ Reference can be found [here](https://developer.apple.com/library/ios/documentat ```json { - "iOS": { - "PList": { + "ios": { + "plist": { "UIViewEdgeAntialiasing": true } } From b16d0ddbd04cac5c8799cadfad84cc9f1a7cf797 Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Wed, 18 Oct 2023 00:54:16 +0700 Subject: [PATCH 3/3] update uxl-handbook.md --- articles/technical-corner/uxl-handbook.md | 216 +++++++++++----------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/articles/technical-corner/uxl-handbook.md b/articles/technical-corner/uxl-handbook.md index fcdc517d32b..7e0d1a3133c 100644 --- a/articles/technical-corner/uxl-handbook.md +++ b/articles/technical-corner/uxl-handbook.md @@ -17,7 +17,7 @@ For the rest of the document the phrases 'meets the condition' or 'the condition For example the following class will only be included when you are building for iOS: ```csharp - public extern(iOS) class Test0 + public extern(IOS) class Test0 { public void SayHi() { @@ -29,7 +29,7 @@ For example the following class will only be included when you are building for We can also use simple boolean logic inside the `extern()` condition ```csharp - public extern(!iOS) class Test0 + public extern(!IOS) class Test0 { public void SayHi() { @@ -203,8 +203,8 @@ We can access a static field of type easily from UXL. Below we show how to acces As you can see, the `@{type}` syntax works for classes too. -#### Refer to a field on an instance of a type using the `:Of` macro -UXL cannot infer the type of a C++ variable, so when we need access to instance data we have to tell UXL the type. We use the `:Of` macro for this: +#### Refer to a field on an instance of a type using the `:of` macro +UXL cannot infer the type of a C++ variable, so when we need access to instance data we have to tell UXL the type. We use the `:of` macro for this: ```csharp public class Test0 { @@ -215,7 +215,7 @@ UXL cannot infer the type of a C++ variable, so when we need access to instance public string getTest0Name(Test0 x) { extern(x) "@{Test0} tmp = @0"; - extern"@{string} tmp2 = @{Test0:Of(tmp)._instanceName}" + extern"@{string} tmp2 = @{Test0:of(tmp)._instanceName}" return extern"tmp2"; } } @@ -225,7 +225,7 @@ This is a somewhat convoluted example but should show the point. Of course, if y extern(x._instanceName)"..some code using $0 here"; -#### Call a static method using UXL with the `:Call` macro +#### Call a static method using UXL with the `:call` macro ```csharp public class Test0 { @@ -235,17 +235,17 @@ This is a somewhat convoluted example but should show the point. Of course, if y public class Test1 { public string getTest0Name() { - return extern"@{Test0.AgeJeff(int):Call(253)}"; + return extern"@{Test0.AgeJeff(int):call(253)}"; } } ``` To accurately specify the method to call we need to provide the signature (only the types are needed). -Then in the `Call` we provide the actual arguments. +Then in the `call` we provide the actual arguments. #### Call an instance method using UXL -As you could guess, you use the `:Of` macro in the same way as we did for fields: +As you could guess, you use the `:of` macro in the same way as we did for fields: ```csharp public class Test0 { @@ -255,7 +255,7 @@ As you could guess, you use the `:Of` macro in the same way as we did for fields public class Test1 { public string getTest0Name(Test0 x) { - return extern(x)"@{Test0:Of($0).AgeJeff(int):Call(253)}"; + return extern(x)"@{Test0:of($0).AgeJeff(int):call(253)}"; } } ``` @@ -265,10 +265,10 @@ As you could guess, you use the `:Of` macro in the same way as we did for fields UXL sees all (with caveats): it doesn't obey access modifers. If native can reference it, it can. Obviously the converse is also true, so when compiling to C# you most likely can't access everything. -#### Make a new instance of a class from UXL using the `:New` macro -Making a new instance of the class is very similar to `:Call`. The syntax is: +#### Make a new instance of a class from UXL using the `:new` macro +Making a new instance of the class is very similar to `:call`. The syntax is: -`@{Test2} someVar = @{Test2(int,float):New(1,1.2f)}` +`@{Test2} someVar = @{Test2(int,float):new(1,1.2f)}` Where: - `Test2` is the type, @@ -279,22 +279,22 @@ As usual, if we can, you should use `new` in Uno and pass it into the UXL as an `extern(new Test2(1,1.2f))"..some native code"` -#### Get the Uno Type object using the `:TypeOf` macro +#### Get the Uno Type object using the `:typeof` macro -`@{Android.android.accessibilityservice.AccessibilityService:TypeOf}` +`@{Android.android.accessibilityservice.AccessibilityService:typeof}` is the equivalent of: `typeof(Android.android.accessibilityservice.AccessibilityService)` -#### Get or Set a property using the `:Get` and `:Set` macros +#### Get or Set a property using the `:get` and `:set` macros Here is how to get the value of a property using UXL: -`@{Uno.Exception:Of($0).Message:Get()}` +`@{Uno.Exception:of($0).Message:get()}` Set is very similar: -`@{Uno.Exception:Of($0).Message:Set($1)}` +`@{Uno.Exception:of($0).Message:set($1)}` #### And more... There are more macros to be seen but Ι think that an introduction to UXL files is needed first. @@ -357,55 +357,55 @@ The compiler doesn't enforce this, though. Here is a possible UXL file for the `Test3` class we saw above: ```xml - - - - ((@{float})$0) - - - - - - - - + + + + ((@{float})$0) + + + + + + + + ``` Here we can see some macros we will recognize, and some we may not. The `$$` macro is the `this` variable of the instance. -The `Extensions` tag specific what backend the contents are valid for. +The `extensions` tag specific what backend the contents are valid for. -The `Type` tag specifies the Uno type we are implementing. That type must have a `[TargetSpecificImplementation]` attribute. +The `type` tag specifies the Uno type we are implementing. That type must have a `[TargetSpecificImplementation]` attribute. -Then we have the method implementations. The signature is almost the same as used in the `:Call` macro, except here we also have to specify the return type after a colon (but only if there is a return type). +Then we have the method implementations. The signature is almost the same as used in the `:call` macro, except here we also have to specify the return type after a colon (but only if there is a return type). -The implementation for `FirstMethod` is inside the `Expression` tags. This means the code will be inlined and so, like the `extern ""`, we don't need a semicolon. +The implementation for `FirstMethod` is inside the `expression` tags. This means the code will be inlined and so, like the `extern ""`, we don't need a semicolon. -The implementation for `SecondMethod` is inside the `Body` tags, this means the code will not be inlined in the callsite but will instead be the body of the method in C++. Also, inside body we can have multiple lines. The use of `CDATA` is not mandatory but means you don't have to escape as many characters and generally makes your life as a programmer easier. +The implementation for `SecondMethod` is inside the `body` tags, this means the code will not be inlined in the callsite but will instead be the body of the method in C++. Also, inside body we can have multiple lines. The use of `CDATA` is not mandatory but means you don't have to escape as many characters and generally makes your life as a programmer easier. -In `SecondMethod` we also see something new, the `Require Entity` tag. This requires a brief interlude to talk about how Uno strips code. +In `SecondMethod` we also see something new, the `require entity` tag. This requires a brief interlude to talk about how Uno strips code. ### Code Stripping and UXL Uno tries to remove everything that is not used by some part of the program. To do this the compiler walks the Uno code, adding references to everything that is 'touched'. At the end of the walk, if a method, field or type has a reference count of 0, then it is stripped. -Note that the references are only added if something is used in Uno, **not** if it is used in UXL. This means that if we want to ensure an 'entity' is not stripped we should add a reference to it. We do this with the `Require Entity` tag. +Note that the references are only added if something is used in Uno, **not** if it is used in UXL. This means that if we want to ensure an 'entity' is not stripped we should add a reference to it. We do this with the `require entity` tag. -- `` adds a reference to a method -- `` adds a reference to a field -- `` adds a reference to a type +- `` adds a reference to a method +- `` adds a reference to a field +- `` adds a reference to a type -Where we place this `Require Entity` is important because it affects when it will take effect. +Where we place this `require entity` is important because it affects when it will take effect. -- Putting it inside the `Method` block means it will add a reference if that method is not stripped -- Putting it inside the `Type` block means it will add a reference if that type is not stripped -- Putting it inside the `Extensions` block means it will always add a reference +- Putting it inside the `method` block means it will add a reference if that method is not stripped +- Putting it inside the `type` block means it will add a reference if that type is not stripped +- Putting it inside the `extensions` block means it will always add a reference -Code stripping is one of Uno's strengths, so be as restrive as possible when choosing where to add the reference. As a rough rule: `Method > Type > Extensions`. +Code stripping is one of Uno's strengths, so be as restrive as possible when choosing where to add the reference. As a rough rule: `method > type > extensions`. Now, back to the snooker... @@ -414,86 +414,86 @@ Now, back to the snooker... #### Set the file extension of the generated native code If you use Objective C in your UXL you need to ensure that the file extension is `.mm` rather than `.cpp`, or you will get some very bizarre include errors from Xcode when you try and compile. - + #### UXL Equivalent of using -Writing out fully qualified types can get tedious. The `Using` tag does the same job s Uno's `using` statement: +Writing out fully qualified types can get tedious. The `using` tag does the same job s Uno's `using` statement: ```xml - + ``` -#### Adding includes using the `Require` tag and the `:Include` macro +#### Adding includes using the `require` tag and the `:include` macro In your UXL you may reference other Uno types, for example by calling one of their methods. However for some targets you need to include the header file for that type before you can use it. We do this with the require tag ```xml - - + + ``` -In the above we use the `:Include` macro to get the path of the `.h` file we require. +In the above we use the `:include` macro to get the path of the `.h` file we require. -By using `Source.Include` we say the `#include` will be added to the `.cpp` file for the type. +By using `source.include` we say the `#include` will be added to the `.cpp` file for the type. -By using `Header.Include` we say the `#include` will be added to the `.h` file for the type. +By using `header.include` we say the `#include` will be added to the `.h` file for the type. -It is always preferable to use `Source.Include` where you can and `Header.Include` if you must. +It is always preferable to use `source.include` where you can and `header.include` if you must. We can also include regular C/C++ header files by providing the path explicitly: ```xml - - + + ``` -#### Adding arbitrary source to native files using the `Require Source.Declaration` tag +#### Adding arbitrary source to native files using the `require source.declaration` tag This feature is documented for completeness and as it is _very, very occasionally_ the right thing to use, however, if you are using it, it should be because there is no other option. ```xml - ``` -`Source.Declaration` will add the block of native code to the top of the compiled C++ code of the type. It will be after the includes but before the opening of any namespaces. +`source.declaration` will add the block of native code to the top of the compiled C++ code of the type. It will be after the includes but before the opening of any namespaces. -`Header.Declaration` does the same but for the `.h` file. +`header.declaration` does the same but for the `.h` file. -If you add multiple `Source.Declaration` blocks to a single class there is no guarentee what the order will be in the final C++. +If you add multiple `source.declaration` blocks to a single class there is no guarentee what the order will be in the final C++. -#### UXL Conditions using `Condition=` +#### UXL conditions using `condition=` UXL has an equivalent to `extern(CONDITION)`: ```xml - + ``` For example, here we only add a reference to the `OnTick` method if we are compiling for mobile devices. -This can also be used on `Type` and `Method` tags so we can provide different implementations for `ANDROID` and `iOS` (for example). +This can also be used on `type` and `method` tags so we can provide different implementations for `ANDROID` and `IOS` (for example). -#### Expanding Macros in arbitrary types using the `ProcessFile` tag -There are cases you may find that you want to expand some UXL in a non-UXL block. It may be as simple as putting a `project version=@(Project.Version)` in a readme file, or something more complex like changing the behavior of a Java method if a particular Uno method has been stripped. +#### Expanding macros in arbitrary types using the `processFile` tag +There are cases you may find that you want to expand some UXL in a non-UXL block. It may be as simple as putting a `project version=@(project.version)` in a readme file, or something more complex like changing the behavior of a Java method if a particular Uno method has been stripped. To have the file processed by the UXL processor use the following syntax: -- `` for native header files -- `` for native source files -- `` for other kinds of file +- `` for native header files +- `` for native source files +- `` for other kinds of file Note that in the last case you should define where the file will be put in the output build directory of the project. -#### Copying a file without expanding any macros using the `CopyFile` tag +#### Copying a file without expanding any macros using the `copyFile` tag -Much like `ProcessFile`, this copies a file into the build output, but by not having to parse for UXL macros, it is much faster. Use this wherever possible. +Much like `processFile`, this copies a file into the build output, but by not having to parse for UXL macros, it is much faster. Use this wherever possible. ```xml - + ``` ## `TargetSpecificType`'s @@ -510,16 +510,16 @@ Here is the simplest possible example of a `TargetSpecificType`: ```xml - + ``` Here we are defining an Uno type that will stand in for the JNI `jobject` type. Some things to know: - `TargetSpecificType`s must be struct's. We used to allow them to be classes, but this is deprecated. - `TargetSpecificType`s can be boxed by Uno without issues. -- The `Include` defined in the UXL will be added to all files that use the `TargetSpecificType`. +- The `include` defined in the UXL will be added to all files that use the `TargetSpecificType`. - Structs are value types, so we can't compare them to Uno's `null`. ### Defining Uno Methods on `TargetSpecificType`'s @@ -573,21 +573,21 @@ public extern(ANDROID) struct AndroidNativeView ``` ```xml - - - - - ::Xli::DefaultTraits::Hash($$) - - - + + + + + ::Xli::DefaultTraits::Hash($$) + + + JniHelper jni; jni->IsSameObject($0, $1); - - - + + + ``` ## What values are available in UXL @@ -599,30 +599,30 @@ This section is coming soon. Templates are a way to group UXL tags under one name that can then be used in other UXL. For example, maybe you need to add references to a lot of methods if either of two classes are used. You could write: ```xml - + ``` and then simply add... ```xml - + ``` ...to the two classes that need these methods. The only valid UXL tags that can put in a template are: -- `` -- `` -- `` +- `` +- ``∂ +- `` # Common Issues @@ -680,5 +680,5 @@ TLDR: Try sticking `global::` at the beginning of the fully qualified type. yes :) ```xml - + ```