diff --git a/msbuild/tests/MyActionExtension/Info.plist b/msbuild/tests/MyActionExtension/Info.plist
index 616a3faeb70e..ec4dfd0818d9 100644
--- a/msbuild/tests/MyActionExtension/Info.plist
+++ b/msbuild/tests/MyActionExtension/Info.plist
@@ -19,7 +19,7 @@
CFBundleSignature
????
CFBundleVersion
- 1
+ 1.0
NSExtension
NSExtensionAttributes
diff --git a/msbuild/tests/MyMasterDetailApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyMasterDetailApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyMasterDetailApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyMasterDetailApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyMetalGame/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyMetalGame/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyMetalGame/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyMetalGame/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyOpenGLApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyOpenGLApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyOpenGLApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyOpenGLApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyTVApp/MyTVApp.csproj b/msbuild/tests/MyTVApp/MyTVApp.csproj
index 81997f6543de..f74dbcf0dbc0 100644
--- a/msbuild/tests/MyTVApp/MyTVApp.csproj
+++ b/msbuild/tests/MyTVApp/MyTVApp.csproj
@@ -83,6 +83,13 @@
MySingleViewViewController.cs
+
+
+ true
+ {0F124570-8B79-4593-B618-A90E51F339DF}
+ MyTVServicesExtension
+
+
diff --git a/msbuild/tests/MyTVServicesExtension/Entitlements.plist b/msbuild/tests/MyTVServicesExtension/Entitlements.plist
new file mode 100644
index 000000000000..9ae599370b42
--- /dev/null
+++ b/msbuild/tests/MyTVServicesExtension/Entitlements.plist
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/msbuild/tests/MyTVServicesExtension/Info.plist b/msbuild/tests/MyTVServicesExtension/Info.plist
new file mode 100644
index 000000000000..d74407fd543c
--- /dev/null
+++ b/msbuild/tests/MyTVServicesExtension/Info.plist
@@ -0,0 +1,42 @@
+
+
+
+
+ CFBundleDisplayName
+ MyTVServicesExtension
+ CFBundleName
+ MyTVServicesExtension
+ CFBundleIdentifier
+ com.xamarin.mytvapp.mytvservicesextension
+ CFBundleDevelopmentRegion
+ en
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ XPC!
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 9.2
+ NSExtension
+
+ NSExtensionAttributes
+
+ TVExtensionProtocols
+
+ TVTopShelfProvider
+
+
+ NSExtensionPointIdentifier
+ com.apple.tv-services
+ NSExtensionPrincipalClass
+ ServiceProvider
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+
+
diff --git a/msbuild/tests/MyTVServicesExtension/MyTVServicesExtension.csproj b/msbuild/tests/MyTVServicesExtension/MyTVServicesExtension.csproj
new file mode 100644
index 000000000000..fa2251f53fcf
--- /dev/null
+++ b/msbuild/tests/MyTVServicesExtension/MyTVServicesExtension.csproj
@@ -0,0 +1,99 @@
+
+
+
+ Debug
+ iPhoneSimulator
+ {0F124570-8B79-4593-B618-A90E51F339DF}
+ {53F59511-8024-45F7-9A2A-2739F70C7A80};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ MyTVServicesExtension
+ MyTVServicesExtension
+ Resources
+
+
+ true
+ full
+ false
+ bin\iPhoneSimulator\Debug
+ DEBUG;
+ prompt
+ 4
+ false
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ None
+ x86_64
+ false
+
+
+ true
+ bin\iPhone\Release
+
+ prompt
+ 4
+ false
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ Entitlements.plist
+ ARM64
+
+
+ true
+ bin\iPhoneSimulator\Release
+
+ prompt
+ 4
+ false
+ iPhone Developer
+ true
+ true
+ None
+ x86_64
+
+
+ true
+ full
+ false
+ bin\iPhone\Debug
+ DEBUG;
+ prompt
+ 4
+ false
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ Entitlements.plist
+ 10001
+ ARM64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/msbuild/tests/MyTVServicesExtension/ServiceProvider.cs b/msbuild/tests/MyTVServicesExtension/ServiceProvider.cs
new file mode 100644
index 000000000000..6ec7eb5abab1
--- /dev/null
+++ b/msbuild/tests/MyTVServicesExtension/ServiceProvider.cs
@@ -0,0 +1,25 @@
+using System;
+using Foundation;
+using TVServices;
+
+namespace MyTVServicesExtension
+{
+ public class ServiceProvider : NSObject, ITVTopShelfProvider
+ {
+ protected ServiceProvider (IntPtr handle) : base (handle)
+ {
+ // Note: this .ctor should not contain any initialization logic.
+ }
+
+ public TVContentItem [] TopShelfItems {
+ [Export ("topShelfItems")]
+ get;
+ }
+
+ public TVTopShelfContentStyle TopShelfStyle {
+ [Export ("topShelfStyle")]
+ get;
+ }
+ }
+}
+
diff --git a/msbuild/tests/MyTabbedApplication/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyTabbedApplication/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyTabbedApplication/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyTabbedApplication/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyWatch2Container/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyWatch2Container/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 6a8e7fe22cc6..dbe9cffcec71 100644
--- a/msbuild/tests/MyWatch2Container/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyWatch2Container/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -95,11 +95,6 @@
"size": "76x76",
"scale": "2x"
},
- {
- "idiom": "car",
- "size": "120x120",
- "scale": "1x"
- },
{
"size": "24x24",
"idiom": "watch",
@@ -159,4 +154,4 @@
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyWatchApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyWatchApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyWatchApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyWatchApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyWatchApp2/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyWatchApp2/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 85bac0d93fb4..ef34f288a521 100644
--- a/msbuild/tests/MyWatchApp2/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyWatchApp2/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -95,11 +95,6 @@
"size" : "76x76",
"scale" : "2x"
},
- {
- "idiom" : "car",
- "size" : "120x120",
- "scale" : "1x"
- },
{
"size" : "24x24",
"idiom" : "watch",
@@ -167,4 +162,4 @@
"version" : 1,
"author" : "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyWebViewApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyWebViewApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 24f99745850a..013bc18d7d68 100644
--- a/msbuild/tests/MyWebViewApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyWebViewApp/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -94,15 +94,10 @@
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
- },
- {
- "size": "120x120",
- "scale": "1x",
- "idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/MyiOSAppWithBinding/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/msbuild/tests/MyiOSAppWithBinding/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
index 6a8e7fe22cc6..dbe9cffcec71 100644
--- a/msbuild/tests/MyiOSAppWithBinding/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
+++ b/msbuild/tests/MyiOSAppWithBinding/Resources/Images.xcassets/AppIcons.appiconset/Contents.json
@@ -95,11 +95,6 @@
"size": "76x76",
"scale": "2x"
},
- {
- "idiom": "car",
- "size": "120x120",
- "scale": "1x"
- },
{
"size": "24x24",
"idiom": "watch",
@@ -159,4 +154,4 @@
"version": 1,
"author": "xcode"
}
-}
\ No newline at end of file
+}
diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/ExtensionTestBase.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/ExtensionTestBase.cs
index 06c8d3099c27..5c98b3109f94 100644
--- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/ExtensionTestBase.cs
+++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/Extensions/ExtensionTestBase.cs
@@ -5,15 +5,27 @@
namespace Xamarin.iOS.Tasks
{
public class ExtensionTestBase : TestBase {
+ public string BundlePath;
public string Platform;
public ExtensionTestBase (string platform) {
Platform = platform;
}
- public void BuildExtension (string hostAppName, string extensionName, string platform, int expectedErrorCount = 0)
+ public ExtensionTestBase (string bundlePath, string platform)
{
- var mtouchPaths = SetupProjectPaths (hostAppName, "../", true, platform);
+ BundlePath = bundlePath;
+ Platform = platform;
+ }
+
+ public void BuildExtension (string hostAppName, string extensionName, string platform, int expectedErrorCount = 0)
+ {
+ BuildExtension (hostAppName, extensionName, platform, platform, expectedErrorCount);
+ }
+
+ public void BuildExtension (string hostAppName, string extensionName, string bundlePath, string platform, int expectedErrorCount = 0)
+ {
+ var mtouchPaths = SetupProjectPaths (hostAppName, "../", true, bundlePath);
var proj = SetupProject (Engine, mtouchPaths ["project_csprojpath"]);
@@ -22,7 +34,7 @@ public void BuildExtension (string hostAppName, string extensionName, string pla
Engine.GlobalProperties.SetProperty ("Platform", platform);
RunTarget (proj, "Clean");
- Assert.IsFalse (Directory.Exists (AppBundlePath), "{1}: App bundle exists after cleanup: {0} ", AppBundlePath, platform);
+ Assert.IsFalse (Directory.Exists (AppBundlePath), "{1}: App bundle exists after cleanup: {0} ", AppBundlePath, bundlePath);
proj = SetupProject (Engine, mtouchPaths.ProjectCSProjPath);
RunTarget (proj, "Build", expectedErrorCount);
@@ -30,7 +42,7 @@ public void BuildExtension (string hostAppName, string extensionName, string pla
if (expectedErrorCount > 0)
return;
- Assert.IsTrue (Directory.Exists (AppBundlePath), "{1} App Bundle does not exist: {0} ", AppBundlePath, platform);
+ Assert.IsTrue (Directory.Exists (AppBundlePath), "{1} App Bundle does not exist: {0} ", AppBundlePath, bundlePath);
TestPList (AppBundlePath, new string[] {"CFBundleExecutable", "CFBundleVersion"});
@@ -41,13 +53,14 @@ public void BuildExtension (string hostAppName, string extensionName, string pla
TestFilesExists (AppBundlePath, ExpectedAppFiles);
TestFilesDoNotExist (AppBundlePath, UnexpectedAppFiles);
- if (IsWatchOS) {
- var coreFiles = platform == "iPhone" ? CoreAppFiles : CoreAppFiles.Union (new string [] { extensionName + ".dll", Path.GetFileNameWithoutExtension (extensionPath) }).ToArray ();
+ var coreFiles = platform == "iPhone" ? CoreAppFiles : CoreAppFiles.Union (new string [] { hostAppName + ".exe", hostAppName }).ToArray ();
+ if (IsTVOS)
+ TestFilesExists (platform == "iPhone" ? Path.Combine (AppBundlePath, ".monotouch-64") : AppBundlePath, coreFiles);
+ else if (IsWatchOS) {
+ coreFiles = platform == "iPhone" ? CoreAppFiles : CoreAppFiles.Union (new string [] { extensionName + ".dll", Path.GetFileNameWithoutExtension (extensionPath) }).ToArray ();
TestFilesExists (platform == "iPhone" ? Path.Combine (extensionPath, ".monotouch-32") : extensionPath, coreFiles);
- } else {
- var coreFiles = platform == "iPhone" ? CoreAppFiles : CoreAppFiles.Union (new string [] { hostAppName + ".exe", hostAppName }).ToArray ();
+ } else
TestFilesExists (platform == "iPhone" ? Path.Combine (AppBundlePath, ".monotouch-32") : AppBundlePath, coreFiles);
- }
}
public void SetupPaths (string appName, string platform)
diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/MyTVApp.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/TVApp.cs
similarity index 58%
rename from msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/MyTVApp.cs
rename to msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/TVApp.cs
index 99e82dc8400b..b6af7c5f2908 100644
--- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/MyTVApp.cs
+++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/TVOS/TVApp.cs
@@ -4,16 +4,16 @@ namespace Xamarin.iOS.Tasks
{
[TestFixture("TV", "iPhone")]
[TestFixture("TVSimulator", "iPhoneSimulator")]
- public class MyTVAppTests : ProjectTest
+ public class TVAppTests : ExtensionTestBase
{
- public MyTVAppTests(string bundlePath, string platform) : base(bundlePath, platform)
+ public TVAppTests (string bundlePath, string platform) : base(bundlePath, platform)
{
}
[Test]
public void BasicTest()
{
- BuildProject("MyTVApp", BundlePath, Platform);
+ BuildExtension("MyTVApp", "MyTVServicesExtension", BundlePath, Platform);
}
public override string TargetFrameworkIdentifier {
diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
index 2138c8163aaa..8a9c88637f83 100644
--- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
+++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj
@@ -92,7 +92,7 @@
Configuration.cs
-
+