├── Research
├── HelloObjC.app
│ └── Contents
│ │ ├── PkgInfo
│ │ ├── MacOS
│ │ └── HelloObjC
│ │ ├── Resources
│ │ └── Base.lproj
│ │ │ ├── Main.storyboardc
│ │ │ ├── Info.plist
│ │ │ ├── BYZ-38-t0r-view-8bC-Xf-vdC.nib
│ │ │ └── UIViewController-BYZ-38-t0r.nib
│ │ │ └── LaunchScreen.storyboardc
│ │ │ ├── Info.plist
│ │ │ ├── 01J-lp-oVM-view-Ze5-6b-2t3.nib
│ │ │ └── UIViewController-01J-lp-oVM.nib
│ │ ├── Info.plist
│ │ └── _CodeSignature
│ │ └── CodeResources
├── Hello.macOS
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── AppIcon-128.png
│ │ │ ├── AppIcon-16.png
│ │ │ ├── AppIcon-256.png
│ │ │ ├── AppIcon-32.png
│ │ │ ├── AppIcon-512.png
│ │ │ ├── AppIcon-128@2x.png
│ │ │ ├── AppIcon-16@2x.png
│ │ │ ├── AppIcon-256@2x.png
│ │ │ ├── AppIcon-32@2x.png
│ │ │ ├── AppIcon-512@2x.png
│ │ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── Main.cs
│ ├── ViewController.designer.cs
│ ├── AppDelegate.cs
│ ├── ViewController.cs
│ ├── Info.plist
│ └── Hello.macOS.csproj
├── HelloForms
│ ├── AssemblyInfo.cs
│ ├── Models
│ │ └── Item.cs
│ ├── Views
│ │ ├── AboutPage.xaml.cs
│ │ ├── MainPage.xaml.cs
│ │ ├── ItemDetailPage.xaml
│ │ ├── NewItemPage.xaml
│ │ ├── ItemDetailPage.xaml.cs
│ │ ├── NewItemPage.xaml.cs
│ │ ├── MainPage.xaml
│ │ ├── ItemsPage.xaml.cs
│ │ ├── ItemsPage.xaml
│ │ └── AboutPage.xaml
│ ├── ViewModels
│ │ ├── ItemDetailViewModel.cs
│ │ ├── AboutViewModel.cs
│ │ ├── ItemsViewModel.cs
│ │ └── BaseViewModel.cs
│ ├── Services
│ │ ├── IDataStore.cs
│ │ └── MockDataStore.cs
│ ├── App.xaml
│ ├── HelloForms.csproj
│ └── App.xaml.cs
├── HelloObjC
│ ├── HelloObjC
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ ├── AccentColor.colorset
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── ViewController.h
│ │ ├── AppDelegate.h
│ │ ├── SceneDelegate.h
│ │ ├── HelloObjC.entitlements
│ │ ├── ViewController.m
│ │ ├── main.m
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ ├── SceneDelegate.m
│ │ └── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ └── HelloObjC.xcodeproj
│ │ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── HelloForms.iOS
│ ├── Resources
│ │ ├── Default.png
│ │ ├── tab_about.png
│ │ ├── tab_feed.png
│ │ ├── Default@2x.png
│ │ ├── tab_feed@2x.png
│ │ ├── tab_feed@3x.png
│ │ ├── tab_about@2x.png
│ │ ├── tab_about@3x.png
│ │ ├── xamarin_logo.png
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── xamarin_logo@2x.png
│ │ ├── xamarin_logo@3x.png
│ │ ├── Default-Portrait@2x.png
│ │ └── LaunchScreen.storyboard
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ ├── Icon87.png
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── Main.cs
│ ├── AppDelegate.cs
│ ├── Info.plist
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── HelloForms.iOS.csproj
├── Hello.iOS
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ ├── Icon87.png
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── ViewController.designer.cs
│ ├── Main.cs
│ ├── ViewController.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── LaunchScreen.storyboard
│ ├── Main.storyboard
│ ├── AppDelegate.cs
│ ├── Info.plist
│ ├── SceneDelegate.cs
│ ├── Resources
│ │ └── LaunchScreen.xib
│ └── Hello.iOS.csproj
├── macOS-main.m
├── MyBuild
│ ├── macmain.m
│ ├── catmain.m
│ ├── build.sh
│ └── mcat.sh
├── compile_maccat_mono.sh
├── iOS-Sim-main.m
├── iOS-Device-main.m
├── ObjC-BuildLog.txt
└── CatResearch.sln
├── maccat.sh
├── Icon.jpg
├── .github
└── FUNDING.yml
├── global.json
├── test_build_task.sh
├── Sdk
├── maccat.csproj
├── maccat.sln
├── catmain.m
├── Program.cs
├── Terminal.cs
├── FixEnums.fsx
└── Marzipanify.cs
├── Praeclarum.MacCatalyst
├── Praeclarum.MacCatalyst.BuildTask.csproj
├── Praeclarum.MacCatalyst.targets
└── BuildTask.cs
├── LICENSE.txt
├── Praeclarum.MacCatalyst.nuspec
├── Makefile
├── Catalyst.sln
├── README.md
├── .editorconfig
└── .gitignore
/Research/HelloObjC.app/Contents/PkgInfo:
--------------------------------------------------------------------------------
1 | APPL????
--------------------------------------------------------------------------------
/maccat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | dotnet maccat.dll $@
4 |
--------------------------------------------------------------------------------
/Icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Icon.jpg
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [praeclarum]
4 |
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "3.1.100",
4 | "rollForward": "latestFeature"
5 | }
6 | }
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Research/HelloForms/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_about.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_feed.png
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/MacOS/HelloObjC:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/MacOS/HelloObjC
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_feed@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_feed@2x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_feed@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_feed@3x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_about@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_about@2x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/tab_about@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/tab_about@3x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/xamarin_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/xamarin_logo.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/xamarin_logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/xamarin_logo@2x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/xamarin_logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/xamarin_logo@3x.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/praeclarum/Praeclarum.MacCatalyst/HEAD/Research/HelloObjC.app/Contents/Resources/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import
9 |
10 | @interface ViewController : UIViewController
11 |
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/Research/HelloForms/Models/Item.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HelloForms.Models
4 | {
5 | public class Item
6 | {
7 | public string Id { get; set; }
8 | public string Text { get; set; }
9 | public string Description { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import
9 |
10 | @interface AppDelegate : UIResponder
11 |
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/Main.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 |
3 | namespace Hello.macOS
4 | {
5 | static class MainClass
6 | {
7 | static void Main(string[] args)
8 | {
9 | NSApplication.Init();
10 | NSApplication.Main(args);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import
9 |
10 | @interface SceneDelegate : UIResponder
11 |
12 | @property (strong, nonatomic) UIWindow * window;
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/AboutPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | namespace HelloForms.Views
7 | {
8 | public partial class AboutPage : ContentPage
9 | {
10 | public AboutPage()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/HelloObjC.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Research/HelloForms/ViewModels/ItemDetailViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using HelloForms.Models;
4 |
5 | namespace HelloForms.ViewModels
6 | {
7 | public class ItemDetailViewModel : BaseViewModel
8 | {
9 | public Item Item { get; set; }
10 | public ItemDetailViewModel(Item item = null)
11 | {
12 | Title = item?.Text;
13 | Item = item;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import "ViewController.h"
9 |
10 | @interface ViewController ()
11 |
12 | @end
13 |
14 | @implementation ViewController
15 |
16 | - (void)viewDidLoad {
17 | [super viewDidLoad];
18 | // Do any additional setup after loading the view.
19 | }
20 |
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/test_build_task.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -x
4 | set -e
5 |
6 |
7 | PROJDIR=$1
8 |
9 | dotnet build Praeclarum.MacCatalyst/Praeclarum.MacCatalyst.BuildTask.csproj
10 | cp Praeclarum.MacCatalyst/bin/Debug/netstandard2.1/Praeclarum.MacCatalyst.BuildTask.dll $PROJDIR
11 | cp Praeclarum.MacCatalyst/bin/Debug/netstandard2.1/Praeclarum.MacCatalyst.targets $PROJDIR
12 |
13 | cd $PROJDIR
14 | touch AppDelegate.cs
15 | msbuild
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Visual Studio from the outlets and
4 | // actions declared in your storyboard file.
5 | // Manual changes to this file will not be maintained.
6 | //
7 | using Foundation;
8 | using System;
9 | using System.CodeDom.Compiler;
10 | using UIKit;
11 |
12 | namespace Hello.iOS
13 | {
14 | [Register("ViewController")]
15 | partial class ViewController
16 | {
17 | }
18 | }
--------------------------------------------------------------------------------
/Research/HelloForms/Views/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | namespace HelloForms.Views
7 | {
8 | public partial class MainPage : TabbedPage
9 | {
10 | public MainPage()
11 | {
12 | InitializeComponent();
13 | Console.WriteLine (new SkiaSharp.Views.Forms.SKCanvasView ());
14 | //Console.WriteLine (Microsoft.AppCenter.AppCenter.SdkVersion);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Research/HelloForms/Services/IDataStore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace HelloForms.Services
6 | {
7 | public interface IDataStore
8 | {
9 | Task AddItemAsync(T item);
10 | Task UpdateItemAsync(T item);
11 | Task DeleteItemAsync(string id);
12 | Task GetItemAsync(string id);
13 | Task> GetItemsAsync(bool forceRefresh = false);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace Hello.iOS
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | System.Console.WriteLine ("Starting Hello.iOS");
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, "AppDelegate");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/Research/macOS-main.m:
--------------------------------------------------------------------------------
1 | #define MONOMAC 1
2 | #include
3 | #import
4 | #import
5 |
6 |
7 |
8 | extern "C" int xammac_setup ()
9 | {
10 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
11 | xamarin_disable_lldb_attach = true;
12 |
13 | xamarin_create_classes ();
14 | setenv ("MONO_GC_PARAMS", "major=marksweep", 1);
15 | xamarin_supports_dynamic_registration = TRUE;
16 | xamarin_mac_modern = TRUE;
17 | return 0;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/Research/HelloForms/ViewModels/AboutViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 | using Xamarin.Essentials;
4 | using Xamarin.Forms;
5 |
6 | namespace HelloForms.ViewModels
7 | {
8 | public class AboutViewModel : BaseViewModel
9 | {
10 | public AboutViewModel()
11 | {
12 | Title = "About";
13 | OpenWebCommand = new Command(async () => await Browser.OpenAsync("https://xamarin.com"));
14 | }
15 |
16 | public ICommand OpenWebCommand { get; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Research/MyBuild/macmain.m:
--------------------------------------------------------------------------------
1 | #define MONOMAC 1
2 | #include
3 | #import
4 | #import
5 |
6 |
7 |
8 | extern "C" int xammac_setup ()
9 | {
10 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
11 | xamarin_disable_lldb_attach = true;
12 |
13 | xamarin_create_classes ();
14 | setenv ("MONO_GC_PARAMS", "major=marksweep", 1);
15 | xamarin_supports_dynamic_registration = TRUE;
16 | xamarin_mac_modern = TRUE;
17 | return 0;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using Foundation;
8 |
9 | namespace Hello.macOS
10 | {
11 | [Register("ViewController")]
12 | partial class ViewController
13 | {
14 | void ReleaseDesignerOutlets()
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import
9 | #import "AppDelegate.h"
10 |
11 | int main(int argc, char * argv[]) {
12 | NSString * appDelegateClassName;
13 | @autoreleasepool {
14 | // Setup code that might create autoreleased objects goes here.
15 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
16 | }
17 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
18 | }
19 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace HelloForms.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/ItemDetailPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Research/compile_maccat_mono.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 | set -x
5 |
6 | cd /Users/fak/Projects/mono
7 |
8 | export XCODE_DIR=/Applications/Xcode_12.0.0.app/Contents/Developer
9 | export MACOS_VERSION=10.15
10 |
11 | # Configure
12 |
13 | echo "ENABLE_MACCAT=1" > sdks/Make.config
14 | rm sdks/builds/.stamp* && rm -r sdks/builds/maccat-mac64-release && rm -r sdks/builds/maccat-mac64-release.config.cache
15 | make -C sdks/builds configure-maccat
16 |
17 | # make V=1 -C sdks/builds build-maccat
18 | make -j20 -C sdks/builds build-maccat
19 |
20 | make -C sdks/builds archive-maccat
21 |
22 |
--------------------------------------------------------------------------------
/Sdk/maccat.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 | enable
7 | true
8 | preview
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 | using Foundation;
3 |
4 | namespace Hello.macOS
5 | {
6 | [Register("AppDelegate")]
7 | public class AppDelegate : NSApplicationDelegate
8 | {
9 | public AppDelegate()
10 | {
11 | }
12 |
13 | public override void DidFinishLaunching(NSNotification notification)
14 | {
15 | // Insert code here to initialize your application
16 | }
17 |
18 | public override void WillTerminate(NSNotification notification)
19 | {
20 | // Insert code here to tear down your application
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Research/HelloForms/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #2196F3
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Research/HelloForms/HelloForms.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | true
6 |
7 |
8 |
9 | portable
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Research/HelloForms/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 | using HelloForms.Services;
5 | using HelloForms.Views;
6 |
7 | namespace HelloForms
8 | {
9 | public partial class App : Application
10 | {
11 |
12 | public App()
13 | {
14 | InitializeComponent();
15 |
16 | DependencyService.Register();
17 | MainPage = new MainPage();
18 | }
19 |
20 | protected override void OnStart()
21 | {
22 | }
23 |
24 | protected override void OnSleep()
25 | {
26 | }
27 |
28 | protected override void OnResume()
29 | {
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/ViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using AppKit;
4 | using Foundation;
5 |
6 | namespace Hello.macOS
7 | {
8 | public partial class ViewController : NSViewController
9 | {
10 | public ViewController(IntPtr handle) : base(handle)
11 | {
12 | }
13 |
14 | public override void ViewDidLoad()
15 | {
16 | base.ViewDidLoad();
17 |
18 | // Do any additional setup after loading the view.
19 | }
20 |
21 | public override NSObject RepresentedObject
22 | {
23 | get
24 | {
25 | return base.RepresentedObject;
26 | }
27 | set
28 | {
29 | base.RepresentedObject = value;
30 | // Update the view, if already loaded.
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/NewItemPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/ItemDetailPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using HelloForms.Models;
7 | using HelloForms.ViewModels;
8 |
9 | namespace HelloForms.Views
10 | {
11 | public partial class ItemDetailPage : ContentPage
12 | {
13 | ItemDetailViewModel viewModel;
14 |
15 | public ItemDetailPage(ItemDetailViewModel viewModel)
16 | {
17 | InitializeComponent();
18 |
19 | BindingContext = this.viewModel = viewModel;
20 | }
21 |
22 | public ItemDetailPage()
23 | {
24 | InitializeComponent();
25 |
26 | var item = new Item
27 | {
28 | Text = "Item 1",
29 | Description = "This is an item description."
30 | };
31 |
32 | viewModel = new ItemDetailViewModel(item);
33 | BindingContext = viewModel;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Praeclarum.MacCatalyst/Praeclarum.MacCatalyst.BuildTask.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | true
6 | enable
7 | true
8 | preview
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | PreserveNewest
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/NewItemPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Xaml;
6 |
7 | using HelloForms.Models;
8 |
9 | namespace HelloForms.Views
10 | {
11 | public partial class NewItemPage : ContentPage
12 | {
13 | public Item Item { get; set; }
14 |
15 | public NewItemPage()
16 | {
17 | InitializeComponent();
18 |
19 | Item = new Item
20 | {
21 | Text = "Item name",
22 | Description = "This is an item description."
23 | };
24 |
25 | BindingContext = this;
26 | }
27 |
28 | async void Save_Clicked(object sender, EventArgs e)
29 | {
30 | MessagingCenter.Send(this, "AddItem", Item);
31 | await Navigation.PopModalAsync();
32 | }
33 |
34 | async void Cancel_Clicked(object sender, EventArgs e)
35 | {
36 | await Navigation.PopModalAsync();
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Sdk/maccat.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "maccat", "maccat.csproj", "{D86CF60D-FEA8-401A-8F7C-979EDED495B1}"
5 | EndProject
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{182390EB-E7CD-44CD-8C8E-AF1EC95D3CEE}"
7 | ProjectSection(SolutionItems) = preProject
8 | ..\README.md = ..\README.md
9 | EndProjectSection
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Any CPU = Debug|Any CPU
14 | Release|Any CPU = Release|Any CPU
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {D86CF60D-FEA8-401A-8F7C-979EDED495B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {D86CF60D-FEA8-401A-8F7C-979EDED495B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {D86CF60D-FEA8-401A-8F7C-979EDED495B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {D86CF60D-FEA8-401A-8F7C-979EDED495B1}.Release|Any CPU.Build.0 = Release|Any CPU
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleName
6 | Hello.macOS
7 | CFBundleIdentifier
8 | com.companyname.Hello-macOS
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1
13 | LSMinimumSystemVersion
14 | 10.15
15 | CFBundleDevelopmentRegion
16 | en
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | NSHumanReadableCopyright
24 |
25 | NSPrincipalClass
26 | NSApplication
27 | NSMainStoryboardFile
28 | Main
29 | XSAppIconAssets
30 | Assets.xcassets/AppIcon.appiconset
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) Frank A. Krueger
4 |
5 | All rights reserved.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/ViewController.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using System;
3 | using UIKit;
4 |
5 | namespace Hello.iOS
6 | {
7 | public partial class ViewController : UIViewController
8 | {
9 | public ViewController(IntPtr handle) : base(handle)
10 | {
11 | Console.WriteLine ("Created ViewController");
12 | }
13 |
14 | public override void ViewDidLoad()
15 | {
16 | base.ViewDidLoad();
17 | Console.WriteLine ("ViewController ViewLoaded");
18 | // Perform any additional setup after loading the view, typically from a nib.
19 | var label = new UILabel {
20 | Text = "Hello James from Mac Catalyst",
21 | Font = UIFont.SystemFontOfSize (44),
22 | };
23 | label.Frame = View.Bounds;
24 | label.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;
25 | label.BackgroundColor = UIColor.Blue;
26 | View.AddSubview (label);
27 | }
28 |
29 | public override void DidReceiveMemoryWarning()
30 | {
31 | base.DidReceiveMemoryWarning();
32 | // Release any cached data, images, etc that aren't in use.
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace HelloForms.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 13.0
25 | CFBundleDisplayName
26 | HelloForms
27 | CFBundleIdentifier
28 | com.companyname.HelloForms
29 | CFBundleVersion
30 | 1.0
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | CFBundleName
34 | HelloForms
35 | XSAppIconAssets
36 | Assets.xcassets/AppIcon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Praeclarum.MacCatalyst.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Praeclarum.MacCatalyst
5 | 1.0-beta3
6 | Praeclarum.MacCatalyst
7 | praeclarum
8 | praeclarum
9 | LICENSE.txt
10 | false
11 | Convert your Xamarin.iOS apps to Mac Catalyst apps by adding this nuget.
12 | maccatalyst,mac,catalyst,xamarin,ios,praeclarum,uikit
13 | https://github.com/praeclarum/Praeclarum.MacCatalyst
14 |
15 | images\Icon.jpg
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Praeclarum.MacCatalyst/Praeclarum.MacCatalyst.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | $(CompileDependsOn);
9 | PraeclarumMacCatalystTarget
10 |
11 |
12 |
13 |
16 |
17 | <_PraeclarumMacCatalystTargetAlreadyExecuted>true
18 |
19 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import "AppDelegate.h"
9 |
10 | @interface AppDelegate ()
11 |
12 | @end
13 |
14 | @implementation AppDelegate
15 |
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
18 | // Override point for customization after application launch.
19 | return YES;
20 | }
21 |
22 |
23 | #pragma mark - UISceneSession lifecycle
24 |
25 |
26 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
27 | // Called when a new scene session is being created.
28 | // Use this method to select a configuration to create the new scene with.
29 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
30 | }
31 |
32 |
33 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions {
34 | // Called when the user discards a scene session.
35 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
36 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
37 | }
38 |
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/ItemsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Xamarin.Forms;
8 | using Xamarin.Forms.Xaml;
9 |
10 | using HelloForms.Models;
11 | using HelloForms.Views;
12 | using HelloForms.ViewModels;
13 |
14 | namespace HelloForms.Views
15 | {
16 | public partial class ItemsPage : ContentPage
17 | {
18 | ItemsViewModel viewModel;
19 |
20 | public ItemsPage()
21 | {
22 | InitializeComponent();
23 |
24 | BindingContext = viewModel = new ItemsViewModel();
25 |
26 | var v = new SkiaSharp.Views.Forms.SKCanvasView ();
27 | v.BackgroundColor = Color.Beige;
28 | Foo.Children.Add (v);
29 | }
30 |
31 | async void OnItemSelected(object sender, EventArgs args)
32 | {
33 | var layout = (BindableObject)sender;
34 | var item = (Item)layout.BindingContext;
35 | await Navigation.PushAsync(new ItemDetailPage(new ItemDetailViewModel(item)));
36 | }
37 |
38 | async void AddItem_Clicked(object sender, EventArgs e)
39 | {
40 | await Navigation.PushModalAsync(new NavigationPage(new NewItemPage()));
41 | }
42 |
43 | protected override void OnAppearing()
44 | {
45 | base.OnAppearing();
46 |
47 | if (viewModel.Items.Count == 0)
48 | viewModel.IsBusy = true;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 |
2 |
3 | RELEASE_DIR = ./release_out
4 |
5 | SDK_NAME = maccat-sdk-$(shell date "+%Y%m%d").zip
6 |
7 | XAMARIN_MACIOS = /Users/fak/Projects/xamarin-macios
8 |
9 | IN_XAMARIN_DLL = $(XAMARIN_MACIOS)/_maccat-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll
10 | HACKED_XAMARIN_DLL = $(TMPDIR)/Xamarin.iOS.dll
11 |
12 | all:
13 |
14 | release: $(RELEASE_DIR) $(HACKED_XAMARIN_DLL)
15 | rm -rf $(RELEASE_DIR)/*
16 | dotnet publish Sdk/maccat.csproj
17 | cp -a README.md maccat.sh ./Sdk/catmain.m ./Sdk/bin/Debug/netcoreapp3.1/publish/maccat.dll ./Sdk/bin/Debug/netcoreapp3.1/publish/maccat.runtimeconfig.json $(RELEASE_DIR)
18 | mkdir -p $(RELEASE_DIR)/xamarin-maccat
19 | cp -a $(XAMARIN_MACIOS)/_maccat-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/SDKs/Xamarin.macOSCatalyst.sdk $(RELEASE_DIR)/xamarin-maccat
20 | cp -a $(HACKED_XAMARIN_DLL) $(RELEASE_DIR)/xamarin-maccat
21 |
22 | release_zip: release
23 | mkdir -p ./Releases
24 | rm -rf maccat-sdk ./Releases/$(SDK_NAME)
25 | cd $(RELEASE_DIR) && zip -r ../Releases/$(SDK_NAME) *
26 | rm -rf ./Praeclarum.MacCatalyst/maccat-sdk*.zip
27 | cp ./Releases/$(SDK_NAME) ./Praeclarum.MacCatalyst
28 |
29 | $(HACKED_XAMARIN_DLL): $(IN_XAMARIN_DLL)
30 | fsharpi --exec ./Sdk/FixEnums.fsx
31 |
32 | $(RELEASE_DIR):
33 | mkdir -p $@
34 |
35 | nuget: release_zip
36 | dotnet build -c Release Praeclarum.MacCatalyst/Praeclarum.MacCatalyst.BuildTask.csproj
37 | rm -f _._
38 | touch _._
39 | nuget pack Praeclarum.MacCatalyst.nuspec
40 | rm _._
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Hello.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Hello.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Research/iOS-Sim-main.m:
--------------------------------------------------------------------------------
1 | #include "xamarin/xamarin.h"
2 |
3 |
4 | void xamarin_register_modules_impl ()
5 | {
6 |
7 | }
8 |
9 | void xamarin_register_assemblies_impl ()
10 | {
11 | guint32 exception_gchandle = 0;
12 |
13 | }
14 |
15 | extern "C" void xamarin_create_classes_Xamarin_iOS();
16 | void xamarin_setup_impl ()
17 | {
18 | xamarin_create_classes_Xamarin_iOS();
19 |
20 | mono_dllmap_insert (NULL, "System.Native", NULL, "__Internal", NULL);
21 | mono_dllmap_insert (NULL, "System.Security.Cryptography.Native.Apple", NULL, "__Internal", NULL);
22 | mono_dllmap_insert (NULL, "System.Net.Security.Native", NULL, "__Internal", NULL);
23 |
24 | xamarin_init_mono_debug = FALSE;
25 | xamarin_executable_name = "Hello.iOS.exe";
26 | mono_use_llvm = FALSE;
27 | xamarin_log_level = 4;
28 | xamarin_arch_name = "x86_64";
29 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
30 | setenv ("MONO_GC_PARAMS", "nursery-size=512k,major=marksweep-conc", 1);
31 | xamarin_supports_dynamic_registration = TRUE;
32 | }
33 |
34 | int main (int argc, char **argv)
35 | {
36 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
37 | int rv = xamarin_main (argc, argv, XamarinLaunchModeApp);
38 | [pool drain];
39 | return rv;
40 | }
41 |
42 | void xamarin_initialize_callbacks () __attribute__ ((constructor));
43 | void xamarin_initialize_callbacks ()
44 | {
45 | xamarin_setup = xamarin_setup_impl;
46 | xamarin_register_assemblies = xamarin_register_assemblies_impl;
47 | xamarin_register_modules = xamarin_register_modules_impl;
48 | }
49 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("HelloForms.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("HelloForms.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/ItemsPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "AppIcon-16.png",
5 | "size": "16x16",
6 | "scale": "1x",
7 | "idiom": "mac"
8 | },
9 | {
10 | "filename": "AppIcon-16@2x.png",
11 | "size": "16x16",
12 | "scale": "2x",
13 | "idiom": "mac"
14 | },
15 | {
16 | "filename": "AppIcon-32.png",
17 | "size": "32x32",
18 | "scale": "1x",
19 | "idiom": "mac"
20 | },
21 | {
22 | "filename": "AppIcon-32@2x.png",
23 | "size": "32x32",
24 | "scale": "2x",
25 | "idiom": "mac"
26 | },
27 | {
28 | "filename": "AppIcon-128.png",
29 | "size": "128x128",
30 | "scale": "1x",
31 | "idiom": "mac"
32 | },
33 | {
34 | "filename": "AppIcon-128@2x.png",
35 | "size": "128x128",
36 | "scale": "2x",
37 | "idiom": "mac"
38 | },
39 | {
40 | "filename": "AppIcon-256.png",
41 | "size": "256x256",
42 | "scale": "1x",
43 | "idiom": "mac"
44 | },
45 | {
46 | "filename": "AppIcon-256@2x.png",
47 | "size": "256x256",
48 | "scale": "2x",
49 | "idiom": "mac"
50 | },
51 | {
52 | "filename": "AppIcon-512.png",
53 | "size": "512x512",
54 | "scale": "1x",
55 | "idiom": "mac"
56 | },
57 | {
58 | "filename": "AppIcon-512@2x.png",
59 | "size": "512x512",
60 | "scale": "2x",
61 | "idiom": "mac"
62 | }
63 | ],
64 | "info": {
65 | "version": 1,
66 | "author": "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Research/HelloForms/ViewModels/ItemsViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.ObjectModel;
3 | using System.Diagnostics;
4 | using System.Threading.Tasks;
5 |
6 | using Xamarin.Forms;
7 |
8 | using HelloForms.Models;
9 | using HelloForms.Views;
10 |
11 | namespace HelloForms.ViewModels
12 | {
13 | public class ItemsViewModel : BaseViewModel
14 | {
15 | public ObservableCollection- Items { get; set; }
16 | public Command LoadItemsCommand { get; set; }
17 |
18 | public ItemsViewModel()
19 | {
20 | Title = "Browse";
21 | Items = new ObservableCollection
- ();
22 | LoadItemsCommand = new Command(async () => await ExecuteLoadItemsCommand());
23 |
24 | MessagingCenter.Subscribe(this, "AddItem", async (obj, item) =>
25 | {
26 | var newItem = item as Item;
27 | Items.Add(newItem);
28 | await DataStore.AddItemAsync(newItem);
29 | });
30 | }
31 |
32 | async Task ExecuteLoadItemsCommand()
33 | {
34 | IsBusy = true;
35 |
36 | try
37 | {
38 | Items.Clear();
39 | var items = await DataStore.GetItemsAsync(true);
40 | foreach (var item in items)
41 | {
42 | Items.Add(item);
43 | }
44 | }
45 | catch (Exception ex)
46 | {
47 | Debug.WriteLine(ex);
48 | }
49 | finally
50 | {
51 | IsBusy = false;
52 | }
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Sdk/catmain.m:
--------------------------------------------------------------------------------
1 | #include "xamarin/xamarin.h"
2 |
3 |
4 | void xamarin_register_modules_impl ()
5 | {
6 |
7 | }
8 |
9 | void xamarin_register_assemblies_impl ()
10 | {
11 | guint32 exception_gchandle = 0;
12 |
13 | }
14 |
15 | // void mono_trace_set_level (int);
16 | extern int mono_internal_current_level;
17 |
18 | extern "C" void xamarin_create_classes();
19 | void xamarin_setup_impl ()
20 | {
21 | mono_jit_set_aot_mode (MONO_AOT_MODE_NONE);
22 | // xamarin_create_classes();
23 |
24 | mono_dllmap_insert (NULL, "System.Native", NULL, "__Internal", NULL);
25 | mono_dllmap_insert (NULL, "System.Security.Cryptography.Native.Apple", NULL, "__Internal", NULL);
26 | mono_dllmap_insert (NULL, "System.Net.Security.Native", NULL, "__Internal", NULL);
27 |
28 | xamarin_init_mono_debug = FALSE;
29 | xamarin_executable_name = APP_EXECUTABLE_NAME;
30 | mono_use_llvm = FALSE;
31 | xamarin_log_level = 8;
32 | // mono_trace_set_level (0xFF);
33 | mono_internal_current_level = 0xFFFFFF;
34 | xamarin_arch_name = "x86_64";
35 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
36 | setenv ("MONO_GC_PARAMS", "nursery-size=512k,major=marksweep-conc", 1);
37 | xamarin_supports_dynamic_registration = TRUE;
38 | }
39 |
40 | int main (int argc, char **argv)
41 | {
42 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
43 | int rv = xamarin_main (argc, argv, XamarinLaunchModeApp);
44 | [pool drain];
45 | return rv;
46 | }
47 |
48 | void xamarin_initialize_callbacks () __attribute__ ((constructor));
49 | void xamarin_initialize_callbacks ()
50 | {
51 | xamarin_setup = xamarin_setup_impl;
52 | xamarin_register_assemblies = xamarin_register_assemblies_impl;
53 | xamarin_register_modules = xamarin_register_modules_impl;
54 | }
55 |
--------------------------------------------------------------------------------
/Research/MyBuild/catmain.m:
--------------------------------------------------------------------------------
1 | #include "xamarin/xamarin.h"
2 |
3 |
4 | void xamarin_register_modules_impl ()
5 | {
6 |
7 | }
8 |
9 | void xamarin_register_assemblies_impl ()
10 | {
11 | guint32 exception_gchandle = 0;
12 |
13 | }
14 |
15 | // void mono_trace_set_level (int);
16 | extern int mono_internal_current_level;
17 |
18 | extern "C" void xamarin_create_classes();
19 | void xamarin_setup_impl ()
20 | {
21 | mono_jit_set_aot_mode (MONO_AOT_MODE_NONE);
22 | // xamarin_create_classes();
23 |
24 | mono_dllmap_insert (NULL, "System.Native", NULL, "__Internal", NULL);
25 | mono_dllmap_insert (NULL, "System.Security.Cryptography.Native.Apple", NULL, "__Internal", NULL);
26 | mono_dllmap_insert (NULL, "System.Net.Security.Native", NULL, "__Internal", NULL);
27 |
28 | xamarin_init_mono_debug = FALSE;
29 | xamarin_executable_name = "Hello.iOS.exe";
30 | mono_use_llvm = FALSE;
31 | xamarin_log_level = 8;
32 | // mono_trace_set_level (0xFF);
33 | mono_internal_current_level = 0xFFFFFF;
34 | xamarin_arch_name = "x86_64";
35 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
36 | setenv ("MONO_GC_PARAMS", "nursery-size=512k,major=marksweep-conc", 1);
37 | xamarin_supports_dynamic_registration = TRUE;
38 | }
39 |
40 | int main (int argc, char **argv)
41 | {
42 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
43 | int rv = xamarin_main (argc, argv, XamarinLaunchModeApp);
44 | [pool drain];
45 | return rv;
46 | }
47 |
48 | void xamarin_initialize_callbacks () __attribute__ ((constructor));
49 | void xamarin_initialize_callbacks ()
50 | {
51 | xamarin_setup = xamarin_setup_impl;
52 | xamarin_register_assemblies = xamarin_register_assemblies_impl;
53 | xamarin_register_modules = xamarin_register_modules_impl;
54 | }
55 |
--------------------------------------------------------------------------------
/Research/MyBuild/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 | set -x
5 | set -u
6 |
7 | # INPUT VARIABLES
8 | APPNAME="Hello.macOS"
9 | PROJDIR="/Users/fak/Dropbox/Projects/Catalyst/Research/Hello.macOS"
10 |
11 | # ENVIRONMENT VARIABLES
12 | CLANG=$(xcrun -f clang)
13 | XAMMACDIR="/Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2"
14 |
15 | # COMPUTED VARIABLED
16 | GENCODEDIR="$PROJDIR/obj/Release/mmp-cache"
17 | OUTDIR="$PROJDIR/bin/Release/$APPNAME.app/Contents/MacOS"
18 | CFLAGS="-mmacosx-version-min=10.15 -arch x86_64 -fobjc-runtime=macosx-10.15 -Wno-unguarded-availability-new -std=c++14 -ObjC"
19 | CFLAGS2="-lz -liconv -lc++ -x objective-c++ -stdlib=libc++"
20 | CFLAGS3="-fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
21 | DEFINES="-D_THREAD_SAFE"
22 | FRAMEWORKS="-framework AppKit -framework Foundation -framework Security -framework Carbon -framework GSS"
23 | XAMMACLIB="$XAMMACDIR/lib/libxammac.a"
24 | US="-u _SystemNative_ConvertErrorPlatformToPal -u _SystemNative_ConvertErrorPalToPlatform -u _SystemNative_StrErrorR -u _SystemNative_GetNonCryptographicallySecureRandomBytes -u _SystemNative_Stat2 -u _SystemNative_LStat2 -u _xamarin_timezone_get_local_name -u _xamarin_timezone_get_data -u _xamarin_find_protocol_wrapper_type -u _xamarin_get_block_descriptor"
25 | OUT="$OUTDIR/$APPNAME"
26 | INCLUDES="-I$XAMMACDIR/include/mono-2.0 -I$XAMMACDIR/include"
27 | LINKS="$XAMMACDIR/lib/libmonosgen-2.0.a $XAMMACDIR/lib/libmono-native-unified.a"
28 | COMPILES="$GENCODEDIR/registrar.m macmain.m"
29 |
30 | # COMPILE AND LINK
31 | echo Building $APPNAME
32 |
33 | $CLANG $CFLAGS $FRAMEWORKS $US $XAMMACLIB -o $OUT $DEFINES $INCLUDES $LINKS $CFLAGS2 $COMPILES $CFLAGS3
34 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Research/HelloForms/ViewModels/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Runtime.CompilerServices;
5 |
6 | using Xamarin.Forms;
7 |
8 | using HelloForms.Models;
9 | using HelloForms.Services;
10 |
11 | namespace HelloForms.ViewModels
12 | {
13 | public class BaseViewModel : INotifyPropertyChanged
14 | {
15 | public IDataStore
- DataStore => DependencyService.Get>();
16 |
17 | bool isBusy = false;
18 | public bool IsBusy
19 | {
20 | get { return isBusy; }
21 | set { SetProperty(ref isBusy, value); }
22 | }
23 |
24 | string title = string.Empty;
25 | public string Title
26 | {
27 | get { return title; }
28 | set { SetProperty(ref title, value); }
29 | }
30 |
31 | protected bool SetProperty(ref T backingStore, T value,
32 | [CallerMemberName] string propertyName = "",
33 | Action onChanged = null)
34 | {
35 | if (EqualityComparer.Default.Equals(backingStore, value))
36 | return false;
37 |
38 | backingStore = value;
39 | onChanged?.Invoke();
40 | OnPropertyChanged(propertyName);
41 | return true;
42 | }
43 |
44 | #region INotifyPropertyChanged
45 | public event PropertyChangedEventHandler PropertyChanged;
46 | protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
47 | {
48 | var changed = PropertyChanged;
49 | if (changed == null)
50 | return;
51 |
52 | changed.Invoke(this, new PropertyChangedEventArgs(propertyName));
53 | }
54 | #endregion
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Research/iOS-Device-main.m:
--------------------------------------------------------------------------------
1 | #include "xamarin/xamarin.h"
2 |
3 | extern void *mono_aot_module_Hello_iOS_info;
4 | extern void *mono_aot_module_mscorlib_info;
5 | extern void *mono_aot_module_Xamarin_iOS_info;
6 | extern void *mono_aot_module_System_info;
7 |
8 | void xamarin_register_modules_impl ()
9 | {
10 | mono_aot_register_module (mono_aot_module_Hello_iOS_info);
11 | mono_aot_register_module (mono_aot_module_mscorlib_info);
12 | mono_aot_register_module (mono_aot_module_Xamarin_iOS_info);
13 | mono_aot_register_module (mono_aot_module_System_info);
14 |
15 | }
16 |
17 | void xamarin_register_assemblies_impl ()
18 | {
19 | guint32 exception_gchandle = 0;
20 |
21 | }
22 |
23 | extern "C" void xamarin_create_classes();
24 | void xamarin_setup_impl ()
25 | {
26 | mono_jit_set_aot_mode (MONO_AOT_MODE_FULL);
27 | xamarin_create_classes();
28 |
29 | mono_dllmap_insert (NULL, "System.Native", NULL, "__Internal", NULL);
30 | mono_dllmap_insert (NULL, "System.Security.Cryptography.Native.Apple", NULL, "__Internal", NULL);
31 | mono_dllmap_insert (NULL, "System.Net.Security.Native", NULL, "__Internal", NULL);
32 |
33 | xamarin_init_mono_debug = FALSE;
34 | xamarin_executable_name = "Hello.iOS.exe";
35 | mono_use_llvm = FALSE;
36 | xamarin_log_level = 4;
37 | xamarin_arch_name = "arm64";
38 | xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDisable;
39 | setenv ("MONO_GC_PARAMS", "nursery-size=512k,major=marksweep-conc", 1);
40 | xamarin_supports_dynamic_registration = FALSE;
41 | }
42 |
43 | int main (int argc, char **argv)
44 | {
45 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
46 | int rv = xamarin_main (argc, argv, XamarinLaunchModeApp);
47 | [pool drain];
48 | return rv;
49 | }
50 |
51 | void xamarin_initialize_callbacks () __attribute__ ((constructor));
52 | void xamarin_initialize_callbacks ()
53 | {
54 | xamarin_setup = xamarin_setup_impl;
55 | xamarin_register_assemblies = xamarin_register_assemblies_impl;
56 | xamarin_register_modules = xamarin_register_modules_impl;
57 | }
58 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Foundation;
3 | using UIKit;
4 |
5 | namespace Hello.iOS
6 | {
7 | // The UIApplicationDelegate for the application. This class is responsible for launching the
8 | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
9 | [Register("AppDelegate")]
10 | public class AppDelegate : UIResponder, IUIApplicationDelegate
11 | {
12 |
13 | public AppDelegate (IntPtr handle)
14 | : base (handle)
15 | {
16 | Console.WriteLine ("Created app delegate");
17 | }
18 |
19 | [Export("window")]
20 | public UIWindow Window { get; set; }
21 |
22 | [Export("application:didFinishLaunchingWithOptions:")]
23 | public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
24 | {
25 | // Override point for customization after application launch.
26 | // If not required for your application you can safely delete this method
27 | return true;
28 | }
29 |
30 | // UISceneSession Lifecycle
31 |
32 | [Export("application:configurationForConnectingSceneSession:options:")]
33 | public UISceneConfiguration GetConfiguration(UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)
34 | {
35 | // Called when a new scene session is being created.
36 | // Use this method to select a configuration to create the new scene with.
37 | return UISceneConfiguration.Create("Default Configuration", connectingSceneSession.Role);
38 | }
39 |
40 | [Export("application:didDiscardSceneSessions:")]
41 | public void DidDiscardSceneSessions(UIApplication application, NSSet sceneSessions)
42 | {
43 | // Called when the user discards a scene session.
44 | // If any sessions were discarded while the application was not running, this will be called shortly after `FinishedLaunching`.
45 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
46 | }
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 | UISceneConfigurations
28 |
29 | UIWindowSceneSessionRoleApplication
30 |
31 |
32 | UISceneConfigurationName
33 | Default Configuration
34 | UISceneDelegateClassName
35 | SceneDelegate
36 | UISceneStoryboardFile
37 | Main
38 |
39 |
40 |
41 |
42 | UIApplicationSupportsIndirectInputEvents
43 |
44 | UILaunchStoryboardName
45 | LaunchScreen
46 | UIMainStoryboardFile
47 | Main
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 | UISupportedInterfaceOrientations~ipad
59 |
60 | UIInterfaceOrientationPortrait
61 | UIInterfaceOrientationPortraitUpsideDown
62 | UIInterfaceOrientationLandscapeLeft
63 | UIInterfaceOrientationLandscapeRight
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/Research/HelloForms/Services/MockDataStore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using HelloForms.Models;
6 |
7 | namespace HelloForms.Services
8 | {
9 | public class MockDataStore : IDataStore
-
10 | {
11 | readonly List
- items;
12 |
13 | public MockDataStore()
14 | {
15 | items = new List
- ()
16 | {
17 | new Item { Id = Guid.NewGuid().ToString(), Text = "First item", Description="This is an item description." },
18 | new Item { Id = Guid.NewGuid().ToString(), Text = "Second item", Description="This is an item description." },
19 | new Item { Id = Guid.NewGuid().ToString(), Text = "Third item", Description="This is an item description." },
20 | new Item { Id = Guid.NewGuid().ToString(), Text = "Fourth item", Description="This is an item description." },
21 | new Item { Id = Guid.NewGuid().ToString(), Text = "Fifth item", Description="This is an item description." },
22 | new Item { Id = Guid.NewGuid().ToString(), Text = "Sixth item", Description="This is an item description." }
23 | };
24 | }
25 |
26 | public async Task AddItemAsync(Item item)
27 | {
28 | items.Add(item);
29 |
30 | return await Task.FromResult(true);
31 | }
32 |
33 | public async Task UpdateItemAsync(Item item)
34 | {
35 | var oldItem = items.Where((Item arg) => arg.Id == item.Id).FirstOrDefault();
36 | items.Remove(oldItem);
37 | items.Add(item);
38 |
39 | return await Task.FromResult(true);
40 | }
41 |
42 | public async Task DeleteItemAsync(string id)
43 | {
44 | var oldItem = items.Where((Item arg) => arg.Id == id).FirstOrDefault();
45 | items.Remove(oldItem);
46 |
47 | return await Task.FromResult(true);
48 | }
49 |
50 | public async Task
- GetItemAsync(string id)
51 | {
52 | return await Task.FromResult(items.FirstOrDefault(s => s.Id == id));
53 | }
54 |
55 | public async Task> GetItemsAsync(bool forceRefresh = false)
56 | {
57 | return await Task.FromResult(items);
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/SceneDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.m
3 | // HelloObjC
4 | //
5 | // Created by Frank A. Krueger on 10/10/20.
6 | //
7 |
8 | #import "SceneDelegate.h"
9 |
10 | @interface SceneDelegate ()
11 |
12 | @end
13 |
14 | @implementation SceneDelegate
15 |
16 |
17 | - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
21 | }
22 |
23 |
24 | - (void)sceneDidDisconnect:(UIScene *)scene {
25 | // Called as the scene is being released by the system.
26 | // This occurs shortly after the scene enters the background, or when its session is discarded.
27 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
28 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
29 | }
30 |
31 |
32 | - (void)sceneDidBecomeActive:(UIScene *)scene {
33 | // Called when the scene has moved from an inactive state to an active state.
34 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
35 | }
36 |
37 |
38 | - (void)sceneWillResignActive:(UIScene *)scene {
39 | // Called when the scene will move from an active state to an inactive state.
40 | // This may occur due to temporary interruptions (ex. an incoming phone call).
41 | }
42 |
43 |
44 | - (void)sceneWillEnterForeground:(UIScene *)scene {
45 | // Called as the scene transitions from the background to the foreground.
46 | // Use this method to undo the changes made on entering the background.
47 | }
48 |
49 |
50 | - (void)sceneDidEnterBackground:(UIScene *)scene {
51 | // Called as the scene transitions from the foreground to the background.
52 | // Use this method to save data, release shared resources, and store enough scene-specific state information
53 | // to restore the scene back to its current state.
54 | }
55 |
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | Hello.iOS
7 | CFBundleIdentifier
8 | com.companyname.Hello-iOS
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | UIApplicationSceneManifest
16 |
17 | UIApplicationSupportsMultipleScenes
18 |
19 | UISceneConfigurations
20 |
21 | UIWindowSceneSessionRoleApplication
22 |
23 |
24 | UISceneConfigurationName
25 | Default Configuration
26 | UISceneDelegateClassName
27 | SceneDelegate
28 | UISceneStoryboardFile
29 | Main
30 |
31 |
32 |
33 |
34 | MinimumOSVersion
35 | 14.0
36 | UIDeviceFamily
37 |
38 | 1
39 | 2
40 |
41 | UILaunchStoryboardName
42 | LaunchScreen
43 | UIMainStoryboardFile
44 | Main
45 | UIMainStoryboardFile~ipad
46 | Main
47 | UIRequiredDeviceCapabilities
48 |
49 | armv7
50 |
51 | UISupportedInterfaceOrientations
52 |
53 | UIInterfaceOrientationPortrait
54 | UIInterfaceOrientationLandscapeLeft
55 | UIInterfaceOrientationLandscapeRight
56 |
57 | UISupportedInterfaceOrientations~ipad
58 |
59 | UIInterfaceOrientationPortrait
60 | UIInterfaceOrientationPortraitUpsideDown
61 | UIInterfaceOrientationLandscapeLeft
62 | UIInterfaceOrientationLandscapeRight
63 |
64 | XSAppIconAssets
65 | Assets.xcassets/AppIcon.appiconset
66 |
67 |
--------------------------------------------------------------------------------
/Sdk/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace MacCatSdk
7 | {
8 | class Program
9 | {
10 | static async Task Main (string[] args)
11 | {
12 | var projFile = "";
13 | var wantsHelp = false;
14 | var config = "Release";
15 | var platform = "iPhoneSimulator";
16 | var run = true;
17 | var argc = args.Length;
18 | for (var i = 0; i < argc; i++) {
19 | var a = args[i];
20 | if (a.EndsWith ("proj", StringComparison.InvariantCultureIgnoreCase)) {
21 | projFile = a;
22 | }
23 | else if (a == "-c" || a == "--configuration" && i + 1 < argc) {
24 | config = args[i + 1];
25 | i++;
26 | }
27 | else if (a == "-h" || a == "--help") {
28 | wantsHelp = true;
29 | }
30 | else if (a == "--no-run") {
31 | run = false;
32 | }
33 | else if (a == "-p" || a == "--platform" && i + 1 < argc) {
34 | platform = args[i + 1];
35 | i++;
36 | }
37 | }
38 | if (wantsHelp || string.IsNullOrEmpty (projFile)) {
39 | Console.ResetColor ();
40 | Console.WriteLine ($"Usage: maccat project-file");
41 | Console.WriteLine ($"");
42 | Console.WriteLine ($"Example: maccat /Users/me/Projects/MyApp/MyApp.csproj");
43 | Console.WriteLine ($"");
44 | Console.WriteLine ($"Options:");
45 | Console.WriteLine ($" -c, --configuration The configuration to build from. The default is '{config}'.");
46 | Console.WriteLine ($" -h, --help Show command line help.");
47 | Console.WriteLine ($" --no-run Don't run then app after building.");
48 | Console.WriteLine ($" -p, --platform The platform to build from. The default is '{platform}'.");
49 | return wantsHelp ? 0 : 1;
50 | }
51 |
52 | Console.ForegroundColor = ConsoleColor.Cyan;
53 | Console.WriteLine ("Xamarin.iOS to Mac Catalyst Converter BETA");
54 | Console.ResetColor ();
55 |
56 | if (!File.Exists (projFile)) {
57 | Console.ForegroundColor = ConsoleColor.Red;
58 | Console.WriteLine ($"Could not locate {projFile}");
59 | return 2;
60 | }
61 |
62 | try {
63 | await (new BuildApp (projFile, config, platform, run, ".")).RunAsync ();
64 | return 0;
65 |
66 | }
67 | catch (Exception ex) {
68 | Console.ForegroundColor = ConsoleColor.Red;
69 | Console.WriteLine (ex.Message);
70 | Console.ForegroundColor = ConsoleColor.DarkGray;
71 | Console.WriteLine (ex);
72 | return 10;
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Research/MyBuild/mcat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 | # set -x
5 | set -u
6 |
7 | # INPUT VARIABLES
8 | APPNAME="Hello.iOS"
9 | PROJDIR="/Users/fak/Dropbox/Projects/Catalyst/Research/Hello.iOS"
10 |
11 | ASSEMBLIES_DIR="$PROJDIR/obj/iPhone/Release/mtouch-cache/1-Link"
12 | LINKED_ASSEMBLIES_DIR="$PROJDIR/obj/iPhone/Release/mtouch-cache/3-Build"
13 |
14 | APP_DIR="Hi.app"
15 |
16 | REGISTRAR_DIR="$PROJDIR/obj/iPhone/Release/mtouch-cache"
17 | REGISTRAR_SOURCE="$REGISTRAR_DIR/registrar.m"
18 |
19 | # ENVIRONMENT VARIABLES
20 | CLANG=$(xcrun -f clang)
21 | XAMMACDIR="/Library/Frameworks/Xamarin.Mac.framework/Versions/6.20.2.2"
22 | XAMMACCATDIR="/Users/fak/Projects/xamarin-macios/_maccat-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/SDKs/Xamarin.macOSCatalyst.sdk"
23 | MONOMACCATDIR="/Users/fak/Projects/mono/sdks/out/maccat-mac64-release"
24 | MACSDK="/Applications/Xcode_12.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
25 |
26 | # COMPUTED VARIABLED
27 | CFLAGS="-target x86_64-apple-ios13.6-macabi -Wno-unguarded-availability-new -std=c++14 -ObjC"
28 | CFLAGS2="-lz -liconv -lc++ -x objective-c++ -stdlib=libc++"
29 | CFLAGS3="-fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot $MACSDK"
30 | DEFINES="-D_THREAD_SAFE"
31 | # FRAMEWORKS="-framework AppKit -framework Foundation -framework Security -framework Carbon -framework GSS"
32 | FRAMEWORKS="-iframework $MACSDK/System/iOSSupport/System/Library/Frameworks -framework Foundation -framework UIKit"
33 | XAMMACLIB="$XAMMACCATDIR/lib/libxammaccat.a"
34 | US="-u _SystemNative_ConvertErrorPlatformToPal -u _SystemNative_ConvertErrorPalToPlatform -u _SystemNative_StrErrorR -u _SystemNative_GetNonCryptographicallySecureRandomBytes -u _SystemNative_Stat2 -u _SystemNative_LStat2 -u _xamarin_timezone_get_local_name -u _xamarin_timezone_get_data -u _xamarin_find_protocol_wrapper_type -u _xamarin_get_block_descriptor"
35 | OUT="$APP_DIR/Contents/MacOS/$APPNAME"
36 | INCLUDES="-I$MONOMACCATDIR/include/mono-2.0 -I$XAMMACCATDIR/include"
37 | LINKS="$MONOMACCATDIR/lib/libmonosgen-2.0.a $MONOMACCATDIR/lib/libmono-native.a"
38 | COMPILES="catmain.m"
39 |
40 | # COMPILE AND LINK
41 | echo Building $APPNAME
42 |
43 | $CLANG $CFLAGS $FRAMEWORKS $US $XAMMACLIB -o $OUT $DEFINES $INCLUDES $LINKS $CFLAGS2 $COMPILES $CFLAGS3
44 |
45 | echo Built $OUT
46 |
47 | rm -f "$APP_DIR/Contents/MonoBundle/"*.dll
48 | rm -f "$APP_DIR/Contents/MonoBundle/"*.exe
49 | cp "$ASSEMBLIES_DIR"/*.dll "$ASSEMBLIES_DIR"/*.exe "$APP_DIR/Contents/MonoBundle/"
50 | cp "/Users/fak/Projects/xamarin-macios/src/build/ios/native-64"/Xamarin.iOS.dll "$APP_DIR/Contents/MonoBundle/"
51 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone",
7 | "filename": "Icon40.png"
8 | },
9 | {
10 | "scale": "3x",
11 | "size": "20x20",
12 | "idiom": "iphone",
13 | "filename": "Icon60.png"
14 | },
15 | {
16 | "scale": "2x",
17 | "size": "29x29",
18 | "idiom": "iphone",
19 | "filename": "Icon58.png"
20 | },
21 | {
22 | "scale": "3x",
23 | "size": "29x29",
24 | "idiom": "iphone",
25 | "filename": "Icon87.png"
26 | },
27 | {
28 | "scale": "2x",
29 | "size": "40x40",
30 | "idiom": "iphone",
31 | "filename": "Icon80.png"
32 | },
33 | {
34 | "scale": "3x",
35 | "size": "40x40",
36 | "idiom": "iphone",
37 | "filename": "Icon120.png"
38 | },
39 | {
40 | "scale": "2x",
41 | "size": "60x60",
42 | "idiom": "iphone",
43 | "filename": "Icon120.png"
44 | },
45 | {
46 | "scale": "3x",
47 | "size": "60x60",
48 | "idiom": "iphone",
49 | "filename": "Icon180.png"
50 | },
51 | {
52 | "scale": "1x",
53 | "size": "20x20",
54 | "idiom": "ipad",
55 | "filename": "Icon20.png"
56 | },
57 | {
58 | "scale": "2x",
59 | "size": "20x20",
60 | "idiom": "ipad",
61 | "filename": "Icon40.png"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "29x29",
66 | "idiom": "ipad",
67 | "filename": "Icon29.png"
68 | },
69 | {
70 | "scale": "2x",
71 | "size": "29x29",
72 | "idiom": "ipad",
73 | "filename": "Icon58.png"
74 | },
75 | {
76 | "scale": "1x",
77 | "size": "40x40",
78 | "idiom": "ipad",
79 | "filename": "Icon40.png"
80 | },
81 | {
82 | "scale": "2x",
83 | "size": "40x40",
84 | "idiom": "ipad",
85 | "filename": "Icon80.png"
86 | },
87 | {
88 | "scale": "1x",
89 | "size": "76x76",
90 | "idiom": "ipad",
91 | "filename": "Icon76.png"
92 | },
93 | {
94 | "scale": "2x",
95 | "size": "76x76",
96 | "idiom": "ipad",
97 | "filename": "Icon152.png"
98 | },
99 | {
100 | "scale": "2x",
101 | "size": "83.5x83.5",
102 | "idiom": "ipad",
103 | "filename": "Icon167.png"
104 | },
105 | {
106 | "scale": "1x",
107 | "size": "1024x1024",
108 | "idiom": "ios-marketing",
109 | "filename": "Icon1024.png"
110 | }
111 | ],
112 | "properties": {},
113 | "info": {
114 | "version": 1,
115 | "author": "xcode"
116 | }
117 | }
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone",
7 | "filename": "Icon40.png"
8 | },
9 | {
10 | "scale": "3x",
11 | "size": "20x20",
12 | "idiom": "iphone",
13 | "filename": "Icon60.png"
14 | },
15 | {
16 | "scale": "2x",
17 | "size": "29x29",
18 | "idiom": "iphone",
19 | "filename": "Icon58.png"
20 | },
21 | {
22 | "scale": "3x",
23 | "size": "29x29",
24 | "idiom": "iphone",
25 | "filename": "Icon87.png"
26 | },
27 | {
28 | "scale": "2x",
29 | "size": "40x40",
30 | "idiom": "iphone",
31 | "filename": "Icon80.png"
32 | },
33 | {
34 | "scale": "3x",
35 | "size": "40x40",
36 | "idiom": "iphone",
37 | "filename": "Icon120.png"
38 | },
39 | {
40 | "scale": "2x",
41 | "size": "60x60",
42 | "idiom": "iphone",
43 | "filename": "Icon120.png"
44 | },
45 | {
46 | "scale": "3x",
47 | "size": "60x60",
48 | "idiom": "iphone",
49 | "filename": "Icon180.png"
50 | },
51 | {
52 | "scale": "1x",
53 | "size": "20x20",
54 | "idiom": "ipad",
55 | "filename": "Icon20.png"
56 | },
57 | {
58 | "scale": "2x",
59 | "size": "20x20",
60 | "idiom": "ipad",
61 | "filename": "Icon40.png"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "29x29",
66 | "idiom": "ipad",
67 | "filename": "Icon29.png"
68 | },
69 | {
70 | "scale": "2x",
71 | "size": "29x29",
72 | "idiom": "ipad",
73 | "filename": "Icon58.png"
74 | },
75 | {
76 | "scale": "1x",
77 | "size": "40x40",
78 | "idiom": "ipad",
79 | "filename": "Icon40.png"
80 | },
81 | {
82 | "scale": "2x",
83 | "size": "40x40",
84 | "idiom": "ipad",
85 | "filename": "Icon80.png"
86 | },
87 | {
88 | "scale": "1x",
89 | "size": "76x76",
90 | "idiom": "ipad",
91 | "filename": "Icon76.png"
92 | },
93 | {
94 | "scale": "2x",
95 | "size": "76x76",
96 | "idiom": "ipad",
97 | "filename": "Icon152.png"
98 | },
99 | {
100 | "scale": "2x",
101 | "size": "83.5x83.5",
102 | "idiom": "ipad",
103 | "filename": "Icon167.png"
104 | },
105 | {
106 | "scale": "1x",
107 | "size": "1024x1024",
108 | "idiom": "ios-marketing",
109 | "filename": "Icon1024.png"
110 | }
111 | ],
112 | "properties": {},
113 | "info": {
114 | "version": 1,
115 | "author": "xcode"
116 | }
117 | }
--------------------------------------------------------------------------------
/Research/Hello.iOS/SceneDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Foundation;
3 | using UIKit;
4 |
5 | namespace NewSingleViewTemplate
6 | {
7 | [Register("SceneDelegate")]
8 | public class SceneDelegate : UIResponder, IUIWindowSceneDelegate
9 | {
10 |
11 | [Export("window")]
12 | public UIWindow Window { get; set; }
13 |
14 | [Export("scene:willConnectToSession:options:")]
15 | public void WillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
16 | {
17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
19 | // This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead).
20 | }
21 |
22 | [Export("sceneDidDisconnect:")]
23 | public void DidDisconnect(UIScene scene)
24 | {
25 | // Called as the scene is being released by the system.
26 | // This occurs shortly after the scene enters the background, or when its session is discarded.
27 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
28 | // The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead).
29 | }
30 |
31 | [Export("sceneDidBecomeActive:")]
32 | public void DidBecomeActive(UIScene scene)
33 | {
34 | // Called when the scene has moved from an inactive state to an active state.
35 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
36 | }
37 |
38 | [Export("sceneWillResignActive:")]
39 | public void WillResignActive(UIScene scene)
40 | {
41 | // Called when the scene will move from an active state to an inactive state.
42 | // This may occur due to temporary interruptions (ex. an incoming phone call).
43 | }
44 |
45 | [Export("sceneWillEnterForeground:")]
46 | public void WillEnterForeground(UIScene scene)
47 | {
48 | // Called as the scene transitions from the background to the foreground.
49 | // Use this method to undo the changes made on entering the background.
50 | }
51 |
52 | [Export("sceneDidEnterBackground:")]
53 | public void DidEnterBackground(UIScene scene)
54 | {
55 | // Called as the scene transitions from the foreground to the background.
56 | // Use this method to save data, release shared resources, and store enough scene-specific state information
57 | // to restore the scene back to its current state.
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Research/HelloObjC/HelloObjC/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 19H2
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | HelloObjC
11 | CFBundleIdentifier
12 | com.kruegersystems.HelloObjC
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | HelloObjC
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSupportedPlatforms
22 |
23 | MacOSX
24 |
25 | CFBundleVersion
26 | 1
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 12A7209
31 | DTPlatformName
32 | macosx
33 | DTPlatformVersion
34 | 10.15.6
35 | DTSDKBuild
36 | 19G68
37 | DTSDKName
38 | macosx10.15
39 | DTXcode
40 | 1200
41 | DTXcodeBuild
42 | 12A7209
43 | LSMinimumSystemVersion
44 | 10.15.6
45 | NSSupportsAutomaticTermination
46 |
47 | NSSupportsSuddenTermination
48 |
49 | UIApplicationSceneManifest
50 |
51 | UIApplicationSupportsMultipleScenes
52 |
53 | UISceneConfigurations
54 |
55 | UIWindowSceneSessionRoleApplication
56 |
57 |
58 | UISceneConfigurationName
59 | Default Configuration
60 | UISceneDelegateClassName
61 | SceneDelegate
62 | UISceneStoryboardFile
63 | Main
64 |
65 |
66 |
67 |
68 | UIApplicationSupportsIndirectInputEvents
69 |
70 | UIDeviceFamily
71 |
72 | 2
73 |
74 | UILaunchStoryboardName
75 | LaunchScreen
76 | UIMainStoryboardFile
77 | Main
78 | UIRequiredDeviceCapabilities
79 |
80 | armv7
81 |
82 | UISupportedInterfaceOrientations
83 |
84 | UIInterfaceOrientationPortrait
85 | UIInterfaceOrientationLandscapeLeft
86 | UIInterfaceOrientationLandscapeRight
87 |
88 | UISupportedInterfaceOrientations~ipad
89 |
90 | UIInterfaceOrientationPortrait
91 | UIInterfaceOrientationPortraitUpsideDown
92 | UIInterfaceOrientationLandscapeLeft
93 | UIInterfaceOrientationLandscapeRight
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/Praeclarum.MacCatalyst/BuildTask.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.IO.Compression;
4 | using System.Linq;
5 | using maccat;
6 | using MacCatSdk;
7 | using Microsoft.Build.Framework;
8 | using Microsoft.Build.Utilities;
9 | using static maccat.Terminal;
10 |
11 | namespace Praeclarum.MacCatalyst
12 | {
13 | public class PraeclarumMacCatalystBuildTask : Task
14 | {
15 | public string SdkPath { get; set; } = "";
16 | public string ProjectFile { get; set; } = "";
17 | public string ProjectAssemblyName { get; set; } = "";
18 | public string ProjectOutputPath { get; set; } = "";
19 | public string Configuration { get; set; } = "";
20 | public string Platform { get; set; } = "";
21 | public string CodesignEntitlements { get; set; } = "";
22 | public string CodesignProvision { get; set; } = "";
23 | public string CodesignKey { get; set; } = "";
24 | public bool Enabled { get; set; } = true;
25 | public bool Run { get; set; } = false;
26 | public ITaskItem[] InputFiles { get; set; } = Array.Empty ();
27 |
28 | public override bool Execute ()
29 | {
30 | InfoFunc = m => Log.LogMessage (m);
31 | WarningFunc = m => Log.LogWarning (m);
32 | ErrorFunc = m => Log.LogError (m);
33 | try {
34 | Info ("Thanks for using Praeclarum.MacCatalyst. You can sponsor my work at: https://github.com/sponsors/praeclarum");
35 | if (!Enabled) {
36 | Info ("Not enabled. Set MacCatalystEnabled=true to enable.");
37 | return true;
38 | }
39 | var sdkPath = ExpandSdk ();
40 | var builder = new BuildApp (ProjectFile, Configuration, Platform, Run, sdkPath, ProjectAssemblyName, ProjectOutputPath) {
41 | CodesignEntitlements = CodesignEntitlements,
42 | CodesignKey = CodesignKey,
43 | CodesignProvision = CodesignProvision
44 | };
45 | builder.RunAsync ().Wait ();
46 | return true;
47 | }
48 | catch (Exception ex) {
49 | while (ex.InnerException != null)
50 | ex = ex.InnerException;
51 | Log.LogErrorFromException (ex);
52 | return false;
53 | }
54 | }
55 |
56 | string ExpandSdk ()
57 | {
58 | var asm = GetType ().Assembly;
59 | var names = asm.GetManifestResourceNames ();
60 | var name = names.FirstOrDefault (x => x.Contains("maccat-sdk-") && x.EndsWith (".zip"));
61 | if (!string.IsNullOrEmpty (name)) {
62 | var simpleName = Path.GetFileNameWithoutExtension (name[name.IndexOf ("maccat-sdk-")..]);
63 |
64 | var sdkPath = Path.Combine (Path.GetTempPath (), simpleName);
65 | var sdkTestFilePath = Path.Combine (sdkPath, "xamarin-maccat", "Xamarin.iOS.dll");
66 | var sdkExists = File.Exists (sdkTestFilePath);
67 | if (sdkExists)
68 | return sdkPath;
69 |
70 | Info ($"Installing SDK in \"{sdkPath}\".");
71 |
72 | using var zips = asm.GetManifestResourceStream (name);
73 |
74 | using var zip = new ZipArchive (zips, ZipArchiveMode.Read);
75 | zip.ExtractToDirectory (sdkPath, true);
76 |
77 | sdkExists = File.Exists (sdkTestFilePath);
78 | if (sdkExists)
79 | return sdkPath;
80 |
81 | throw new InvalidOperationException ("SDK failed to extract");
82 | }
83 | throw new InvalidOperationException ($"Failed to find SDK in {asm.Location}");
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/Catalyst.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Praeclarum.MacCatalyst.BuildTask", "Praeclarum.MacCatalyst\Praeclarum.MacCatalyst.BuildTask.csproj", "{6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F79AC26A-A272-437E-AF0A-0DAA7FED643B}"
9 | ProjectSection(SolutionItems) = preProject
10 | global.json = global.json
11 | EndProjectSection
12 | EndProject
13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "maccat", "Sdk\maccat.csproj", "{ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}"
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Debug|x64 = Debug|x64
19 | Debug|x86 = Debug|x86
20 | Release|Any CPU = Release|Any CPU
21 | Release|x64 = Release|x64
22 | Release|x86 = Release|x86
23 | EndGlobalSection
24 | GlobalSection(SolutionProperties) = preSolution
25 | HideSolutionNode = FALSE
26 | EndGlobalSection
27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
28 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|x64.ActiveCfg = Debug|Any CPU
31 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|x64.Build.0 = Debug|Any CPU
32 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|x86.ActiveCfg = Debug|Any CPU
33 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Debug|x86.Build.0 = Debug|Any CPU
34 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|x64.ActiveCfg = Release|Any CPU
37 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|x64.Build.0 = Release|Any CPU
38 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|x86.ActiveCfg = Release|Any CPU
39 | {6EC9AF00-0D52-4B6B-9BF0-A3A583651F72}.Release|x86.Build.0 = Release|Any CPU
40 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|x64.ActiveCfg = Debug|Any CPU
43 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|x64.Build.0 = Debug|Any CPU
44 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|x86.ActiveCfg = Debug|Any CPU
45 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Debug|x86.Build.0 = Debug|Any CPU
46 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|Any CPU.Build.0 = Release|Any CPU
48 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|x64.ActiveCfg = Release|Any CPU
49 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|x64.Build.0 = Release|Any CPU
50 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|x86.ActiveCfg = Release|Any CPU
51 | {ED99F6DC-4D7C-42FD-A6BE-C3A0C4629765}.Release|x86.Build.0 = Release|Any CPU
52 | EndGlobalSection
53 | EndGlobal
54 |
--------------------------------------------------------------------------------
/Research/HelloForms/Views/AboutPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | #2196F3
9 | #96d1ff
10 | #999999
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
38 |
50 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Praeclarum.MacCatalyst
2 |
3 | [[nuget](https://www.nuget.org/packages/Praeclarum.MacCatalyst/)]
4 |
5 | Mac Catalyst support for Xamarin.iOS by Frank A. Krueger.
6 |
7 | I am very pleased to provide this tool that will convert your iOS apps to
8 | Mac Catalyst apps. It is still an early version and some things may not
9 | work, but I have had a lot of success with my own apps.
10 |
11 |
12 |
13 | ## Requirements
14 |
15 | * macOS 10.15
16 | * .NET Core 3.1
17 | * Xamarin.iOS
18 |
19 | Verify that you have a Xcode's command line tools installed and the appropriate Xcode
20 | selected using:
21 |
22 | ```bash
23 | xcode-select --print-path
24 | ```
25 |
26 | If that fails or is incorrect, you can set your version with:
27 |
28 | ```bash
29 | sudo xcode-select --switch /Applications/Xcode.app
30 | ```
31 |
32 | ## Installation
33 |
34 | Add the nuget [Praeclarum.MacCatalyst](https://www.nuget.org/packages/Praeclarum.MacCatalyst/) to your iOS project.
35 |
36 | ```xml
37 |
38 | ```
39 |
40 | That's it! Whenever you build, a Mac Catalyst version of your app will be put in:
41 |
42 | ```
43 | bin/Platform/Configuration/Praeclarum.MacCatalyst/App.app
44 | ```
45 |
46 | ### Autorun
47 |
48 | To automatically run the Mac Catalyst app whenever you build your app, set:
49 |
50 | ```xml
51 | true
52 | ```
53 |
54 | in a `PropertyGroup` in your project file.
55 |
56 | ### Enabling and disabling
57 |
58 | Mac Catalyst is enabled by default. To disable it set:
59 |
60 | ```xml
61 | false
62 | ```
63 |
64 | in a `PropertyGroup` in your project file.
65 |
66 | ### Crash Details
67 |
68 | If your app crashes when running, it can be useful to see its output from the command line.
69 | You can do this by running its executable directly:
70 |
71 | ```bash
72 | /App.app/Contents/MacOS/App
73 | ```
74 |
75 |
76 | ## App Store
77 |
78 | Archiving and signing are not yet supported, but I hope to get that working soon.
79 |
80 | You can probably do it manually at the command line, but I haven't figured the incantations out yet.
81 |
82 |
83 | ## Known Issues
84 |
85 | * **AOT is not supported** Your code will run using the mono JIT.
86 |
87 | * **Static registrar is not supported** Startup times are a little slow because the ObjC bridge has to be dynamically created.
88 |
89 | * **Native code is not supported** The native binaries for Catalyst apps do not exactly match iOS or Mac binaries. This means libraries that ship with native code do not work.
90 |
91 | * **AppCenter doesn't work** This is due to native SDKs not working. You may see an error like: `System.Exception: Could not create an native instance of the type 'Microsoft.AppCenter.iOS.Bindings.MSWrapperSdk': the native class hasn't been loaded.`
92 |
93 | * **Extensions do not work**
94 |
95 | * **Signing and Entitlements do not work**
96 |
97 |
98 | ## How it Works
99 |
100 | This tool takes your already-compiled Xamarin.iOS .app and converts it to a macOS app by:
101 |
102 | 1. Recompiling your main.m linking against Mac Catalyst builds of Xamarin and mono
103 | 2. Modify external native library dependencies to run on macOS.
104 | 3. Repackaging your .app to match the layout of a macOS .app
105 |
106 | Step 2 is only performed for libraries compiled with old versions of Xcode.
107 | It's only possible thanks to the wonderful work of [Steven Troughton-Smith and his Marzipanify tool](https://github.com/steventroughtonsmith/marzipanify).
108 |
109 |
110 | ## Contributing
111 |
112 | You are welcome to contribute! Please open a PR.
113 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Resources/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Sdk/Terminal.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Threading.Tasks;
4 |
5 | namespace maccat
6 | {
7 | public static class Terminal
8 | {
9 | static string CLANG = "clang";
10 | static string AR = "ar";
11 |
12 | public static Action? InfoFunc;
13 | public static Action? WarningFunc;
14 | public static Action? ErrorFunc;
15 |
16 | public static void Info (string message)
17 | {
18 | if (InfoFunc != null) {
19 | InfoFunc (message);
20 | }
21 | else {
22 | Console.ResetColor ();
23 | Console.WriteLine (message);
24 | }
25 | }
26 |
27 | public static void Warning (string message)
28 | {
29 | if (WarningFunc != null) {
30 | WarningFunc (message);
31 | }
32 | else {
33 | Console.ForegroundColor = ConsoleColor.Yellow;
34 | Console.WriteLine (message);
35 | Console.ResetColor ();
36 | }
37 | }
38 |
39 | public static async Task FindToolPathsAsync ()
40 | {
41 | //
42 | // ENVIRONMENT VARIABLES
43 | //
44 | try {
45 | CLANG = await ExecAsync ("xcrun", "-f clang", showOutput: false, showError: false);
46 | AR = await ExecAsync ("xcrun", "-f ar", showOutput: false, showError: false);
47 | }
48 | catch {
49 | throw new Exception ($"Couldn't find Xcode tools. Please run: sudo xcode-select --switch /Applications/Xcode.app");
50 | }
51 | }
52 |
53 | public static Task ArAsync (string arguments, bool throwOnError = true, bool showOutput = true, bool showError = false, string? cd = null) =>
54 | ExecAsync (AR, arguments,
55 | throwOnError: throwOnError, showOutput: showOutput, showError: showError, cd: cd);
56 |
57 | public static Task ClangAsync (string arguments, bool throwOnError = true, bool showOutput = true, bool showError = true, string? cd = null) =>
58 | ExecAsync (CLANG, "-target x86_64-apple-ios13.0-macabi " + arguments,
59 | throwOnError: throwOnError, showOutput: showOutput, showError: showError, cd: cd);
60 |
61 | public static async Task ExecAsync (string fileName, string arguments, bool throwOnError = true, bool showOutput = true, bool showError = true, string? cd = null, bool waitForExit = true)
62 | {
63 | //Console.WriteLine ("{0} {1}", fileName, arguments);
64 | var si = new System.Diagnostics.ProcessStartInfo (fileName, arguments);
65 | if (!string.IsNullOrEmpty (cd))
66 | si.WorkingDirectory = cd;
67 |
68 | if (!waitForExit) {
69 | System.Diagnostics.Process.Start (si);
70 | return "";
71 | }
72 |
73 | si.UseShellExecute = false;
74 | si.RedirectStandardOutput = true;
75 | si.RedirectStandardError = true;
76 | var p = System.Diagnostics.Process.Start (si);
77 | string? line;
78 | var sb = new StringBuilder ();
79 | var sbe = new StringBuilder ();
80 | var readOutTask = Task.Run (async () => {
81 | while ((line = await p.StandardOutput.ReadLineAsync ()) != null) {
82 | sb.Append (line);
83 | if (showOutput) {
84 | Console.ForegroundColor = line.Contains ("error", StringComparison.InvariantCultureIgnoreCase) ? ConsoleColor.Red : ConsoleColor.DarkGray;
85 | Console.WriteLine (line);
86 | }
87 | }
88 | });
89 | var readErrorTask = Task.Run (async () => {
90 | while ((line = await p.StandardError.ReadLineAsync ()) != null) {
91 | sbe.Append (line);
92 | if (showError) {
93 | if (ErrorFunc != null) {
94 | ErrorFunc (line);
95 | }
96 | else {
97 | Console.ForegroundColor = ConsoleColor.Red;
98 | Console.WriteLine (line);
99 | }
100 | }
101 | }
102 | });
103 | p.WaitForExit ();
104 | await readOutTask;
105 | await readErrorTask;
106 | if (throwOnError && p.ExitCode != 0)
107 | throw new Exception ($"{fileName} failed with exit code {p.ExitCode}");
108 | if (showOutput)
109 | Console.ResetColor ();
110 | return sb.ToString ();
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/Research/Hello.macOS/Hello.macOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}
7 | {A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Exe
9 | Hello.macOS
10 | Hello.macOS
11 | v2.0
12 | Xamarin.Mac
13 | Resources
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug
20 | DEBUG;
21 | prompt
22 | 4
23 | false
24 | Mac Developer
25 | false
26 | false
27 | false
28 | true
29 | true
30 | true
31 | HttpClientHandler
32 | None
33 | x86_64
34 | None
35 |
36 |
37 | true
38 | bin\Release
39 |
40 | prompt
41 | 4
42 | false
43 | true
44 | false
45 | true
46 | true
47 | true
48 | Entitlements.plist
49 | SdkOnly
50 | HttpClientHandler
51 | x86_64
52 | -v -v -v -v
53 | None
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | ViewController.cs
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/Sdk/FixEnums.fsx:
--------------------------------------------------------------------------------
1 | open System
2 | open System.IO
3 |
4 | //
5 | // Make a working copy
6 | //
7 | let XAMARIN_MACIOS = "/Users/fak/Projects/xamarin-macios"
8 |
9 | let origPath =
10 | Path.Combine
11 | (XAMARIN_MACIOS,
12 | "_maccat-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll")
13 |
14 | let workingPath = Path.Combine(Path.GetTempPath(), "Xamarin.iOS.dll")
15 |
16 | File.Delete(workingPath)
17 | File.Copy(origPath, workingPath, overwrite = true)
18 |
19 | File.Exists(workingPath)
20 |
21 | //
22 | // Open the assembly
23 | //
24 | #r "/Users/fak/.nuget/packages/mono.cecil/0.11.2/lib/netstandard2.0/Mono.Cecil.dll"
25 | #r "/Users/fak/.nuget/packages/mono.cecil/0.11.2/lib/netstandard2.0/Mono.Cecil.Rocks.dll"
26 |
27 | open Mono.Cecil
28 | open Mono.Cecil.Rocks
29 | open Mono.Cecil.Cil
30 |
31 | let asmStream = File.Open(workingPath, FileMode.Open, FileAccess.ReadWrite)
32 | let asm = AssemblyDefinition.ReadAssembly(asmStream)
33 |
34 | let types = asm.MainModule.Types.ToArray()
35 |
36 | let t = types |> Seq.find (fun x -> x.Name = "UIImageResizingMode")
37 |
38 | let ms =
39 | (types |> Seq.find (fun x -> x.Name = "UIImage")).Methods
40 | |> Seq.map (fun x -> x.Name)
41 | |> Array.ofSeq
42 |
43 |
44 | //
45 | // Look for methods that use the enum things
46 | //
47 |
48 | let isInterestingEnum (t : TypeReference) =
49 | t.FullName = "UIKit.UITextAlignment" || t.FullName = "UIKit.UIImageResizingMode"
50 |
51 | let methodUsesEnum (m : MethodDefinition) =
52 | isInterestingEnum m.ReturnType || m.Parameters |> Seq.exists (fun p -> isInterestingEnum p.ParameterType)
53 |
54 |
55 | let usesEnum (t : TypeDefinition) =
56 | t.Methods
57 | |> Seq.filter (fun x -> x.HasBody)
58 | |> Seq.exists methodUsesEnum
59 |
60 | let typesThatUseTheEnum =
61 | types
62 | |> Seq.filter usesEnum
63 | |> Array.ofSeq
64 |
65 | //
66 | // Modify the methods
67 | //
68 |
69 |
70 | // ldarg.3
71 | // ...
72 | //
73 | //
74 | // start: ldarg.3
75 | // bne 1 test_2:
76 | // ld 2
77 | // b end:
78 | // test_2: ldarg.3
79 | // bne 2 reload:
80 | // ld 1
81 | // b end:
82 | // reload: ldarg.3
83 | // end: ..
84 |
85 | let modifyParameterValues (method : MethodDefinition) (param : ParameterDefinition) =
86 | //printfn "MODIFYING PARAM %s.%s/%s" method.DeclaringType.Name method.Name param.Name
87 |
88 | let body = method.Body
89 | let il = body.GetILProcessor()
90 |
91 | let mutable ip = 0
92 |
93 | let argIndex =
94 | if method.IsStatic then param.Index
95 | else param.Index + 1
96 | //printfn "! %s = ldarg.%O" param.Name argIndex
97 |
98 | while ip < body.Instructions.Count do
99 | let ins = body.Instructions.[ip]
100 |
101 | let isLdarg =
102 | match ins.OpCode.Code with
103 | | Mono.Cecil.Cil.Code.Ldarg_0 -> 0 = argIndex
104 | | Mono.Cecil.Cil.Code.Ldarg_1 -> 1 = argIndex
105 | | Mono.Cecil.Cil.Code.Ldarg_2 -> 2 = argIndex
106 | | Mono.Cecil.Cil.Code.Ldarg_3 -> 3 = argIndex
107 | | Mono.Cecil.Cil.Code.Ldarg_S -> System.Object.ReferenceEquals(ins.Operand, param)
108 | | Mono.Cecil.Cil.Code.Ldarg -> (ins.Operand :?> int) = argIndex
109 | | _ -> false
110 | if isLdarg then
111 | let clone() = il.Create(OpCodes.Ldarg_S, param)
112 | let start = clone()
113 | let test2 = clone()
114 | let reload = ins
115 | let endi = ins.Next
116 |
117 | let code =
118 | [| start
119 | il.Create(OpCodes.Ldc_I8, 1L)
120 | il.Create(OpCodes.Bne_Un, test2)
121 | il.Create(OpCodes.Ldc_I8, 2L)
122 | il.Create(OpCodes.Br, endi)
123 | test2
124 | il.Create(OpCodes.Ldc_I8, 2L)
125 | il.Create(OpCodes.Bne_Un, reload)
126 | il.Create(OpCodes.Ldc_I8, 1L)
127 | il.Create(OpCodes.Br, endi)
128 | |]
129 | for c in code do
130 | il.InsertBefore(ins, c)
131 | //printfn " FOUND %O" ins
132 | //printfn " FOUND %O\n%A" ins code
133 | ip <- ip + code.Length + 1
134 | else ip <- ip + 1
135 |
136 | body.MaxStackSize <- body.MaxStackSize + 1
137 | body.Optimize()
138 |
139 | let modifyType (t : TypeDefinition) =
140 | for m in t.Methods do
141 | for p in m.Parameters do
142 | if isInterestingEnum p.ParameterType then modifyParameterValues m p
143 |
144 | typesThatUseTheEnum |> Seq.iter modifyType
145 |
146 |
147 | asm.Write()
148 |
--------------------------------------------------------------------------------
/Research/HelloObjC.app/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | Resources/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
8 |
9 | LlgffNQ2Sgbu4AWEqbhOLYR6i8k=
10 |
11 | Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist
12 |
13 | n2t8gsDpfE6XkhG31p7IQJRxTxU=
14 |
15 | Resources/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
16 |
17 | RCKhjVDfZTa/gz5q/OMGtH0CC8A=
18 |
19 | Resources/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
20 |
21 | qvS0gBCts8OE6jXUvain2ew6aeM=
22 |
23 | Resources/Base.lproj/Main.storyboardc/Info.plist
24 |
25 | MDrKFvFWroTb0+KEbQShBcoBvo4=
26 |
27 | Resources/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
28 |
29 | j66O/x3KdhMioMU8FaAu9YFs/eo=
30 |
31 |
32 | files2
33 |
34 | Resources/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
35 |
36 | hash2
37 |
38 | QGUCiSaNYVZrx7EVH2EIAdv8btjINyBwQpCislC14hg=
39 |
40 |
41 | Resources/Base.lproj/LaunchScreen.storyboardc/Info.plist
42 |
43 | hash2
44 |
45 | HyVdXMU7Ux4/KalAao30mpWOK/lEPT4gvYN09wf31cg=
46 |
47 |
48 | Resources/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
49 |
50 | hash2
51 |
52 | E4md4wyqdDqBiWMzIG/QTygcEKrDYfjSoDWawjYc8Vk=
53 |
54 |
55 | Resources/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
56 |
57 | hash2
58 |
59 | CDl2dHljivVfP1DCkpXnmMMMpvSXR3VYCA/zlrhoqhk=
60 |
61 |
62 | Resources/Base.lproj/Main.storyboardc/Info.plist
63 |
64 | hash2
65 |
66 | PpvapAjR62rl6Ym4E6hkTgpKmBICxTaQXeUqcpHmmqQ=
67 |
68 |
69 | Resources/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
70 |
71 | hash2
72 |
73 | /Iuittr325RhyijnhpxTQRvBck4njuxp34TvqLUUTk0=
74 |
75 |
76 |
77 | rules
78 |
79 | ^Resources/
80 |
81 | ^Resources/.*\.lproj/
82 |
83 | optional
84 |
85 | weight
86 | 1000
87 |
88 | ^Resources/.*\.lproj/locversion.plist$
89 |
90 | omit
91 |
92 | weight
93 | 1100
94 |
95 | ^Resources/Base\.lproj/
96 |
97 | weight
98 | 1010
99 |
100 | ^version.plist$
101 |
102 |
103 | rules2
104 |
105 | .*\.dSYM($|/)
106 |
107 | weight
108 | 11
109 |
110 | ^(.*/)?\.DS_Store$
111 |
112 | omit
113 |
114 | weight
115 | 2000
116 |
117 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
118 |
119 | nested
120 |
121 | weight
122 | 10
123 |
124 | ^.*
125 |
126 | ^Info\.plist$
127 |
128 | omit
129 |
130 | weight
131 | 20
132 |
133 | ^PkgInfo$
134 |
135 | omit
136 |
137 | weight
138 | 20
139 |
140 | ^Resources/
141 |
142 | weight
143 | 20
144 |
145 | ^Resources/.*\.lproj/
146 |
147 | optional
148 |
149 | weight
150 | 1000
151 |
152 | ^Resources/.*\.lproj/locversion.plist$
153 |
154 | omit
155 |
156 | weight
157 | 1100
158 |
159 | ^Resources/Base\.lproj/
160 |
161 | weight
162 | 1010
163 |
164 | ^[^/]+$
165 |
166 | nested
167 |
168 | weight
169 | 10
170 |
171 | ^embedded\.provisionprofile$
172 |
173 | weight
174 | 20
175 |
176 | ^version\.plist$
177 |
178 | weight
179 | 20
180 |
181 |
182 |
183 |
184 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Default settings:
7 | # A newline ending every file
8 | # Use 4 spaces as indentation
9 | [*]
10 | insert_final_newline = true
11 | indent_style = space
12 | indent_size = 4
13 | end_of_line = lf
14 |
15 | [project.json]
16 | indent_size = 2
17 |
18 | # C# files
19 | [*.cs]
20 | end_of_line = lf
21 | indent_style = tab
22 | tab_width = 4
23 |
24 | # New line preferences
25 | csharp_new_line_before_open_brace = methods, types
26 | csharp_new_line_before_else = true
27 | csharp_new_line_before_catch = true
28 | csharp_new_line_before_finally = true
29 | csharp_new_line_before_members_in_object_initializers = true
30 | csharp_new_line_before_members_in_anonymous_types = true
31 | csharp_new_line_within_query_expression_clauses = true
32 |
33 | # Indentation preferences
34 | csharp_indent_block_contents = true
35 | csharp_indent_braces = false
36 | csharp_indent_case_contents = true
37 | csharp_indent_switch_labels = true
38 | csharp_indent_labels = flush_left
39 |
40 | # avoid this. unless absolutely necessary
41 | dotnet_style_qualification_for_field = false:suggestion
42 | dotnet_style_qualification_for_property = false:suggestion
43 | dotnet_style_qualification_for_method = false:suggestion
44 | dotnet_style_qualification_for_event = false:suggestion
45 |
46 | # only use var when it's obvious what the variable type is
47 | csharp_style_var_for_built_in_types = true:none
48 | csharp_style_var_when_type_is_apparent = true:none
49 | csharp_style_var_elsewhere = true:suggestion
50 |
51 | # use language keywords instead of BCL types
52 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
53 | dotnet_style_predefined_type_for_member_access = true:suggestion
54 |
55 | # name all constant fields using PascalCase
56 | dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
57 | dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
58 | dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
59 |
60 | dotnet_naming_symbols.constant_fields.applicable_kinds = field
61 | dotnet_naming_symbols.constant_fields.required_modifiers = const
62 |
63 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case
64 |
65 | # static fields should have s_ prefix
66 | dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
67 | dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
68 | dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
69 |
70 | dotnet_naming_symbols.static_fields.applicable_kinds = field
71 | dotnet_naming_symbols.static_fields.required_modifiers = static
72 |
73 | dotnet_naming_style.static_prefix_style.required_prefix =
74 | dotnet_naming_style.static_prefix_style.capitalization = camel_case
75 |
76 | # internal and private fields should be _camelCase
77 | dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
78 | dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
79 | dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
80 |
81 | dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
82 | dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
83 |
84 | dotnet_naming_style.camel_case_underscore_style.required_prefix =
85 | dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
86 |
87 | # Code style defaults
88 | dotnet_sort_system_directives_first = true
89 | csharp_preserve_single_line_blocks = true
90 | csharp_preserve_single_line_statements = false
91 |
92 | # Expression-level preferences
93 | dotnet_style_object_initializer = true:suggestion
94 | dotnet_style_collection_initializer = true:suggestion
95 | dotnet_style_explicit_tuple_names = true:suggestion
96 | dotnet_style_coalesce_expression = true:suggestion
97 | dotnet_style_null_propagation = true:suggestion
98 |
99 | # Expression-bodied members
100 | csharp_style_expression_bodied_methods = false:none
101 | csharp_style_expression_bodied_constructors = false:none
102 | csharp_style_expression_bodied_operators = false:none
103 | csharp_style_expression_bodied_properties = true:none
104 | csharp_style_expression_bodied_indexers = true:none
105 | csharp_style_expression_bodied_accessors = true:none
106 |
107 | # Pattern matching
108 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
109 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
110 | csharp_style_inlined_variable_declaration = true:suggestion
111 |
112 | # Null checking preferences
113 | csharp_style_throw_expression = true:suggestion
114 | csharp_style_conditional_delegate_call = true:suggestion
115 |
116 | # Space preferences
117 | csharp_space_after_cast = false
118 | csharp_space_after_colon_in_inheritance_clause = true
119 | csharp_space_after_comma = true
120 | csharp_space_after_dot = false
121 | csharp_space_after_keywords_in_control_flow_statements = true
122 | csharp_space_after_semicolon_in_for_statement = true
123 | csharp_space_around_binary_operators = before_and_after
124 | csharp_space_around_declaration_statements = do_not_ignore
125 | csharp_space_before_colon_in_inheritance_clause = true
126 | csharp_space_before_comma = false
127 | csharp_space_before_dot = false
128 | csharp_space_before_open_square_brackets = false
129 | csharp_space_before_semicolon_in_for_statement = false
130 | csharp_space_between_empty_square_brackets = false
131 | csharp_space_between_method_call_empty_parameter_list_parentheses = false
132 | csharp_space_between_method_call_name_and_opening_parenthesis = true
133 | csharp_space_between_method_call_parameter_list_parentheses = false
134 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
135 | csharp_space_between_method_declaration_name_and_open_parenthesis = true
136 | csharp_space_between_method_declaration_parameter_list_parentheses = false
137 | csharp_space_between_parentheses = false
138 | csharp_space_between_square_brackets = false
139 |
140 | # C++ Files
141 | [*.{cpp,h,in}]
142 | curly_bracket_next_line = true
143 | indent_brace_style = Allman
144 |
145 | # Xml project files
146 | [*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
147 | indent_size = 2
148 | end_of_line = crlf
149 | indent_style = space
150 |
151 | # Xml build files
152 | [*.builds]
153 | indent_size = 2
154 |
155 | # Xml files
156 | [*.{xml,stylecop,resx,ruleset}]
157 | indent_size = 2
158 |
159 | # Xml config files
160 | [*.{props,targets,config,nuspec}]
161 | indent_size = 2
162 |
163 | # Shell scripts
164 | [*.sh]
165 | end_of_line = lf
166 | [*.{cmd, bat}]
167 | end_of_line = crlf
168 |
169 | [Makefile]
170 | indent_style = tab
171 |
--------------------------------------------------------------------------------
/Research/Hello.iOS/Hello.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}
7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | {edc1b0fa-90cd-4038-8fad-98fe74adb368}
9 | Exe
10 | Hello.iOS
11 | Hello.iOS
12 | Resources
13 | true
14 | NSUrlSessionHandler
15 | PackageReference
16 | automatic
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\iPhoneSimulator\Debug
23 | DEBUG
24 | prompt
25 | 4
26 | x86_64
27 | None
28 | true
29 |
30 |
31 | none
32 | true
33 | bin\iPhoneSimulator\Release
34 | prompt
35 | 4
36 | None
37 | x86_64
38 | -v -v -v -v
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | ARM64
49 | Entitlements.plist
50 | iPhone Developer
51 | true
52 |
53 |
54 | none
55 | true
56 | bin\iPhone\Release
57 | prompt
58 | 4
59 | Entitlements.plist
60 | ARM64
61 | iPhone Developer
62 | -v -v -v -v
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | false
78 |
79 |
80 | false
81 |
82 |
83 | false
84 |
85 |
86 | false
87 |
88 |
89 | false
90 |
91 |
92 | false
93 |
94 |
95 | false
96 |
97 |
98 | false
99 |
100 |
101 | false
102 |
103 |
104 | false
105 |
106 |
107 | false
108 |
109 |
110 | false
111 |
112 |
113 | false
114 |
115 |
116 | false
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | ViewController.cs
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/Research/HelloForms.iOS/HelloForms.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | {89a4fe7c-635d-49c9-8d8c-5cd363c0d68d}
11 | Exe
12 | HelloForms.iOS
13 | Resources
14 | HelloForms.iOS
15 | true
16 | NSUrlSessionHandler
17 | automatic
18 |
19 |
20 | true
21 | full
22 | false
23 | bin\iPhoneSimulator\Debug
24 | DEBUG
25 | prompt
26 | 4
27 | x86_64
28 | SdkOnly
29 | true
30 | false
31 |
32 |
33 | none
34 | true
35 | bin\iPhoneSimulator\Release
36 | prompt
37 | 4
38 | None
39 | x86_64
40 |
41 |
42 | true
43 | full
44 | false
45 | bin\iPhone\Debug
46 | DEBUG
47 | prompt
48 | 4
49 | ARM64
50 | iPhone Developer
51 | true
52 | Entitlements.plist
53 | None
54 | -all
55 |
56 |
57 | none
58 | true
59 | bin\iPhone\Release
60 | prompt
61 | 4
62 | ARM64
63 | iPhone Developer
64 | Entitlements.plist
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | false
76 |
77 |
78 | false
79 |
80 |
81 | false
82 |
83 |
84 | false
85 |
86 |
87 | false
88 |
89 |
90 | false
91 |
92 |
93 | false
94 |
95 |
96 | false
97 |
98 |
99 | false
100 |
101 |
102 | false
103 |
104 |
105 | false
106 |
107 |
108 | false
109 |
110 |
111 | false
112 |
113 |
114 | false
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}
142 | HelloForms
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/Research/ObjC-BuildLog.txt:
--------------------------------------------------------------------------------
1 | /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/main.o /Users/fak/Dropbox/Projects/Catalyst/Research/HelloObjC/HelloObjC/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'HelloObjC' from project 'HelloObjC')
2 | cd /Users/fak/Dropbox/Projects/Catalyst/Research/HelloObjC
3 | export LANG\=en_US.US-ASCII
4 | /Applications/Xcode_12GM.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios13.6-macabi -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path\=/Users/fak/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/fak/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wquoted-include-in-framework-header -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DDEBUG\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Index/DataStore -iquote /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/HelloObjC-generated-files.hmap -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/HelloObjC-own-target-headers.hmap -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/HelloObjC-all-target-headers.hmap -iquote /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/HelloObjC-project-headers.hmap -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst/include -isystem /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/include -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/DerivedSources-normal/x86_64 -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/DerivedSources/x86_64 -I/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/DerivedSources -F/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst -iframework /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/System/Library/Frameworks -MMD -MT dependencies -MF /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/main.dia -c /Users/fak/Dropbox/Projects/Catalyst/Research/HelloObjC/HelloObjC/main.m -o /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/main.o
5 |
6 |
7 |
8 | Ld /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst/HelloObjC.app/Contents/MacOS/HelloObjC normal (in target 'HelloObjC' from project 'HelloObjC')
9 | cd /Users/fak/Dropbox/Projects/Catalyst/Research/HelloObjC
10 | /Applications/Xcode_12GM.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios13.6-macabi -isysroot /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst -L/Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/lib -L/Applications/Xcode_12GM.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/maccatalyst -L/Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/lib -L/Applications/Xcode_12GM.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/maccatalyst -F/Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst -iframework /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/System/Library/Frameworks -iframework /Applications/Xcode_12GM.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/System/Library/Frameworks -filelist /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/HelloObjC.LinkFileList -Xlinker -rpath -Xlinker @loader_path/../Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -object_path_lto -Xlinker /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/HelloObjC_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Intermediates.noindex/HelloObjC.build/Debug-maccatalyst/HelloObjC.build/Objects-normal/x86_64/HelloObjC_dependency_info.dat -o /Users/fak/Library/Developer/Xcode/DerivedData/HelloObjC-aotckjodnpgchceyqpphohdoojzu/Build/Products/Debug-maccatalyst/HelloObjC.app/Contents/MacOS/HelloObjC
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Research/CatResearch.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello.iOS", "Hello.iOS\Hello.iOS.csproj", "{11B1013C-8508-49D0-ACDC-12B9BDB9E34A}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello.macOS", "Hello.macOS\Hello.macOS.csproj", "{21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloForms.iOS", "HelloForms.iOS\HelloForms.iOS.csproj", "{76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloForms", "HelloForms\HelloForms.csproj", "{CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Debug|x64 = Debug|x64
18 | Debug|x86 = Debug|x86
19 | Release|Any CPU = Release|Any CPU
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
23 | Release|iPhoneSimulator = Release|iPhoneSimulator
24 | Debug|iPhone = Debug|iPhone
25 | Release|iPhone = Release|iPhone
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
31 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
32 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
33 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
34 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|x64.Build.0 = Debug|iPhoneSimulator
35 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
36 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|x86.Build.0 = Debug|iPhoneSimulator
37 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
38 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
39 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|x64.ActiveCfg = Release|iPhoneSimulator
40 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|x64.Build.0 = Release|iPhoneSimulator
41 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|x86.ActiveCfg = Release|iPhoneSimulator
42 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|x86.Build.0 = Release|iPhoneSimulator
43 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
44 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
45 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
46 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
47 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|iPhone.ActiveCfg = Debug|iPhone
48 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Debug|iPhone.Build.0 = Debug|iPhone
49 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|iPhone.ActiveCfg = Release|iPhone
50 | {11B1013C-8508-49D0-ACDC-12B9BDB9E34A}.Release|iPhone.Build.0 = Release|iPhone
51 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
53 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|x64.ActiveCfg = Debug|Any CPU
54 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|x64.Build.0 = Debug|Any CPU
55 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|x86.ActiveCfg = Debug|Any CPU
56 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|x86.Build.0 = Debug|Any CPU
57 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
58 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|Any CPU.Build.0 = Release|Any CPU
59 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|x64.ActiveCfg = Release|Any CPU
60 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|x64.Build.0 = Release|Any CPU
61 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|x86.ActiveCfg = Release|Any CPU
62 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|x86.Build.0 = Release|Any CPU
63 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
64 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
65 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
66 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
67 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
68 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Debug|iPhone.Build.0 = Debug|Any CPU
69 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|iPhone.ActiveCfg = Release|Any CPU
70 | {21B9ABE8-6F68-4867-9EA0-D75EE250ECF2}.Release|iPhone.Build.0 = Release|Any CPU
71 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
72 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
73 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
74 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|x64.Build.0 = Debug|iPhoneSimulator
75 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
76 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|x86.Build.0 = Debug|iPhoneSimulator
77 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
78 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
79 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|x64.ActiveCfg = Release|iPhoneSimulator
80 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|x64.Build.0 = Release|iPhoneSimulator
81 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|x86.ActiveCfg = Release|iPhoneSimulator
82 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|x86.Build.0 = Release|iPhoneSimulator
83 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
84 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
85 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
86 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
87 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|iPhone.ActiveCfg = Debug|iPhone
88 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Debug|iPhone.Build.0 = Debug|iPhone
89 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|iPhone.ActiveCfg = Release|iPhone
90 | {76355E93-06CF-4E97-BCA0-7DD4ACEDCD50}.Release|iPhone.Build.0 = Release|iPhone
91 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
92 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
93 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|x64.ActiveCfg = Debug|Any CPU
94 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|x64.Build.0 = Debug|Any CPU
95 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|x86.ActiveCfg = Debug|Any CPU
96 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|x86.Build.0 = Debug|Any CPU
97 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
98 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|Any CPU.Build.0 = Release|Any CPU
99 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|x64.ActiveCfg = Release|Any CPU
100 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|x64.Build.0 = Release|Any CPU
101 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|x86.ActiveCfg = Release|Any CPU
102 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|x86.Build.0 = Release|Any CPU
103 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
104 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
105 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
106 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
107 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
108 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Debug|iPhone.Build.0 = Debug|Any CPU
109 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|iPhone.ActiveCfg = Release|Any CPU
110 | {CA4168AA-3E71-4E7A-A781-14F1B7D4F0CD}.Release|iPhone.Build.0 = Release|Any CPU
111 | EndGlobalSection
112 | EndGlobal
113 |
--------------------------------------------------------------------------------
/Sdk/Marzipanify.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using maccat.MachO;
9 | using static maccat.Terminal;
10 |
11 | namespace maccat
12 | {
13 | ///
14 | /// Based on https://github.com/steventroughtonsmith/marzipanify/blob/master/marzipanify/main.m
15 | ///
16 | public class Marzipanify
17 | {
18 | readonly Dictionary NewDylibs = new Dictionary ();
19 | private readonly string outputAppDir;
20 |
21 | public Marzipanify (string outputAppDir)
22 | {
23 | this.outputAppDir = outputAppDir;
24 | }
25 |
26 | public async Task ModifyMachHeaderAsync (string inPath, bool injectMarzipanGlue = false, bool dryRun = false)
27 | {
28 | try {
29 | return await MarzFile (Path.GetFileName (inPath), inPath, injectMarzipanGlue: injectMarzipanGlue, dryRun: dryRun);
30 | }
31 | catch (OldXcodeException) {
32 | return "";
33 | }
34 | }
35 |
36 | async Task MarzFile (string name, string inPath, bool injectMarzipanGlue, bool dryRun)
37 | {
38 | var fileBytes = File.ReadAllBytes (inPath);
39 |
40 | var (index, length) = GetCpuHeader (fileBytes);
41 |
42 | if (GetMachMagic (fileBytes) == MH.MAGIC_64) {
43 | var dsyms = MarzMachO (name, fileBytes, index, injectMarzipanGlue: injectMarzipanGlue, dryRun: dryRun);
44 |
45 | if (!dryRun) {
46 | var outPath = Path.GetTempFileName ();
47 | File.WriteAllBytes (outPath, fileBytes);
48 | await RenameDylibsAsync (outPath, dsyms);
49 | return outPath;
50 | }
51 | return inPath;
52 | }
53 |
54 | return await MarzArchive (name, fileBytes, index, length, dryRun: dryRun);
55 | }
56 |
57 | unsafe MH GetMachMagic (byte[] fileBytes)
58 | {
59 | fixed (byte* ptr = fileBytes) {
60 | var machHeader = (mach_header_64*)ptr;
61 | return machHeader->magic;
62 | }
63 | }
64 |
65 | async Task RenameDylibsAsync (string outPath, string[] dsyms)
66 | {
67 | if (dsyms.Length == 0)
68 | return;
69 | var args = "";
70 | foreach (var d in dsyms) {
71 | args += " " + await NewLinkerPathForLoadedDylib (d);
72 | }
73 | args += $" \"{outPath}\"";
74 | await ExecAsync ("install_name_tool", args);
75 | }
76 |
77 | async Task NewLinkerPathForLoadedDylib (string loadedDylib)
78 | {
79 | if (loadedDylib.StartsWith ("/System/iOSSupport"))
80 | return "";
81 |
82 | var possibleiOSMacDylibPath = Path.Combine ("/System/iOSSupport", loadedDylib[1..]);
83 |
84 | if (File.Exists (possibleiOSMacDylibPath)) {
85 | return $"-change \"{loadedDylib}\" \"{possibleiOSMacDylibPath}\"";
86 | }
87 |
88 | if (!File.Exists (loadedDylib)) {
89 | Warning ($"The library {Path.GetFileName (loadedDylib)} is not available.");
90 | possibleiOSMacDylibPath = await MakeDummyLibraryAsync (loadedDylib);
91 | return $"-change \"{loadedDylib}\" \"@executable_path/../Frameworks/{Path.GetFileName (possibleiOSMacDylibPath)}\"";
92 | }
93 |
94 | return "";
95 | }
96 |
97 | async Task MakeDummyLibraryAsync (string loadedDylib)
98 | {
99 | await Task.Yield ();
100 |
101 | var name = Path.GetFileName (loadedDylib);
102 |
103 | if (!NewDylibs.TryGetValue (name, out var outPath)) {
104 | var outSrcPath = outPath + ".c";
105 | File.WriteAllText (outSrcPath, $@"int dummy_{name}() {{ return 42; }}");
106 | var fwsPath = Path.Combine (outputAppDir, "Contents", "Frameworks");
107 | Directory.CreateDirectory (fwsPath);
108 | outPath = Path.Combine (fwsPath, name + ".dylib");
109 | await ClangAsync ($"-dynamiclib \"{outSrcPath}\" -o \"{outPath}\"");
110 | NewDylibs[name] = outPath;
111 | }
112 |
113 | return outPath;
114 | }
115 |
116 | unsafe (int Offset, int Size) GetCpuHeader (byte[] fileBytes)
117 | {
118 | fixed (byte* fptr = fileBytes) {
119 | var ptr = fptr;
120 | var header_fat = (fat_header*)ptr;
121 |
122 | //
123 | // Read FAT if it's there
124 | //
125 | if (header_fat->magic == FAT.CIGAM || header_fat->magic == FAT.MAGIC) {
126 | int narchs = OSSwapBigToHostInt32 (header_fat->nfat_arch);
127 | ptr += sizeof (fat_header);
128 |
129 | for (int i = 0; i < narchs; i++) {
130 | var uarch = *(fat_arch*)ptr;
131 |
132 | var cpuType = (cpu_type_t)OSSwapBigToHostInt32 ((int)uarch.cputype);
133 |
134 | if (cpuType == MachO.cpu_type_t.X86_64) {
135 | //printf("mach_header_64 offset = %u\n", OSSwapBigToHostInt32(uarch.offset));
136 | return (OSSwapBigToHostInt32 (uarch.offset) - 32 + sizeof (mach_header_64), OSSwapBigToHostInt32 (uarch.size));
137 | }
138 | //else if (cpuType == MachO.cpu_type_t.ARM64) {
139 | // //printf("mach_header_64 offset = %u\n", OSSwapBigToHostInt32(uarch.offset));
140 | // header64offset = OSSwapBigToHostInt32 (uarch.offset) - 32 + sizeof (mach_header_64);
141 | // break;
142 | //}
143 | else {
144 | ptr += sizeof (fat_arch);
145 | }
146 | }
147 |
148 | throw new Exception ("ERROR: No X86_64 slice found.\n");
149 | }
150 | }
151 |
152 | // Not FAT
153 | return (0, fileBytes.Length);
154 | }
155 |
156 | async Task MarzArchive (string arName, byte[] arBuffer, int arIndex, int arLength, bool dryRun)
157 | {
158 | var arPath = Path.Combine (Path.GetTempPath (), arName);
159 | var arXPath = Path.Combine (Path.GetTempPath (), arName + ".out");
160 | await File.WriteAllBytesAsync (arPath, arBuffer[arIndex..(arIndex + arLength)]);
161 | Directory.CreateDirectory (arXPath);
162 | //Console.WriteLine ("Extracting to " + arXPath);
163 | await ArAsync ($"-o -x \"{arPath}\"", cd: arXPath);
164 |
165 | var newOPaths = new List ();
166 | foreach (var oPath in Directory.GetFiles (arXPath, "*.o")) {
167 | var newOPath = await MarzFile (arName, oPath, injectMarzipanGlue: false, dryRun: dryRun);
168 | //Console.WriteLine (newOPath);
169 | newOPaths.Add (newOPath);
170 | }
171 |
172 | var arNewPath = Path.Combine (Path.GetTempPath (), Path.GetFileNameWithoutExtension (arName) + ".catalyst.a");
173 |
174 | await ArAsync ($"-r \"{arNewPath}\" {string.Join (" ", newOPaths.Select (x => $"\"{x}\""))}");
175 |
176 | return arNewPath;
177 | }
178 |
179 | readonly HashSet ios11Errors = new HashSet ();
180 |
181 | unsafe string[] MarzMachO (string machoName, byte[] machoBuffer, int machoIndex, bool injectMarzipanGlue, bool dryRun)
182 | {
183 | var dylibs = new List ();
184 |
185 | fixed (byte* macho = machoBuffer) {
186 | var ptr = macho + machoIndex;
187 |
188 | var header64 = (mach_header_64*)ptr;
189 |
190 | if (header64->magic != MH.MAGIC_64)
191 | return Array.Empty ();
192 |
193 | ptr += sizeof (mach_header_64);
194 | var command = (load_command*)(ptr);
195 |
196 | for (int i = 0; i < header64->ncmds && header64->ncmds > 0; ++i) {
197 | if (command->cmd == LC.LOAD_DYLIB) {
198 | var ucmd = *(dylib_command*)ptr;
199 | var offset = ucmd.dylib.name_offset;
200 | var size = ucmd.cmdsize;
201 |
202 | //printf("LC_LOAD_DYLIB %s\n", name);
203 | if (Marshal.PtrToStringUTF8 (new IntPtr (ptr + offset)) is string name && !string.IsNullOrEmpty (name)) {
204 | dylibs.Add (name);
205 | }
206 | }
207 | else if (command->cmd == LC.VERSION_MIN_IPHONEOS) {
208 | if (injectMarzipanGlue) {
209 | Warning ($"{machoName} was built with an earlier iOS SDK.");
210 | }
211 | else {
212 | if (!ios11Errors.Contains (machoName)) {
213 | ios11Errors.Add (machoName);
214 | Warning ($"{machoName} needs to be rebuilt with a minimum deployment target of iOS 12. Any code that uses it will crash.");
215 | }
216 | throw new OldXcodeException ();
217 | }
218 |
219 | if (!dryRun) {
220 | if (sizeof (build_version_command) <= sizeof (version_min_command)) {
221 | var ucmd = (build_version_command*)ptr;
222 | ucmd->cmd = LC.BUILD_VERSION;
223 | ucmd->platform = PLATFORM.MACCATALYST;
224 | ucmd->minos = 12 << 16 | 0 << 8 | 0;
225 | ucmd->sdk = 10 << 16 | 14 << 8 | 0;
226 | }
227 | else {
228 | var vcmd = (version_min_command*)ptr;
229 | vcmd->cmd = LC.VERSION_MIN_MACOSX;
230 | vcmd->sdk = 10 << 16 | 14 << 8 | 0;
231 | vcmd->version = 10 << 16 | 14 << 8 | 0;
232 | }
233 | }
234 | }
235 | else if (command->cmd == LC.BUILD_VERSION) {
236 | if (!dryRun) {
237 | var ucmd = (build_version_command*)ptr;
238 | ucmd->platform = PLATFORM.MACCATALYST;
239 | ucmd->minos = 12 << 16 | 0 << 8 | 0;
240 | ucmd->sdk = 10 << 16 | 14 << 8 | 0;
241 | }
242 | }
243 |
244 | ptr += command->cmdsize;
245 | command = (load_command*)ptr;
246 | }
247 | }
248 |
249 | return dylibs.ToArray ();
250 | }
251 |
252 | int OSSwapBigToHostInt32 (int v)
253 | {
254 | return System.Net.IPAddress.HostToNetworkOrder (v);
255 | }
256 |
257 | int OSSwapBigToHostInt32 (uint v)
258 | {
259 | unchecked {
260 | return System.Net.IPAddress.HostToNetworkOrder ((int)v);
261 | }
262 | }
263 | }
264 |
265 | public class OldXcodeException : Exception
266 | {
267 | }
268 | }
269 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.DS_Store
2 | *.sketch
3 |
4 | /Praeclarum.MacCatalyst/maccat-sdk*.zip
5 |
6 | /Sdk/mono-maccat
7 | /Sdk/xamarin-maccat
8 | /Sdk/Hi.app
9 | /Sdk/Test.app
10 |
11 | /release_out
12 | /maccat-sdk*
13 | /Releases
14 |
15 | # User-specific files
16 | xcuserdata
17 | *.rsuser
18 | *.suo
19 | *.user
20 | *.userosscache
21 | *.sln.docstates
22 |
23 | # User-specific files (MonoDevelop/Xamarin Studio)
24 | *.userprefs
25 |
26 | # Mono auto generated files
27 | mono_crash.*
28 |
29 | # Build results
30 | [Dd]ebug/
31 | [Dd]ebugPublic/
32 | [Rr]elease/
33 | [Rr]eleases/
34 | x64/
35 | x86/
36 | [Aa][Rr][Mm]/
37 | [Aa][Rr][Mm]64/
38 | bld/
39 | [Bb]in/
40 | [Oo]bj/
41 | [Ll]og/
42 |
43 | # Visual Studio 2015/2017 cache/options directory
44 | .vs/
45 | # Uncomment if you have tasks that create the project's static files in wwwroot
46 | #wwwroot/
47 |
48 | # Visual Studio 2017 auto generated files
49 | Generated\ Files/
50 |
51 | # MSTest test Results
52 | [Tt]est[Rr]esult*/
53 | [Bb]uild[Ll]og.*
54 |
55 | # NUNIT
56 | *.VisualState.xml
57 | TestResult.xml
58 |
59 | # Build Results of an ATL Project
60 | [Dd]ebugPS/
61 | [Rr]eleasePS/
62 | dlldata.c
63 |
64 | # Benchmark Results
65 | BenchmarkDotNet.Artifacts/
66 |
67 | # .NET Core
68 | project.lock.json
69 | project.fragment.lock.json
70 | artifacts/
71 |
72 | # StyleCop
73 | StyleCopReport.xml
74 |
75 | # Files built by Visual Studio
76 | *_i.c
77 | *_p.c
78 | *_h.h
79 | *.ilk
80 | *.meta
81 | *.obj
82 | *.iobj
83 | *.pch
84 | *.pdb
85 | *.ipdb
86 | *.pgc
87 | *.pgd
88 | *.rsp
89 | *.sbr
90 | *.tlb
91 | *.tli
92 | *.tlh
93 | *.tmp
94 | *.tmp_proj
95 | *_wpftmp.csproj
96 | *.log
97 | *.vspscc
98 | *.vssscc
99 | .builds
100 | *.pidb
101 | *.svclog
102 | *.scc
103 |
104 | # Chutzpah Test files
105 | _Chutzpah*
106 |
107 | # Visual C++ cache files
108 | ipch/
109 | *.aps
110 | *.ncb
111 | *.opendb
112 | *.opensdf
113 | *.sdf
114 | *.cachefile
115 | *.VC.db
116 | *.VC.VC.opendb
117 |
118 | # Visual Studio profiler
119 | *.psess
120 | *.vsp
121 | *.vspx
122 | *.sap
123 |
124 | # Visual Studio Trace Files
125 | *.e2e
126 |
127 | # TFS 2012 Local Workspace
128 | $tf/
129 |
130 | # Guidance Automation Toolkit
131 | *.gpState
132 |
133 | # ReSharper is a .NET coding add-in
134 | _ReSharper*/
135 | *.[Rr]e[Ss]harper
136 | *.DotSettings.user
137 |
138 | # JustCode is a .NET coding add-in
139 | .JustCode
140 |
141 | # TeamCity is a build add-in
142 | _TeamCity*
143 |
144 | # DotCover is a Code Coverage Tool
145 | *.dotCover
146 |
147 | # AxoCover is a Code Coverage Tool
148 | .axoCover/*
149 | !.axoCover/settings.json
150 |
151 | # Visual Studio code coverage results
152 | *.coverage
153 | *.coveragexml
154 |
155 | # NCrunch
156 | _NCrunch_*
157 | .*crunch*.local.xml
158 | nCrunchTemp_*
159 |
160 | # MightyMoose
161 | *.mm.*
162 | AutoTest.Net/
163 |
164 | # Web workbench (sass)
165 | .sass-cache/
166 |
167 | # Installshield output folder
168 | [Ee]xpress/
169 |
170 | # DocProject is a documentation generator add-in
171 | DocProject/buildhelp/
172 | DocProject/Help/*.HxT
173 | DocProject/Help/*.HxC
174 | DocProject/Help/*.hhc
175 | DocProject/Help/*.hhk
176 | DocProject/Help/*.hhp
177 | DocProject/Help/Html2
178 | DocProject/Help/html
179 |
180 | # Click-Once directory
181 | publish/
182 |
183 | # Publish Web Output
184 | *.[Pp]ublish.xml
185 | *.azurePubxml
186 | # Note: Comment the next line if you want to checkin your web deploy settings,
187 | # but database connection strings (with potential passwords) will be unencrypted
188 | *.pubxml
189 | *.publishproj
190 |
191 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
192 | # checkin your Azure Web App publish settings, but sensitive information contained
193 | # in these scripts will be unencrypted
194 | PublishScripts/
195 |
196 | # NuGet Packages
197 | *.nupkg
198 | # The packages folder can be ignored because of Package Restore
199 | **/[Pp]ackages/*
200 | # except build/, which is used as an MSBuild target.
201 | !**/[Pp]ackages/build/
202 | # Uncomment if necessary however generally it will be regenerated when needed
203 | #!**/[Pp]ackages/repositories.config
204 | # NuGet v3's project.json files produces more ignorable files
205 | *.nuget.props
206 | *.nuget.targets
207 |
208 | # Microsoft Azure Build Output
209 | csx/
210 | *.build.csdef
211 |
212 | # Microsoft Azure Emulator
213 | ecf/
214 | rcf/
215 |
216 | # Windows Store app package directories and files
217 | AppPackages/
218 | BundleArtifacts/
219 | Package.StoreAssociation.xml
220 | _pkginfo.txt
221 | *.appx
222 | *.appxbundle
223 | *.appxupload
224 |
225 | # Visual Studio cache files
226 | # files ending in .cache can be ignored
227 | *.[Cc]ache
228 | # but keep track of directories ending in .cache
229 | !?*.[Cc]ache/
230 |
231 | # Others
232 | ClientBin/
233 | ~$*
234 | *~
235 | *.dbmdl
236 | *.dbproj.schemaview
237 | *.jfm
238 | *.pfx
239 | *.publishsettings
240 | orleans.codegen.cs
241 |
242 | # Including strong name files can present a security risk
243 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
244 | #*.snk
245 |
246 | # Since there are multiple workflows, uncomment next line to ignore bower_components
247 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
248 | #bower_components/
249 |
250 | # RIA/Silverlight projects
251 | Generated_Code/
252 |
253 | # Backup & report files from converting an old project file
254 | # to a newer Visual Studio version. Backup files are not needed,
255 | # because we have git ;-)
256 | _UpgradeReport_Files/
257 | Backup*/
258 | UpgradeLog*.XML
259 | UpgradeLog*.htm
260 | ServiceFabricBackup/
261 | *.rptproj.bak
262 |
263 | # SQL Server files
264 | *.mdf
265 | *.ldf
266 | *.ndf
267 |
268 | # Business Intelligence projects
269 | *.rdl.data
270 | *.bim.layout
271 | *.bim_*.settings
272 | *.rptproj.rsuser
273 | *- Backup*.rdl
274 |
275 | # Microsoft Fakes
276 | FakesAssemblies/
277 |
278 | # GhostDoc plugin setting file
279 | *.GhostDoc.xml
280 |
281 | # Node.js Tools for Visual Studio
282 | .ntvs_analysis.dat
283 | node_modules/
284 |
285 | # Visual Studio 6 build log
286 | *.plg
287 |
288 | # Visual Studio 6 workspace options file
289 | *.opt
290 |
291 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
292 | *.vbw
293 |
294 | # Visual Studio LightSwitch build output
295 | **/*.HTMLClient/GeneratedArtifacts
296 | **/*.DesktopClient/GeneratedArtifacts
297 | **/*.DesktopClient/ModelManifest.xml
298 | **/*.Server/GeneratedArtifacts
299 | **/*.Server/ModelManifest.xml
300 | _Pvt_Extensions
301 |
302 | # Paket dependency manager
303 | .paket/paket.exe
304 | paket-files/
305 |
306 | # FAKE - F# Make
307 | .fake/
308 |
309 | # CodeRush personal settings
310 | .cr/personal
311 |
312 | # Python Tools for Visual Studio (PTVS)
313 | __pycache__/
314 | *.pyc
315 |
316 | # Cake - Uncomment if you are using it
317 | # tools/**
318 | # !tools/packages.config
319 |
320 | # Tabs Studio
321 | *.tss
322 |
323 | # Telerik's JustMock configuration file
324 | *.jmconfig
325 |
326 | # BizTalk build output
327 | *.btp.cs
328 | *.btm.cs
329 | *.odx.cs
330 | *.xsd.cs
331 |
332 | # OpenCover UI analysis results
333 | OpenCover/
334 |
335 | # Azure Stream Analytics local run output
336 | ASALocalRun/
337 |
338 | # MSBuild Binary and Structured Log
339 | *.binlog
340 |
341 | # NVidia Nsight GPU debugger configuration file
342 | *.nvuser
343 |
344 | # MFractors (Xamarin productivity tool) working folder
345 | .mfractor/
346 |
347 | # Local History for Visual Studio
348 | .localhistory/
349 |
350 | # BeatPulse healthcheck temp database
351 | healthchecksdb
352 |
353 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
354 | MigrationBackup/
355 |
356 | ##
357 | ## Visual studio for Mac
358 | ##
359 |
360 |
361 | # globs
362 | Makefile.in
363 | *.userprefs
364 | *.usertasks
365 | config.make
366 | config.status
367 | aclocal.m4
368 | install-sh
369 | autom4te.cache/
370 | *.tar.gz
371 | tarballs/
372 | test-results/
373 |
374 | # Mac bundle stuff
375 | *.dmg
376 | *.app
377 |
378 | # content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
379 | # General
380 | .DS_Store
381 | .AppleDouble
382 | .LSOverride
383 |
384 | # Icon must end with two \r
385 | Icon
386 |
387 |
388 | # Thumbnails
389 | ._*
390 |
391 | # Files that might appear in the root of a volume
392 | .DocumentRevisions-V100
393 | .fseventsd
394 | .Spotlight-V100
395 | .TemporaryItems
396 | .Trashes
397 | .VolumeIcon.icns
398 | .com.apple.timemachine.donotpresent
399 |
400 | # Directories potentially created on remote AFP share
401 | .AppleDB
402 | .AppleDesktop
403 | Network Trash Folder
404 | Temporary Items
405 | .apdisk
406 |
407 | # content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
408 | # Windows thumbnail cache files
409 | Thumbs.db
410 | ehthumbs.db
411 | ehthumbs_vista.db
412 |
413 | # Dump file
414 | *.stackdump
415 |
416 | # Folder config file
417 | [Dd]esktop.ini
418 |
419 | # Recycle Bin used on file shares
420 | $RECYCLE.BIN/
421 |
422 | # Windows Installer files
423 | *.cab
424 | *.msi
425 | *.msix
426 | *.msm
427 | *.msp
428 |
429 | # Windows shortcuts
430 | *.lnk
431 |
432 | # JetBrains Rider
433 | .idea/
434 | *.sln.iml
435 |
436 | ##
437 | ## Visual Studio Code
438 | ##
439 | .vscode/*
440 | !.vscode/settings.json
441 | !.vscode/tasks.json
442 | !.vscode/launch.json
443 | !.vscode/extensions.json
444 |
--------------------------------------------------------------------------------