Skip to content

Commit

Permalink
Add Mac Catalyst submission test apps (MyCatalystApp and MyUnlinkedCa…
Browse files Browse the repository at this point in the history
…talystApp) (#36)

* Add MyCatalystApp

* Add MyUnlinkedMyCatalystApp.
  • Loading branch information
rolfbjarne authored Jul 27, 2021
1 parent e4a1575 commit 246e7a4
Show file tree
Hide file tree
Showing 35 changed files with 638 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MyCatalystApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NuGet.config
global.json
*.binlog

43 changes: 43 additions & 0 deletions MyCatalystApp/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;

namespace MySingleView
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
public override UIWindow Window {
get;
set;
}
// This method is invoked when the application is about to move from active to inactive state.
// OpenGL applications should use this method to pause.
public override void OnResignActivation (UIApplication application)
{
}
// This method should be used to release shared resources and it should store the application state.
// If your application supports background execution this method is called instead of WillTerminate
// when the user quits.
public override void DidEnterBackground (UIApplication application)
{
}

/// This method is called as part of the transition from background to active state.
public override void WillEnterForeground (UIApplication application)
{
}

/// This method is called when the application is about to terminate. Save data, if needed.
public override void WillTerminate (UIApplication application)
{
}
}
}

8 changes: 8 additions & 0 deletions MyCatalystApp/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
28 changes: 28 additions & 0 deletions MyCatalystApp/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.xamarin.mycatalystapp</string>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>XSAppIconAssets</key>
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions MyCatalystApp/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;

namespace MySingleView
{
public class Application
{
// This is the main entry point of the application.
static void Main (string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
}
}
}
42 changes: 42 additions & 0 deletions MyCatalystApp/MainStoryboard.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11C74" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="1">
<dependencies>
<development defaultVersion="4200" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="933"/>
</dependencies>
<scenes>
<scene sceneID="0">
<objects>
<viewController id="1" sceneMemberID="viewController" customClass="">
<view key="view" contentMode="scaleToFill" id="2">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="5">
<rect key="frame" x="124" y="81" width="72" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Button">
<color key="titleColor" red="0.196078" green="0.3098" blue="0.52157" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="3" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-313" y="-220"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
<resources/>
</document>
20 changes: 20 additions & 0 deletions MyCatalystApp/MyCatalystApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-maccatalyst</TargetFramework>
<OutputType>Exe</OutputType>
<MtouchLink>SdkOnly</MtouchLink>

<ApplicationTitle>MyCatalystApp</ApplicationTitle>
<ApplicationId>com.xamarin.mycatalystapp</ApplicationId>

<CreatePackage>true</CreatePackage>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<UseHardenedRuntime>true</UseHardenedRuntime>
<EnableCodeSigning>true</EnableCodeSigning>
<EnablePackageSigning>true</EnablePackageSigning>
<CodesignKey>Apple Distribution: Luis Aguilera (DPXCPAGVTZ)</CodesignKey>
<CodeSignProvision>My Catalyst App (Dist)</CodeSignProvision>
<PackageSigningKey>3rd Party Mac Developer Installer: Luis Aguilera (DPXCPAGVTZ)</PackageSigningKey>
</PropertyGroup>
</Project>
20 changes: 20 additions & 0 deletions MyCatalystApp/MyCatalystApp.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCatalystApp", "MyCatalystApp.csproj", "{8F2D37C2-BF1F-408A-8E7E-1B89D2126DFB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|MacCatalyst = Debug|MacCatalyst
Release|MacCatalyst = Release|MacCatalyst
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8F2D37C2-BF1F-408A-8E7E-1B89D2126DFB}.Debug|MacCatalyst.ActiveCfg = Debug|MacCatalyst
{8F2D37C2-BF1F-408A-8E7E-1B89D2126DFB}.Debug|MacCatalyst.Build.0 = Debug|MacCatalyst
{8F2D37C2-BF1F-408A-8E7E-1B89D2126DFB}.Release|MacCatalyst.ActiveCfg = Release|MacCatalyst
{8F2D37C2-BF1F-408A-8E7E-1B89D2126DFB}.Release|MacCatalyst.Build.0 = Release|MacCatalyst
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = MyCatalystApp.csproj
EndGlobalSection
EndGlobal
60 changes: 60 additions & 0 deletions MyCatalystApp/MySingleViewViewController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using CoreGraphics;
using Foundation;
using UIKit;

namespace MySingleView
{
public partial class MySingleViewViewController : UIViewController
{
public MySingleViewViewController (IntPtr handle) : base (handle)
{
}

public override void DidReceiveMemoryWarning ()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning ();

// Release any cached data, images, etc that aren't in use.
}

#region View lifecycle

public override void ViewDidLoad ()
{
base.ViewDidLoad ();

// Perform any additional setup after loading the view, typically from a nib.
}

public override void ViewWillAppear (bool animated)
{
base.ViewWillAppear (animated);
}

public override void ViewDidAppear (bool animated)
{
base.ViewDidAppear (animated);
}

public override void ViewWillDisappear (bool animated)
{
base.ViewWillDisappear (animated);
}

public override void ViewDidDisappear (bool animated)
{
base.ViewDidDisappear (animated);
}

#endregion

public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
// Return true for supported orientations
return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);
}
}
}

17 changes: 17 additions & 0 deletions MyCatalystApp/MySingleViewViewController.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images": [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16",
"filename": "Icon16.png"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16",
"filename": "Icon32.png"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32",
"filename": "Icon32.png"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32",
"filename": "Icon64.png"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128",
"filename": "Icon128.png"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128",
"filename": "Icon256.png"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256",
"filename": "Icon256.png"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256",
"filename": "Icon512.png"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512",
"filename": "Icon512.png"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512",
"filename": "Icon1024.png"
}
],
"info": {
"version": 1,
"author": "xcode"
},
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions MyUnlinkedCatalystApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NuGet.config
global.json
*.binlog

43 changes: 43 additions & 0 deletions MyUnlinkedCatalystApp/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;

namespace MySingleView
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
public override UIWindow Window {
get;
set;
}
// This method is invoked when the application is about to move from active to inactive state.
// OpenGL applications should use this method to pause.
public override void OnResignActivation (UIApplication application)
{
}
// This method should be used to release shared resources and it should store the application state.
// If your application supports background execution this method is called instead of WillTerminate
// when the user quits.
public override void DidEnterBackground (UIApplication application)
{
}

/// This method is called as part of the transition from background to active state.
public override void WillEnterForeground (UIApplication application)
{
}

/// This method is called when the application is about to terminate. Save data, if needed.
public override void WillTerminate (UIApplication application)
{
}
}
}

8 changes: 8 additions & 0 deletions MyUnlinkedCatalystApp/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 246e7a4

Please sign in to comment.