Skip to content

Commit

Permalink
[dotnet] Port the iOS tabbed app template to .NET.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Mar 31, 2022
1 parent fae74b2 commit a5ccb77
Show file tree
Hide file tree
Showing 46 changed files with 820 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"author": "Microsoft",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"symbols/bundleId/description": "Overrides CFBundleIdentifier in the Info.plist",
"symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file",
"symbols/deviceFamily/choices/universal/description": "Support both iPhone and iPad devices",
"symbols/deviceFamily/choices/iphone/description": "Support only iPhone devices",
"symbols/deviceFamily/choices/ipad/description": "Support only iPad devices"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "iOS", "Mobile" ],
"identity": "Microsoft.iOS.iOSTabbedApp",
"name": "iOS Tabbed Application (Preview)",
"description": "A project for creating a .NET iOS tabbed application",
"shortName": "ios-tabbed",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "iOSTabbedApp1",
"sources": [
{
"source": "./",
"target": "./",
"copyOnly": [ "**/*.png", "**/*.pdf" ]
}
],
"preferNameDirectory": true,
"primaryOutputs": [
{ "path": "iOSTabbedApp1.csproj" }
],
"symbols": {
"bundleId": {
"type": "parameter",
"description": "Overrides CFBundleIdentifier in the Info.plist",
"datatype": "string",
"replaces": "com.companyname.iOSTabbedApp1"
},
"minOSVersion": {
"type": "parameter",
"description": "Overrides SupportedOSPlatformVersion in the project file",
"replaces": "minOSVersion",
"datatype": "string",
"defaultValue": "15.0"
},
"deviceFamily": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "universal",
"choices": [
{
"choice": "universal",
"description": "Support both iPhone and iPad devices"
},
{
"choice": "iphone",
"description": "Support only iPhone devices"
},
{
"choice": "ipad",
"description": "Support only iPad devices"
}
]
}
},
"defaultName": "iOSTabbedApp1"
}
35 changes: 35 additions & 0 deletions dotnet/Templates/Microsoft.iOS.Templates/ios-tabbed/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace iOSTabbedApp1;

// 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.
public class AppDelegate : UIResponder, IUIApplicationDelegate {

[Export ("window")]
public UIWindow? Window { get; set; }

[Export ("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
return true;
}

// UISceneSession Lifecycle

[Export ("application:configurationForConnectingSceneSession:options:")]
public UISceneConfiguration GetConfiguration (UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options)
{
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration.Create ("Default Configuration", connectingSceneSession.Role);
}

[Export ("application:didDiscardSceneSessions:")]
public void DidDiscardSceneSessions (UIApplication application, NSSet<UISceneSession> sceneSessions)
{
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after `FinishedLaunching`.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}
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.
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

0 comments on commit a5ccb77

Please sign in to comment.