From 8614b679cc63f84d0aef4dae00ef82a2e6b90e28 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 18 十一月 2021 09:35:11 +0800 Subject: [PATCH] 1.绑定库 --- HDL-ON_iOS/Other/Siri/SiriBaseView.cs | 26 +++ HDL_APP_Project.sln | 26 +- HDL-ON_iOS/HDL-ON_iOS.csproj | 18 +- SiriBinding/Properties/AssemblyInfo.cs | 34 ++++ HDL-ON_iOS/Other/SkipControl.cs | 34 ++++ HDL-ON_iOS/AppDelegate.cs | 2 SiriBinding/SiriBinding.csproj | 33 +++- /dev/null | 36 ----- SiriBinding/ApiDefinition.cs | 86 ++++++++++++ ThirdPartyIntegration/siri/libOnProSiriIntents.a | 0 HDL-ON_iOS/Other/Siri/SiriBaseView.designer.cs | 21 +++ HDL-ON_iOS/Other/Siri/SiriBaseView.xib | 21 +++ .vs/HDL_APP_Project/xs/UserPrefs.xml | 35 ++++ HDL_ON/UI/UI1-Login/LoginPage.cs | 6 SiriBinding/Structs.cs | 18 ++ 15 files changed, 321 insertions(+), 75 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index dfcc40d..9f981cb 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,9 +1,27 @@ -锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> - <MonoDevelop.Ide.Workbench> +锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> + <MonoDevelop.Ide.ItemProperties.SiriIntentUI> + <MonoDevelop.MacDev.AppleDevelopmentTeam /> + </MonoDevelop.Ide.ItemProperties.SiriIntentUI> + <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> + <MonoDevelop.Ide.Workbench ActiveDocument="SiriBinding/Structs.cs"> + <Files> + <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="203" Column="35" /> + <File FileName="HDL-ON_iOS/Other/SkipControl.cs" Line="35" Column="1" /> + <File FileName="HDL-ON_iOS/Other/Siri/SiriBaseView.cs" Line="25" Column="2" /> + <File FileName="SiriBinding/ApiDefinition.cs" Line="8" Column="18" /> + <File FileName="SiriBinding/Structs.cs" Line="7" Column="1" /> + </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> - <Node name="HDL_APP_Project" expanded="True" selected="True" /> + <Node name="HDL_APP_Project" expanded="True"> + <Node name="HDL-ON_iOS" expanded="True"> + <Node name="Other" expanded="True" /> + </Node> + <Node name="SiriBinding" expanded="True"> + <Node name="Structs.cs" selected="True" /> + </Node> + </Node> </State> </Pad> </Pads> @@ -13,11 +31,18 @@ <String>Shared.IOS.TBL/Shared.IOS.TBL.csproj</String> <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> + <String>SiriIntent/SiriIntent.csproj</String> + <String>SiriBinding/SiriBinding.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> - <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> + <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> - <BreakpointStore /> + <BreakpointStore> + <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="1415" column="1" /> + <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="333" column="1" /> + <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" line="251" column="1" /> + <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" line="185" column="1" /> + </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> </Properties> \ No newline at end of file diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index e7b6565..5da920e 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -60,7 +60,7 @@ // // If not required for your application you can safely delete this method // return true; //} - internal static UINavigationController rootViewController; + public static UINavigationController rootViewController; public static void CleanApplicationIconBadgeNumber() { diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index d9dbcea..dd1bd11 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -463,7 +463,7 @@ <Folder Include="Resources\Phone\FunctionIcon\Light\LightScene\" /> <Folder Include="Resources\Phone\PersonalCenter\FacePassage\" /> <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" /> - <Folder Include="Other\Data\" /> + <Folder Include="Other\Siri\" /> </ItemGroup> <ItemGroup> <InterfaceDefinition Include="LaunchScreen.storyboard" /> @@ -473,6 +473,7 @@ <InterfaceDefinition Include="Resources\EZ\Base.lproj\EZSupportViewController.xib" /> <InterfaceDefinition Include="Resources\EZ\Base.lproj\EZMain.storyboard" /> <InterfaceDefinition Include="Resources\EZ\Base.lproj\AddDevice.storyboard" /> + <InterfaceDefinition Include="Other\Siri\SiriBaseView.xib" /> </ItemGroup> <ItemGroup> <None Include="Info.plist" /> @@ -491,9 +492,11 @@ <Compile Include="ZXingOverlayView.cs" /> <Compile Include="Other\JLCountrycode.cs" /> <Compile Include="BlueWifi.cs" /> - <Compile Include="Other\PrimaryClass.cs" /> - <Compile Include="Other\Data\VoiceShortcutDataManager.cs" /> - <Compile Include="Other\Data\SiriScene.cs" /> + <Compile Include="Other\SkipControl.cs" /> + <Compile Include="Other\Siri\SiriBaseView.cs" /> + <Compile Include="Other\Siri\SiriBaseView.designer.cs"> + <DependentUpon>SiriBaseView.cs</DependentUpon> + </Compile> </ItemGroup> <ItemGroup> <BundleResource Include="Resources\Phone\LoginIcon\ShowPasswordIcon.png" /> @@ -1405,10 +1408,9 @@ <Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project> <Name>Blufi</Name> </ProjectReference> - <ProjectReference Include="..\SiriIntentUI\SiriIntentUI.csproj"> - <IsAppExtension>true</IsAppExtension> - <Project>{B594D3F5-4B93-4988-B45E-150BBFDC8A43}</Project> - <Name>SiriIntentUI</Name> + <ProjectReference Include="..\SiriBinding\SiriBinding.csproj"> + <Project>{77FFAB61-395D-4AD3-863E-C4E32B5038E7}</Project> + <Name>SiriBinding</Name> </ProjectReference> </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> diff --git a/HDL-ON_iOS/Other/Siri/SiriBaseView.cs b/HDL-ON_iOS/Other/Siri/SiriBaseView.cs new file mode 100644 index 0000000..e168dbd --- /dev/null +++ b/HDL-ON_iOS/Other/Siri/SiriBaseView.cs @@ -0,0 +1,26 @@ +锘縰sing System; + +using UIKit; + +namespace Other.Siri +{ + public partial class SiriBaseView : UIViewController + { + public SiriBaseView() : base("SiriBaseView", null) + { + } + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + // Perform any additional setup after loading the view, typically from a nib. + } + + public override void DidReceiveMemoryWarning() + { + base.DidReceiveMemoryWarning(); + // Release any cached data, images, etc that aren't in use. + } + } +} + diff --git a/HDL-ON_iOS/Other/Siri/SiriBaseView.designer.cs b/HDL-ON_iOS/Other/Siri/SiriBaseView.designer.cs new file mode 100644 index 0000000..f6eb304 --- /dev/null +++ b/HDL-ON_iOS/Other/Siri/SiriBaseView.designer.cs @@ -0,0 +1,21 @@ +锘�// WARNING +// +// This file has been generated automatically by Xamarin Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. +// +using Foundation; +using System; +using System.CodeDom.Compiler; +using UIKit; + +namespace Other.Siri +{ + [Register("SiriBaseView")] + partial class SiriBaseView + { + void ReleaseDesignerOutlets() + { + } + } +} diff --git a/HDL-ON_iOS/Other/Siri/SiriBaseView.xib b/HDL-ON_iOS/Other/Siri/SiriBaseView.xib new file mode 100644 index 0000000..0e30fad --- /dev/null +++ b/HDL-ON_iOS/Other/Siri/SiriBaseView.xib @@ -0,0 +1,21 @@ +锘�<?xml version="1.0" encoding="UTF-8" standalone="no"?> + +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> + + + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SiriBaseView"> + <connections> + <outlet property="view" destination="2" id="RRd-Eg-VrN"/> + </connections> + </placeholder> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <view contentMode="scaleToFill" id="2"> + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </objects> +</document> diff --git a/HDL-ON_iOS/Other/SkipControl.cs b/HDL-ON_iOS/Other/SkipControl.cs new file mode 100644 index 0000000..0de65c3 --- /dev/null +++ b/HDL-ON_iOS/Other/SkipControl.cs @@ -0,0 +1,34 @@ +锘縰sing System; +using CoreGraphics; +using Other.Siri; +using UIKit; + +namespace Other +{ + public class SkipControl + { + public SkipControl() + { + } + + public void SkipSiriView() + { + var user = new SiriBaseView(); + user.View.BackgroundColor = UIColor.Magenta; + + var btn = UIButton.FromType(UIButtonType.System); + btn.Frame = new CGRect(20, 200, 280, 44); + btn.SetTitle("Click Me", UIControlState.Normal); + + + HDL_ON_iOS.AppDelegate.rootViewController.NavigationBarHidden = true; + HDL_ON_iOS.AppDelegate.rootViewController.NavigationBarHidden = false; + HDL_ON_iOS.AppDelegate.rootViewController.PushViewController(user, true); + btn.TouchUpInside += (sender, e) => + { + }; + + user.View.AddSubview(btn); + } + } +} diff --git a/HDL_APP_Project.sln b/HDL_APP_Project.sln index 248ef6a..cc499ca 100644 --- a/HDL_APP_Project.sln +++ b/HDL_APP_Project.sln @@ -10,7 +10,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriLibrary", "SiriLibrary\SiriLibrary.csproj", "{C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriBinding", "SiriBinding\SiriBinding.csproj", "{77FFAB61-395D-4AD3-863E-C4E32B5038E7}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -65,18 +65,18 @@ {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhone.Build.0 = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|Any CPU.Build.0 = Release|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhone.ActiveCfg = Release|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhone.Build.0 = Release|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|iPhone.Build.0 = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|Any CPU.Build.0 = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|iPhone.ActiveCfg = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|iPhone.Build.0 = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {77FFAB61-395D-4AD3-863E-C4E32B5038E7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index bdb35c9..9fcc952 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -198,6 +198,12 @@ bool b = false; btnIcon.MouseUpEventHandler += (sender, e) => { +#if __IOS__ + var dd =new Other.SkipControl(); + dd.SkipSiriView(); + return; +#endif + //ESOnVideo.Current.Test(false); //return; diff --git a/SiriBinding/ApiDefinition.cs b/SiriBinding/ApiDefinition.cs new file mode 100644 index 0000000..b615dca --- /dev/null +++ b/SiriBinding/ApiDefinition.cs @@ -0,0 +1,86 @@ +锘縰sing System; + +using ObjCRuntime; +using Foundation; +using UIKit; +using Intents; + +namespace HdlSiri +{ + // @interface HDLRunSceneIntent : INIntent + [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + [BaseType(typeof(INIntent))] + interface HDLRunSceneIntent + { + // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneName; + [NullAllowed, Export("sceneName")] + string SceneName { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneId; + [NullAllowed, Export("sceneId")] + string SceneId { get; set; } + } + + // @protocol HDLRunSceneIntentHandling <NSObject> + /* + Check whether adding [Model] to this declaration is appropriate. + [Model] is used to generate a C# class that implements this protocol, + and might be useful for protocols that consumers are supposed to implement, + since consumers can subclass the generated class instead of implementing + the generated interface. If consumers are not supposed to implement this + protocol, then [Model] is redundant and will generate code that will never + be used. + */ + [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + [Protocol] + [BaseType(typeof(NSObject))] + interface HDLRunSceneIntentHandling + { + // @required -(void)handleRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("handle(intent:completion:)"))); + [Abstract] + [Export("handleRunScene:completion:")] + void HandleRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); + + // @optional -(void)confirmRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("confirm(intent:completion:)"))); + [Export("confirmRunScene:completion:")] + void ConfirmRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); + } + + // @interface HDLRunSceneIntentResponse : INIntentResponse + [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + [BaseType(typeof(INIntentResponse))] + [DisableDefaultCtor] + interface HDLRunSceneIntentResponse + { + // -(instancetype _Nonnull)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(NSUserActivity * _Nullable)userActivity __attribute__((objc_designated_initializer)); + [Export("initWithCode:userActivity:")] + [DesignatedInitializer] + IntPtr Constructor(HDLRunSceneIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); + + // +(instancetype _Nonnull)successIntentResponseWithSceneName:(NSString * _Nonnull)sceneName __attribute__((swift_name("success(sceneName:)"))); + [Static] + [Export("successIntentResponseWithSceneName:")] + HDLRunSceneIntentResponse SuccessIntentResponseWithSceneName(string sceneName); + + // +(instancetype _Nonnull)failureIntentResponseWithErrorMessage:(NSString * _Nonnull)errorMessage __attribute__((swift_name("failure(errorMessage:)"))); + [Static] + [Export("failureIntentResponseWithErrorMessage:")] + HDLRunSceneIntentResponse FailureIntentResponseWithErrorMessage(string errorMessage); + + // @property (readwrite, copy, nonatomic) NSString * _Nullable errorMessage; + [NullAllowed, Export("errorMessage")] + string ErrorMessage { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable successMessage; + [NullAllowed, Export("successMessage")] + string SuccessMessage { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneName; + [NullAllowed, Export("sceneName")] + string SceneName { get; set; } + + // @property (readonly, nonatomic) HDLRunSceneIntentResponseCode code; + [Export("code")] + HDLRunSceneIntentResponseCode Code { get; } + } +} \ No newline at end of file diff --git a/SiriBinding/Properties/AssemblyInfo.cs b/SiriBinding/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cb6dc2e --- /dev/null +++ b/SiriBinding/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; + +using Foundation; + +// This attribute allows you to mark your assemblies as 鈥渟afe to link鈥�. +// When the attribute is present, the linker鈥攊f enabled鈥攚ill process the assembly +// even if you鈥檙e using the 鈥淟ink SDK assemblies only鈥� option, which is the default for device builds. + +[assembly: LinkerSafe] + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("NativeLibrary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NativeLibrary")] +[assembly: AssemblyCopyright("Copyright 漏 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] diff --git a/SiriLibrary/SiriLibrary.csproj b/SiriBinding/SiriBinding.csproj similarity index 63% rename from SiriLibrary/SiriLibrary.csproj rename to SiriBinding/SiriBinding.csproj index 4f46429..4e8e70a 100644 --- a/SiriLibrary/SiriLibrary.csproj +++ b/SiriBinding/SiriBinding.csproj @@ -1,17 +1,15 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{C23E5F00-6F1B-4FEB-80F6-04D9C756A23B}</ProjectGuid> - <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <TemplateGuid>{a52b8a63-bc84-4b47-910d-692533484892}</TemplateGuid> + <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ProjectGuid>{77FFAB61-395D-4AD3-863E-C4E32B5038E7}</ProjectGuid> + <TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid> <OutputType>Library</OutputType> - <RootNamespace>SiriLibrary</RootNamespace> + <RootNamespace>NativeLibrary</RootNamespace> <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> - <AssemblyName>SiriLibrary</AssemblyName> + <AssemblyName>NativeLibrary</AssemblyName> <RestoreProjectStyle>PackageReference</RestoreProjectStyle> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -22,6 +20,7 @@ <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>portable</DebugType> @@ -29,19 +28,29 @@ <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <ItemGroup> <Reference Include="System" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Core" /> <Reference Include="Xamarin.iOS" /> </ItemGroup> <ItemGroup> <Folder Include="Resources\" /> </ItemGroup> <ItemGroup> - <Compile Include="Class1.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> - <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> + <ItemGroup> + <ObjcBindingApiDefinition Include="ApiDefinition.cs" /> + </ItemGroup> + <ItemGroup> + <ObjcBindingCoreSource Include="Structs.cs" /> + </ItemGroup> + <ItemGroup> + <NativeReference Include="..\ThirdPartyIntegration\siri\libOnProSiriIntents.a"> + <Kind>Static</Kind> + <SmartLink>False</SmartLink> + </NativeReference> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/SiriBinding/Structs.cs b/SiriBinding/Structs.cs new file mode 100644 index 0000000..e76f100 --- /dev/null +++ b/SiriBinding/Structs.cs @@ -0,0 +1,18 @@ +锘縰sing ObjCRuntime; + +namespace HdlSiri +{ + [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + [Native] + public enum HDLRunSceneIntentResponseCode : long + { + Unspecified = 0, + Ready, + ContinueInApp, + InProgress, + Success, + Failure, + FailureRequiringAppLaunch, + Error = 100 + } +} diff --git a/SiriLibrary/Class1.cs b/SiriLibrary/Class1.cs deleted file mode 100644 index 9bb5fcd..0000000 --- a/SiriLibrary/Class1.cs +++ /dev/null @@ -1,11 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace SiriLibrary -{ - public class Class1 - { - } -} diff --git a/SiriLibrary/Properties/AssemblyInfo.cs b/SiriLibrary/Properties/AssemblyInfo.cs deleted file mode 100644 index 5d687c3..0000000 --- a/SiriLibrary/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -锘縰sing System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SiriLibrary")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SiriLibrary")] -[assembly: AssemblyCopyright("Copyright 漏 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ThirdPartyIntegration/siri/libOnProSiriIntents.a b/ThirdPartyIntegration/siri/libOnProSiriIntents.a new file mode 100644 index 0000000..ac2add9 --- /dev/null +++ b/ThirdPartyIntegration/siri/libOnProSiriIntents.a Binary files differ -- Gitblit v1.8.0