Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventKitUI] Update to Xcode 9 Beta 1 #2271

Merged
merged 1 commit into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Constants.iOS.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace MonoTouch {
public const string MapKitLibrary = "/System/Library/Frameworks/MapKit.framework/MapKit";
public const string GameKitLibrary = "/System/Library/Frameworks/GameKit.framework/GameKit";
public const string EventKitLibrary = "/System/Library/Frameworks/EventKit.framework/EventKit";
public const string EventKitUILibrary = "/System/Library/Frameworks/EventKitUI.framework/EventKitUI";
public const string ImageIOLibrary = "/System/Library/Frameworks/ImageIO.framework/ImageIO";
public const string AssetsLibraryLibrary = "/System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary";
public const string CoreVideoLibrary = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo";
Expand Down
27 changes: 27 additions & 0 deletions src/EventKitUI/EKUIBundle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// EventKitUIBundle C# bindings
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2017 Xamarin Inc. All rights reserved.
//

#if XAMCORE_2_0
using System;
using System.Runtime.InteropServices;
using XamCore.Foundation;
using XamCore.ObjCRuntime;

namespace XamCore.EventKitUI {
public static class EKUIBundle {

[iOS (11,0)]
[DllImport (Constants.EventKitUILibrary)]
static extern IntPtr EventKitUIBundle ();

[iOS (11,0)]
public static NSBundle UIBundle { get; } = Runtime.GetNSObject<NSBundle> (EventKitUIBundle ());
}
}
#endif
3 changes: 3 additions & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,9 @@ EVENTKIT_SOURCES = \
EVENTKITUI_CORE_SOURCES = \
EventKitUI/Defs.cs \

EVENTKITUI_SOURCES = \
EventKitUI/EKUIBundle.cs \

# ExternalAccessory

EXTERNALACCESSORY_API_SOURCES = \
Expand Down
34 changes: 34 additions & 0 deletions tests/monotouch-test/EventKit/EKUIBundleTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// Unit tests for EKUIBundle
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2017 Xamarin Inc. All rights reserved.
//

#if XAMCORE_2_0 && !__TVOS__ && !__WATCHOS__

using System;
using EventKitUI;
using Foundation;
using NUnit.Framework;

namespace MonoTouchFixtures.EventKitUI {
[TestFixture]
[Preserve (AllMembers = true)]
public class EKUIBundleTest {

[Test]
public void BundleTest ()
{
if (!TestRuntime.CheckXcodeVersion (9, 0))
Assert.Ignore ("Ignoring tests: Requires iOS11+");

var bundle = EKUIBundle.UIBundle;
Assert.NotNull (bundle, "Was Null");
Assert.AreEqual ("com.apple.eventkitui", bundle.BundleIdentifier, "BundleIdentifier");
}
}
}
#endif
1 change: 1 addition & 0 deletions tests/monotouch-test/monotouch-test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@
<Compile Include="OpenGLES\EAGLContext.cs" />
<Compile Include="CoreText\CTParagraphStyleTests.cs" />
<Compile Include="CoreData\NSQueryGenerationTokenTest.cs" />
<Compile Include="EventKit\EKUIBundleTest.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down