JLChen
2021-11-17 1c6fec7f66cb4864eb4cc17ac8c529dc05e6995d
2021-11-17 1.更新
54个文件已添加
1个文件已修改
3404 ■■■■■ 已修改文件
.gitignore 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.pbxproj 356 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.xcworkspace/contents.xcworkspacedata 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri.xcodeproj/xcshareddata/xcschemes/HDLSceneSiri.xcscheme 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLRunSceneIntent.h 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLRunSceneIntent.m 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSceneSiri.h 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSceneSiri.m 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListCell.h 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListCell.m 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListViewController.h 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListViewController.m 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneModel.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneModel.m 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/TopBarView.h 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiri/HDLSceneSiri/TopBarView.m 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.pbxproj 432 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/AppDelegate.h 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/AppDelegate.m 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/AccentColor.colorset/Contents.json 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/AppIcon.appiconset/Contents.json 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/Contents.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/ic_nav_back@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/ic_nav_back@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Base.lproj/LaunchScreen.storyboard 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Base.lproj/Main.storyboard 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLRunSceneIntent.h 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLRunSceneIntent.m 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSceneSiri.h 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSceneSiri.m 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListCell.h 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListCell.m 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListViewController.h 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListViewController.m 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneModel.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneModel.m 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/TopBarView.h 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/TopBarView.m 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiriDemo.entitlements 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/Info.plist 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/SceneDelegate.h 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/SceneDelegate.m 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/ViewController.h 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/ViewController.m 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLSceneSiriDemo/HDLSceneSiriDemo/main.m 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri.sln 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Library/libHDLSceneSiri.a 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Properties/AssemblyInfo.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri.csproj 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Structs.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1,6 +1,23 @@
# Created by https://www.gitignore.io/api/xcode
# Edit at https://www.gitignore.io/?templates=xcode
### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## User settings
xcuserdata/
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
@@ -9,18 +26,207 @@
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/
## Xcode Patch
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
### Xcode Patch ###
**/xcshareddata/WorkspaceSettings.xcsettings
# End of https://www.gitignore.io/api/xcode
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
build/
bld/
[Bb]in/
[Oo]bj/
.vs/
packages/
.DS_Store
# Roslyn cache directories
*.ide/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
*.pubxml
# NuGet Packages
packages/*
*.nupkg
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config
# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.pbxproj
New file
@@ -0,0 +1,356 @@
// !$*UTF8*$!
{
    archiveVersion = 1;
    classes = {
    };
    objectVersion = 55;
    objects = {
/* Begin PBXBuildFile section */
        B9D2528B2744ECAA0053C15F /* HDLSceneSiri.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D2528A2744ECAA0053C15F /* HDLSceneSiri.m */; };
        B9D2528C2744ECAA0053C15F /* HDLSceneSiri.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B9D252892744ECAA0053C15F /* HDLSceneSiri.h */; };
        B9D2529C2744ECCB0053C15F /* TopBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D252942744ECCB0053C15F /* TopBarView.m */; };
        B9D2529D2744ECCB0053C15F /* HDLSiriSceneListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D252952744ECCB0053C15F /* HDLSiriSceneListCell.m */; };
        B9D2529E2744ECCB0053C15F /* HDLSiriSceneModel.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D252962744ECCB0053C15F /* HDLSiriSceneModel.m */; };
        B9D2529F2744ECCB0053C15F /* HDLSiriSceneListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D252972744ECCB0053C15F /* HDLSiriSceneListViewController.m */; };
        B9D252A02744ECCB0053C15F /* HDLRunSceneIntent.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D2529B2744ECCB0053C15F /* HDLRunSceneIntent.m */; };
        B9D252A22744ED2E0053C15F /* HDLRunSceneIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = B9D252922744ECCB0053C15F /* HDLRunSceneIntent.h */; settings = {ATTRIBUTES = (Public, ); }; };
        B9D252A32744ED350053C15F /* HDLSiriSceneListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B9D252992744ECCB0053C15F /* HDLSiriSceneListViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
        B9D252A42744ED380053C15F /* HDLSiriSceneModel.h in Headers */ = {isa = PBXBuildFile; fileRef = B9D252982744ECCB0053C15F /* HDLSiriSceneModel.h */; settings = {ATTRIBUTES = (Public, ); }; };
        B9D252A82744ED860053C15F /* IntentsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9D252A62744ED860053C15F /* IntentsUI.framework */; };
        B9D252A92744ED860053C15F /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9D252A72744ED860053C15F /* Intents.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
        B9D252842744ECAA0053C15F /* CopyFiles */ = {
            isa = PBXCopyFilesBuildPhase;
            buildActionMask = 2147483647;
            dstPath = "include/$(PRODUCT_NAME)";
            dstSubfolderSpec = 16;
            files = (
                B9D2528C2744ECAA0053C15F /* HDLSceneSiri.h in CopyFiles */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
        B9D252862744ECAA0053C15F /* libHDLSceneSiri.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHDLSceneSiri.a; sourceTree = BUILT_PRODUCTS_DIR; };
        B9D252892744ECAA0053C15F /* HDLSceneSiri.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLSceneSiri.h; sourceTree = "<group>"; };
        B9D2528A2744ECAA0053C15F /* HDLSceneSiri.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLSceneSiri.m; sourceTree = "<group>"; };
        B9D252922744ECCB0053C15F /* HDLRunSceneIntent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLRunSceneIntent.h; sourceTree = "<group>"; };
        B9D252932744ECCB0053C15F /* HDLSiriSceneListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneListCell.h; sourceTree = "<group>"; };
        B9D252942744ECCB0053C15F /* TopBarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopBarView.m; sourceTree = "<group>"; };
        B9D252952744ECCB0053C15F /* HDLSiriSceneListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneListCell.m; sourceTree = "<group>"; };
        B9D252962744ECCB0053C15F /* HDLSiriSceneModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneModel.m; sourceTree = "<group>"; };
        B9D252972744ECCB0053C15F /* HDLSiriSceneListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneListViewController.m; sourceTree = "<group>"; };
        B9D252982744ECCB0053C15F /* HDLSiriSceneModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneModel.h; sourceTree = "<group>"; };
        B9D252992744ECCB0053C15F /* HDLSiriSceneListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneListViewController.h; sourceTree = "<group>"; };
        B9D2529A2744ECCB0053C15F /* TopBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopBarView.h; sourceTree = "<group>"; };
        B9D2529B2744ECCB0053C15F /* HDLRunSceneIntent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLRunSceneIntent.m; sourceTree = "<group>"; };
        B9D252A62744ED860053C15F /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/iOSSupport/System/Library/Frameworks/IntentsUI.framework; sourceTree = DEVELOPER_DIR; };
        B9D252A72744ED860053C15F /* Intents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intents.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Intents.framework; sourceTree = DEVELOPER_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
        B9D252832744ECAA0053C15F /* Frameworks */ = {
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9D252A82744ED860053C15F /* IntentsUI.framework in Frameworks */,
                B9D252A92744ED860053C15F /* Intents.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
        B9D2527D2744ECAA0053C15F = {
            isa = PBXGroup;
            children = (
                B9D252882744ECAA0053C15F /* HDLSceneSiri */,
                B9D252872744ECAA0053C15F /* Products */,
                B9D252A52744ED850053C15F /* Frameworks */,
            );
            sourceTree = "<group>";
        };
        B9D252872744ECAA0053C15F /* Products */ = {
            isa = PBXGroup;
            children = (
                B9D252862744ECAA0053C15F /* libHDLSceneSiri.a */,
            );
            name = Products;
            sourceTree = "<group>";
        };
        B9D252882744ECAA0053C15F /* HDLSceneSiri */ = {
            isa = PBXGroup;
            children = (
                B9D252922744ECCB0053C15F /* HDLRunSceneIntent.h */,
                B9D2529B2744ECCB0053C15F /* HDLRunSceneIntent.m */,
                B9D252932744ECCB0053C15F /* HDLSiriSceneListCell.h */,
                B9D252952744ECCB0053C15F /* HDLSiriSceneListCell.m */,
                B9D252992744ECCB0053C15F /* HDLSiriSceneListViewController.h */,
                B9D252972744ECCB0053C15F /* HDLSiriSceneListViewController.m */,
                B9D252982744ECCB0053C15F /* HDLSiriSceneModel.h */,
                B9D252962744ECCB0053C15F /* HDLSiriSceneModel.m */,
                B9D2529A2744ECCB0053C15F /* TopBarView.h */,
                B9D252942744ECCB0053C15F /* TopBarView.m */,
                B9D252892744ECAA0053C15F /* HDLSceneSiri.h */,
                B9D2528A2744ECAA0053C15F /* HDLSceneSiri.m */,
            );
            path = HDLSceneSiri;
            sourceTree = "<group>";
        };
        B9D252A52744ED850053C15F /* Frameworks */ = {
            isa = PBXGroup;
            children = (
                B9D252A72744ED860053C15F /* Intents.framework */,
                B9D252A62744ED860053C15F /* IntentsUI.framework */,
            );
            name = Frameworks;
            sourceTree = "<group>";
        };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
        B9D252A12744ED190053C15F /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9D252A22744ED2E0053C15F /* HDLRunSceneIntent.h in Headers */,
                B9D252A42744ED380053C15F /* HDLSiriSceneModel.h in Headers */,
                B9D252A32744ED350053C15F /* HDLSiriSceneListViewController.h in Headers */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
        B9D252852744ECAA0053C15F /* HDLSceneSiri */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = B9D2528F2744ECAA0053C15F /* Build configuration list for PBXNativeTarget "HDLSceneSiri" */;
            buildPhases = (
                B9D252A12744ED190053C15F /* Headers */,
                B9D252822744ECAA0053C15F /* Sources */,
                B9D252832744ECAA0053C15F /* Frameworks */,
                B9D252842744ECAA0053C15F /* CopyFiles */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = HDLSceneSiri;
            productName = HDLSceneSiri;
            productReference = B9D252862744ECAA0053C15F /* libHDLSceneSiri.a */;
            productType = "com.apple.product-type.library.static";
        };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
        B9D2527E2744ECAA0053C15F /* Project object */ = {
            isa = PBXProject;
            attributes = {
                BuildIndependentTargetsInParallel = 1;
                LastUpgradeCheck = 1300;
                TargetAttributes = {
                    B9D252852744ECAA0053C15F = {
                        CreatedOnToolsVersion = 13.0;
                    };
                };
            };
            buildConfigurationList = B9D252812744ECAA0053C15F /* Build configuration list for PBXProject "HDLSceneSiri" */;
            compatibilityVersion = "Xcode 13.0";
            developmentRegion = en;
            hasScannedForEncodings = 0;
            knownRegions = (
                en,
                Base,
            );
            mainGroup = B9D2527D2744ECAA0053C15F;
            productRefGroup = B9D252872744ECAA0053C15F /* Products */;
            projectDirPath = "";
            projectRoot = "";
            targets = (
                B9D252852744ECAA0053C15F /* HDLSceneSiri */,
            );
        };
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
        B9D252822744ECAA0053C15F /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9D2529E2744ECCB0053C15F /* HDLSiriSceneModel.m in Sources */,
                B9D252A02744ECCB0053C15F /* HDLRunSceneIntent.m in Sources */,
                B9D2529D2744ECCB0053C15F /* HDLSiriSceneListCell.m in Sources */,
                B9D2529F2744ECCB0053C15F /* HDLSiriSceneListViewController.m in Sources */,
                B9D2529C2744ECCB0053C15F /* TopBarView.m in Sources */,
                B9D2528B2744ECAA0053C15F /* HDLSceneSiri.m in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
        B9D2528D2744ECAA0053C15F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ANALYZER_NONNULL = YES;
                CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
                CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
                CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
                CLANG_WARN_EMPTY_BODY = YES;
                CLANG_WARN_ENUM_CONVERSION = YES;
                CLANG_WARN_INFINITE_RECURSION = YES;
                CLANG_WARN_INT_CONVERSION = YES;
                CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = dwarf;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                ENABLE_TESTABILITY = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                GCC_DYNAMIC_NO_PIC = NO;
                GCC_NO_COMMON_BLOCKS = YES;
                GCC_OPTIMIZATION_LEVEL = 0;
                GCC_PREPROCESSOR_DEFINITIONS = (
                    "DEBUG=1",
                    "$(inherited)",
                );
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                GCC_WARN_UNUSED_FUNCTION = YES;
                GCC_WARN_UNUSED_VARIABLE = YES;
                IPHONEOS_DEPLOYMENT_TARGET = 11.0;
                MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
                MTL_FAST_MATH = YES;
                ONLY_ACTIVE_ARCH = YES;
                SDKROOT = iphoneos;
            };
            name = Debug;
        };
        B9D2528E2744ECAA0053C15F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ANALYZER_NONNULL = YES;
                CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
                CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
                CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
                CLANG_WARN_EMPTY_BODY = YES;
                CLANG_WARN_ENUM_CONVERSION = YES;
                CLANG_WARN_INFINITE_RECURSION = YES;
                CLANG_WARN_INT_CONVERSION = YES;
                CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                ENABLE_NS_ASSERTIONS = NO;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                GCC_NO_COMMON_BLOCKS = YES;
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                GCC_WARN_UNUSED_FUNCTION = YES;
                GCC_WARN_UNUSED_VARIABLE = YES;
                IPHONEOS_DEPLOYMENT_TARGET = 11.0;
                MTL_ENABLE_DEBUG_INFO = NO;
                MTL_FAST_MATH = YES;
                SDKROOT = iphoneos;
                VALIDATE_PRODUCT = YES;
            };
            name = Release;
        };
        B9D252902744ECAA0053C15F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                CODE_SIGN_STYLE = Automatic;
                DEVELOPMENT_TEAM = BVTA78PRYA;
                OTHER_LDFLAGS = "-ObjC";
                PRODUCT_NAME = "$(TARGET_NAME)";
                SKIP_INSTALL = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Debug;
        };
        B9D252912744ECAA0053C15F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                CODE_SIGN_STYLE = Automatic;
                DEVELOPMENT_TEAM = BVTA78PRYA;
                OTHER_LDFLAGS = "-ObjC";
                PRODUCT_NAME = "$(TARGET_NAME)";
                SKIP_INSTALL = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Release;
        };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
        B9D252812744ECAA0053C15F /* Build configuration list for PBXProject "HDLSceneSiri" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B9D2528D2744ECAA0053C15F /* Debug */,
                B9D2528E2744ECAA0053C15F /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        B9D2528F2744ECAA0053C15F /* Build configuration list for PBXNativeTarget "HDLSceneSiri" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B9D252902744ECAA0053C15F /* Debug */,
                B9D252912744ECAA0053C15F /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
/* End XCConfigurationList section */
    };
    rootObject = B9D2527E2744ECAA0053C15F /* Project object */;
}
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.xcworkspace/contents.xcworkspacedata
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>
HDLSceneSiri/HDLSceneSiri.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
New file
@@ -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>IDEDidComputeMac32BitWarning</key>
    <true/>
</dict>
</plist>
HDLSceneSiri/HDLSceneSiri.xcodeproj/xcshareddata/xcschemes/HDLSceneSiri.xcscheme
New file
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1300"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "B9D252852744ECAA0053C15F"
               BuildableName = "libHDLSceneSiri.a"
               BlueprintName = "HDLSceneSiri"
               ReferencedContainer = "container:HDLSceneSiri.xcodeproj">
            </BuildableReference>
         </BuildActionEntry>
      </BuildActionEntries>
   </BuildAction>
   <TestAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES">
      <Testables>
      </Testables>
   </TestAction>
   <LaunchAction
      buildConfiguration = "Release"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      launchStyle = "0"
      useCustomWorkingDirectory = "NO"
      ignoresPersistentStateOnLaunch = "NO"
      debugDocumentVersioning = "YES"
      debugServiceExtension = "internal"
      allowLocationSimulation = "YES">
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "B9D252852744ECAA0053C15F"
            BuildableName = "libHDLSceneSiri.a"
            BlueprintName = "HDLSceneSiri"
            ReferencedContainer = "container:HDLSceneSiri.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
HDLSceneSiri/HDLSceneSiri/HDLRunSceneIntent.h
New file
@@ -0,0 +1,108 @@
//
// HDLRunSceneIntent.h
//
// This file was automatically generated and should not be edited.
//
#if __has_include(<Intents/Intents.h>)
#import <Intents/Intents.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@interface HDLRunSceneIntent : INIntent
@property (readwrite, copy, nullable, nonatomic) NSString *sceneName;
@property (readwrite, copy, nullable, nonatomic) NSString *sceneId;
@end
@class HDLRunSceneIntentResponse;
/*!
 @abstract Protocol to declare support for handling a HDLRunSceneIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
 @discussion The minimum requirement for an implementing class is that it should be able to handle the intent. The confirmation method is optional. The handling method is always called last, after confirming the intent.
 */
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@protocol HDLRunSceneIntentHandling <NSObject>
@required
/*!
 @abstract Handling method - Execute the task represented by the HDLRunSceneIntent that's passed in
 @discussion Called to actually execute the intent. The app must return a response for this intent.
 @param  intent The input intent
 @param  completion The response handling block takes a HDLRunSceneIntentResponse containing the details of the result of having executed the intent
 @see  HDLRunSceneIntentResponse
 */
- (void)handleRunScene:(HDLRunSceneIntent *)intent completion:(void (^)(HDLRunSceneIntentResponse *response))completion NS_SWIFT_NAME(handle(intent:completion:));
@optional
/*!
 @abstract Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
 @discussion Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid, and will assume there is no additional information relevant to this intent.
 @param  intent The input intent
 @param  completion The response block contains a HDLRunSceneIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
 @see HDLRunSceneIntentResponse
 */
- (void)confirmRunScene:(HDLRunSceneIntent *)intent completion:(void (^)(HDLRunSceneIntentResponse *response))completion NS_SWIFT_NAME(confirm(intent:completion:));
@end
/*!
 @abstract Constants indicating the state of the response.
 */
typedef NS_ENUM(NSInteger, HDLRunSceneIntentResponseCode) {
    HDLRunSceneIntentResponseCodeUnspecified = 0,
    HDLRunSceneIntentResponseCodeReady,
    HDLRunSceneIntentResponseCodeContinueInApp,
    HDLRunSceneIntentResponseCodeInProgress,
    HDLRunSceneIntentResponseCodeSuccess,
    HDLRunSceneIntentResponseCodeFailure,
    HDLRunSceneIntentResponseCodeFailureRequiringAppLaunch,
    HDLRunSceneIntentResponseCodeError = 100
} API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos);
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@interface HDLRunSceneIntentResponse : INIntentResponse
- (instancetype)init NS_UNAVAILABLE;
/*!
 @abstract Initializes the response object with the specified code and user activity object.
 @discussion The app extension has the option of capturing its private state as an NSUserActivity and returning it as the 'currentActivity'. If the app is launched, an NSUserActivity will be passed in with the private state. The NSUserActivity may also be used to query the app's UI extension (if provided) for a view controller representing the current intent handling state. In the case of app launch, the NSUserActivity will have its activityType set to the name of the intent. This intent object will also be available in the NSUserActivity.interaction property.
 @param  code The response code indicating your success or failure in confirming or handling the intent.
 @param  userActivity The user activity object to use when launching your app. Provide an object if you want to add information that is specific to your app. If you specify nil, the system automatically creates a user activity object for you, sets its type to the class name of the intent being handled, and fills it with an INInteraction object containing the intent and your response.
 */
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity NS_DESIGNATED_INITIALIZER;
/*!
 @abstract Initializes and returns the response object with the success code.
 */
+ (instancetype)successIntentResponseWithSceneName:(NSString *)sceneName NS_SWIFT_NAME(success(sceneName:));
/*!
 @abstract Initializes and returns the response object with the failure code.
 */
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage NS_SWIFT_NAME(failure(errorMessage:));
@property (readwrite, copy, nullable, nonatomic) NSString *errorMessage;
@property (readwrite, copy, nullable, nonatomic) NSString *successMessage;
@property (readwrite, copy, nullable, nonatomic) NSString *sceneName;
/*!
 @abstract The response code indicating your success or failure in confirming or handling the intent.
 */
@property (readonly, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
@end
NS_ASSUME_NONNULL_END
#endif
HDLSceneSiri/HDLSceneSiri/HDLRunSceneIntent.m
New file
@@ -0,0 +1,52 @@
//
// HDLRunSceneIntent.m
//
// This file was automatically generated and should not be edited.
//
#import "HDLRunSceneIntent.h"
#if __has_include(<Intents/Intents.h>) && !TARGET_OS_TV
@implementation HDLRunSceneIntent
@dynamic sceneName, sceneId;
@end
@interface HDLRunSceneIntentResponse ()
@property (readwrite, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
@end
@implementation HDLRunSceneIntentResponse
@synthesize code = _code;
@dynamic errorMessage, successMessage, sceneName;
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity {
    self = [super init];
    if (self) {
        _code = code;
        self.userActivity = userActivity;
    }
    return self;
}
+ (instancetype)successIntentResponseWithSceneName:(NSString *)sceneName {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeSuccess userActivity:nil];
    intentResponse.sceneName = sceneName;
    return intentResponse;
}
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeFailure userActivity:nil];
    intentResponse.errorMessage = errorMessage;
    return intentResponse;
}
@end
#endif
HDLSceneSiri/HDLSceneSiri/HDLSceneSiri.h
New file
@@ -0,0 +1,47 @@
//
//  HDLSceneSiri.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// APP Screen
#define APP_SCREEN_BOUNDS   [[UIScreen mainScreen] bounds]
#define APP_SCREEN_HEIGHT   (APP_SCREEN_BOUNDS.size.height)
#define APP_SCREEN_WIDTH    (APP_SCREEN_BOUNDS.size.width)
#define APP_STATUS_FRAME    [UIApplication sharedApplication].statusBarFrame
// 是否是IPhoneX的设备
#define IPhoneX ([UIApplication sharedApplication].statusBarFrame.size.height >= 44)
#define APP_TOP_BAR_HEIGHT    (IPhoneX ? 88 : 64)
#define APP_STATUS_BAR_HEIGHT (IPhoneX ? 44 : 20)
#define APP_TOOL_BAR_HEIGHT   49
#define APP_TAB_BAR_HEIGHT    (IPhoneX ? (49 + 34): 49)
#define APP_TAB_BOTTOM_HEIGHT (IPhoneX ? 34 : 0)
#define APP_CONTENT_WIDTH     (APP_SCREEN_BOUNDS.size.width)
#define APP_CONTENT_HEIGHT    (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT - APP_TAB_BAR_HEIGHT)
#define APP_VISIBLE_HEIGHT    (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT)
#define APP_CONTENT_HEIGHT_2  (APP_SCREEN_HEIGHT - APP_STATUS_BAR_HEIGHT - APP_TAB_BAR_HEIGHT)
// WEAKSELF_AT
#define WEAKSELF_AT __weak __typeof(&*self)weakSelf_AT = self;
#define HEXCOLORA(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:a]
// 字体颜色
#define COLOR_TEXT HEXCOLORA(0x222222,1.0)
// APP_UIFont
#define APP_UIFont            @"PingFangSC-Regular"//苹方-简 常规体
#define APP_UIFont_BOLD       @"PingFangSC-Semibold"//苹方-简 中粗体
#define APP_UIFont_Medium       @"PingFangSC-Medium"//苹方-简 中黑体
#define Get_FontWithSize(s)     [UIFont fontWithName:APP_UIFont size:s]
#define Get_FontBoldWithSize(s) [UIFont fontWithName:APP_UIFont_BOLD size:s]
#define Get_FontMediumWithSize(s) [UIFont fontWithName:APP_UIFont_Medium size:s]
@interface HDLSceneSiri : NSObject
@end
NS_ASSUME_NONNULL_END
HDLSceneSiri/HDLSceneSiri/HDLSceneSiri.m
New file
@@ -0,0 +1,12 @@
//
//  HDLSceneSiri.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSceneSiri.h"
@implementation HDLSceneSiri
@end
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListCell.h
New file
@@ -0,0 +1,31 @@
//
//  HDLSiriSceneListCell.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
#import <Intents/Intents.h>
#import <IntentsUI/IntentsUI.h>
#import "HDLRunSceneIntent.h"
#import "HDLSiriSceneModel.h"
//#import <HDLSmartKit/HDLSceneModel.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneListCell : UITableViewCell
@property (nonatomic, strong) UIView        *bgView;//背景View
@property (nonatomic, strong) UILabel       *titleLabel;//场景标题
@property (nonatomic, strong) INUIAddVoiceShortcutButton API_AVAILABLE(ios(12.0)) *shortcutButton;//快捷指令按钮
@property (nonatomic, strong) HDLSiriSceneModel  *model;//场景model
-(void)initModel:(HDLSiriSceneModel *)model intent:(HDLRunSceneIntent*)intent API_AVAILABLE(ios(12.0));
@end
NS_ASSUME_NONNULL_END
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListCell.m
New file
@@ -0,0 +1,102 @@
//
//  HDLSiriSceneListCell.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneListCell.h"
#import "HDLSceneSiri.h"
@interface HDLSiriSceneListCell ()<INUIAddVoiceShortcutButtonDelegate>
@end
@implementation HDLSiriSceneListCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        //添加自己需要个子视图控件
        [self addAllChildView];
    }
    return self;
}
///
- (void)addAllChildView{
    self.backgroundColor = [UIColor clearColor];
    self.contentView.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.bgView];
    [self.bgView addSubview:self.titleLabel];
    if (@available(iOS 12.0, *)) {
        [self.bgView addSubview:self.shortcutButton];
    }
}
-(UIView*)bgView{
    if(!_bgView){
        _bgView = [[UIView alloc]initWithFrame:CGRectMake(20, 6, APP_SCREEN_WIDTH - 40, 60)];
        _bgView.backgroundColor = UIColor.whiteColor;
        _bgView.layer.cornerRadius = 12;
        _bgView.layer.masksToBounds = YES;// 隐藏边界
    }
    return _bgView;
}
-(UILabel*)titleLabel{
    if(!_titleLabel){
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(6, 10, APP_SCREEN_WIDTH - 40 - 206, 40)];
        _titleLabel.textColor = COLOR_TEXT;
        _titleLabel.font = Get_FontMediumWithSize(16);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.numberOfLines = 2;
    }
    return _titleLabel;
}
- (INUIAddVoiceShortcutButton*)shortcutButton{
    if(!_shortcutButton){
        _shortcutButton = [[INUIAddVoiceShortcutButton alloc] initWithStyle:INUIAddVoiceShortcutButtonStyleWhite];
//        _shortcutButton.shortcut = [[INShortcut alloc] initWithIntent:self.intent];
        _shortcutButton.translatesAutoresizingMaskIntoConstraints = YES;
        _shortcutButton.frame = CGRectMake(APP_SCREEN_WIDTH - 40 - 150, 6, 150, 48);
        [_shortcutButton setEnabled:NO];
//        _shortcutButton.delegate = self;
    }
    return _shortcutButton;
}
//- (void)setModel:(HDLSceneModel *)model {
//    _model = model;
//    //判空
//    if (_model == nil) return;
//    //处理model数据
//    self.titleLabel.text = model.name;
//}
-(void)initModel:(HDLSiriSceneModel *)model intent:(HDLRunSceneIntent*)intent API_AVAILABLE(ios(12.0)){
    _model = model;
    //判空
    if (_model == nil) return;
    //处理model数据
    self.titleLabel.text = model.name;
    if(intent == nil){
        _shortcutButton.shortcut = [self getINShortcut];
    }else{
        _shortcutButton.shortcut = [[INShortcut alloc] initWithIntent:intent];
    }
}
- (INShortcut *) getINShortcut API_AVAILABLE(ios(12.0)){
    NSString *title = _model.name;
    HDLRunSceneIntent *intent = [[HDLRunSceneIntent alloc] init];
    intent.sceneId = _model.userSceneId;
    intent.suggestedInvocationPhrase = title;   //在Siri语音设置时显示的建议设置唤起文字
    intent.sceneName = title;
    INShortcut *shortCut = [[INShortcut alloc] initWithIntent:intent];
    return shortCut;
}
@end
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListViewController.h
New file
@@ -0,0 +1,20 @@
//
//  HDLSiriSceneListViewController.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneListViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, assign) UITableViewStyle       tableViewStyle;
@property (nonatomic, strong) UITableView            *tableView;
@property (nonatomic, strong) NSMutableArray         *dataSource;
@property (nonatomic, strong) NSString               *titleName;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneListViewController.m
New file
@@ -0,0 +1,290 @@
//
//  HDLSiriSceneListViewController.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneListViewController.h"
#import <Intents/Intents.h>
#import <IntentsUI/IntentsUI.h>
#import "HDLRunSceneIntent.h"   //上方“设置Custom Intents”图中右边箭头指的“Class Name”
#import "HDLSiriSceneListCell.h"
#import "HDLSiriSceneModel.h"
#import "HDLSceneSiri.h"
#import "TopBarView.h"
NSString * const HDLSiriSceneListCellIdentifier  = @"HDLSiriSceneListCellIdentifier";
@interface HDLSiriSceneListViewController ()<INUIAddVoiceShortcutButtonDelegate,INUIAddVoiceShortcutViewControllerDelegate,INUIEditVoiceShortcutViewControllerDelegate>
/// TopBarView
@property (nonatomic, strong)  TopBarView *topBarView;
@property (copy,nonatomic) NSArray *siriShortcutList;
@end
@implementation HDLSiriSceneListViewController
- (instancetype)init {
    if (self = [super init]) {
        _tableViewStyle = UITableViewStylePlain;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
    self.view.backgroundColor = HEXCOLORA(0xF7F7FC,1.0);
    [self initView];
    // Do any additional setup after loading the view.
}
/// initView
- (void)initView{
    //标题
    if(self.titleName == nil || [self.titleName isEqual:@""]){
        self.titleName = @"Siri快捷指令";
    }
    [self setTopBarViewWithTitle:self.titleName];
    [self initTableView];
    [self refreshSiri];
}
#pragma mark - TopBarView
- (TopBarView *)topBarView{
    if (!_topBarView) {
        _topBarView = [[TopBarView alloc] initWithFrame: CGRectMake(0, 0, APP_SCREEN_WIDTH, 40)];
        [_topBarView.backButton addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    }
    return _topBarView;
}
//设置标题和返回按钮
- (void)setTopBarViewWithTitle:(NSString *)title{
    [self.view addSubview:self.topBarView];
    self.topBarView.backgroundColor = UIColor.whiteColor;
    self.topBarView.titleLabel.text = title;
}
//返回
- (void)goBack{
    if ([self.navigationController.viewControllers indexOfObject:self] == 0) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
    else {
        [self.navigationController popViewControllerAnimated:YES];
//        [self.navigationController popToRootViewControllerAnimated:YES];
    }
}
#pragma mark - UITableView
- (UITableView *)tableView
{
    if (!_tableView)
    {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, APP_SCREEN_WIDTH, 0) style:self.tableViewStyle];
//        _tableView.backgroundColor = COLOR_MAIN_BACKGROUND;
        _tableView.backgroundColor = UIColor.clearColor;
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.showsHorizontalScrollIndicator = NO;
        _tableView.separatorStyle = NO;
        _tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
        _tableView.dataSource = self;
        _tableView.delegate = self;
    }
    return _tableView;
}
- (void)initTableView{
    self.tableView.frame = CGRectMake(0, APP_TOP_BAR_HEIGHT + 12, APP_SCREEN_WIDTH, APP_VISIBLE_HEIGHT - APP_TAB_BOTTOM_HEIGHT-12);
//    self.tableView.backgroundColor = HEXCOLORA(0xF7F7FC,1.0);
    [self.view addSubview:self.tableView];
    //    [self.tableView reloadData];
}
#pragma mark - UITableViewDataSourceXW
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HDLSiriSceneListCell *cell = [tableView dequeueReusableCellWithIdentifier:HDLSiriSceneListCellIdentifier];
    if (cell == nil) {
        cell = [[HDLSiriSceneListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:HDLSiriSceneListCellIdentifier];
    }
    HDLSiriSceneModel *model = self.dataSource[indexPath.row];
    if(model){
        if (@available(iOS 12.0, *)) {
            HDLRunSceneIntent *intent = [self getSceneIntent: model.userSceneId];
            [cell initModel:model intent:intent];
        }
    }
    return cell;
}
#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 72;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (@available(iOS 12.0, *)) {
        HDLSiriSceneModel *model = self.dataSource[indexPath.row];
        if(model){
            INVoiceShortcut *voiceShortcut = [self getSceneINVoiceShortcut:model.userSceneId];
            [self addOrEditVoiceShortcut:voiceShortcut model:model];
        }
    }
}
/// 添加或者编辑快捷指令
/// @param voiceShortcut 快捷指令
/// @param model 场景
-(void)addOrEditVoiceShortcut:(INVoiceShortcut *)voiceShortcut model:(HDLSiriSceneModel*)model API_AVAILABLE(ios(12.0)){
    if(voiceShortcut==nil){
        //1.如果不存在则添加
        INUIAddVoiceShortcutViewController *vc = [[INUIAddVoiceShortcutViewController alloc] initWithShortcut:[self getINShortcut:model]];
        vc.delegate = self;
        if(@available(iOS 13.0, *)) {
            vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
        }
        [self presentViewController:vc animated:YES completion:nil];
    }else{
        //2.存在则编辑
        INUIEditVoiceShortcutViewController* vc = [[INUIEditVoiceShortcutViewController alloc] initWithVoiceShortcut:voiceShortcut];
        vc.delegate = self;
        if(@available(iOS 13.0, *)) {
            vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
        }
        [self presentViewController:vc animated:YES completion:nil];
    }
}
- (INShortcut *) getINShortcut:(HDLSiriSceneModel*)model API_AVAILABLE(ios(12.0)){
    NSString *title = model.name;
    HDLRunSceneIntent *intent = [[HDLRunSceneIntent alloc] init];
    intent.sceneId = model.userSceneId;
    intent.suggestedInvocationPhrase = title;   //在Siri语音设置时显示的建议设置唤起文字
    intent.sceneName = title;
    INShortcut *shortCut = [[INShortcut alloc] initWithIntent:intent];
    return shortCut;
}
/// 根据场景ID或者之前配置过低快捷指令
/// @param sceneId 场景ID
- (HDLRunSceneIntent*)getSceneIntent:(NSString *)sceneId API_AVAILABLE(ios(12.0)){
    HDLRunSceneIntent *intentFind = nil;
    for (INVoiceShortcut *voiceShortcut in self.siriShortcutList) {
        HDLRunSceneIntent *intent = (HDLRunSceneIntent *)voiceShortcut.shortcut.intent;
        if(intent){
            if([intent.sceneId isEqualToString:sceneId]){
                intentFind = intent;
                break;
            }
        }
    }
    return intentFind;
}
/// 根据场景ID或者之前配置过低快捷指令
/// @param sceneId 场景ID
- (INVoiceShortcut*)getSceneINVoiceShortcut:(NSString *)sceneId API_AVAILABLE(ios(12.0)){
    INVoiceShortcut *voiceShortcutFind = nil;
    for (INVoiceShortcut *voiceShortcut in self.siriShortcutList) {
        HDLRunSceneIntent *intent = (HDLRunSceneIntent *)voiceShortcut.shortcut.intent;
        if(intent){
            if([intent.sceneId isEqualToString:sceneId]){
                voiceShortcutFind = voiceShortcut;
                break;
            }
        }
    }
    return voiceShortcutFind;
}
#pragma mark - refreshSiri
- (BOOL)checkCurrentClass:(INVoiceShortcut*)voiceShortcut API_AVAILABLE(ios(12.0)){
    return [voiceShortcut.shortcut.intent isKindOfClass:[HDLRunSceneIntent class]];
}
/// refreshSiri
- (void)refreshSiri {
    if (@available(iOS 12.0, *)) {
        NSMutableArray *temp = [NSMutableArray array];
        [[INVoiceShortcutCenter sharedCenter] getAllVoiceShortcutsWithCompletion:^(NSArray<INVoiceShortcut *> * _Nullable voiceShortcuts, NSError * _Nullable error) {
            //该方法不是在主线程运行的,所以如果ok了需要回到主线程来
            dispatch_async(dispatch_get_main_queue(), ^{
                for (INVoiceShortcut *voiceShortcut in voiceShortcuts) {
                    if ([self checkCurrentClass:voiceShortcut]) {
                        [temp addObject:voiceShortcut];
                    }
                }
                self.siriShortcutList = [NSArray arrayWithArray:temp];
                [self.tableView reloadData];
            });
        }];
    }
    [self.tableView reloadData];
}
#pragma mark - INUIAddVoiceShortcutButtonDelegate
- (void)presentAddVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)addVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton API_AVAILABLE(ios(12.0)){
    addVoiceShortcutViewController.delegate = self;
    if(@available(iOS 13.0, *)) {
        addVoiceShortcutViewController.modalPresentationStyle = UIModalPresentationOverFullScreen;
    }
    [self presentViewController:addVoiceShortcutViewController animated:YES completion:nil];
}
- (void)presentEditVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)editVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton API_AVAILABLE(ios(12.0)){
    editVoiceShortcutViewController.delegate = self;
    if(@available(iOS 13.0, *)) {
        editVoiceShortcutViewController.modalPresentationStyle = UIModalPresentationOverFullScreen;
    }
    [self presentViewController:editVoiceShortcutViewController animated:YES completion:nil];
}
#pragma mark - INUIAddVoiceShortcutViewControllerDelegate
- (void)addVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)controller didFinishWithVoiceShortcut:(INVoiceShortcut *)voiceShortcut error:(NSError *)error
API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)addVoiceShortcutViewControllerDidCancel:(INUIAddVoiceShortcutViewController *)controller API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - INUIEditVoiceShortcutViewControllerDelegate
- (void)editVoiceShortcutViewControllerDidCancel:(INUIEditVoiceShortcutViewController *)controller API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didUpdateVoiceShortcut:(INVoiceShortcut *)voiceShortcut error:(NSError *)error API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didDeleteVoiceShortcutWithIdentifier:(NSUUID *)deletedVoiceShortcutIdentifier API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
@end
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneModel.h
New file
@@ -0,0 +1,17 @@
//
//  HDLSiriSceneModel.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneModel : NSObject
@property (nonatomic, copy)   NSString *userSceneId;
@property (nonatomic, copy)   NSString *name;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiri/HDLSceneSiri/HDLSiriSceneModel.m
New file
@@ -0,0 +1,12 @@
//
//  HDLSiriSceneModel.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneModel.h"
@implementation HDLSiriSceneModel
@end
HDLSceneSiri/HDLSceneSiri/TopBarView.h
New file
@@ -0,0 +1,21 @@
//
//  TopBarView.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/5/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TopBarView : UIView
@property (nonatomic, strong) UIButton      *backButton;//返回按钮
@property (nonatomic, strong) UILabel       *titleLabel;//标题
-(void)setTitle:(NSString *)title;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiri/HDLSceneSiri/TopBarView.m
New file
@@ -0,0 +1,71 @@
//
//  TopBarView.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/5/18.
//
#import "TopBarView.h"
#import "HDLSceneSiri.h"
@interface TopBarView()
@end
@implementation TopBarView
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.frame = CGRectMake(0, 0, APP_SCREEN_WIDTH, APP_TOP_BAR_HEIGHT);
        [self addSubview:self.backButton];
        [self addSubview:self.titleLabel];
    }
    return self;
}
- (UIButton*)backButton{
    if(!_backButton){
        //buttonWithType UIButtonTypeSystem 设置tintColor 就可以改变图片的颜色
        _backButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _backButton.frame = CGRectMake(0, APP_STATUS_BAR_HEIGHT, 39, 44);
        [_backButton setImage:[UIImage imageNamed:@"ic_nav_back"] forState:UIControlStateNormal];
        //按钮图标颜色
        _backButton.tintColor = COLOR_TEXT;
    }
    return _backButton;
}
- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [self NewLabel:CGRectMake(40, APP_STATUS_BAR_HEIGHT, APP_SCREEN_WIDTH - 80, 44) font:Get_FontMediumWithSize(16) textColor:COLOR_TEXT text:@""];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}
- (UILabel *)NewLabel:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)color text:(NSString *)text{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.backgroundColor = [UIColor clearColor];
    label.font = font;
    if (color != nil) {
        label.textColor = color;
    }
    label.text = text;
    return label;
}
//
-(void)backButtonClick{
}
-(void)setTitle:(NSString *)title{
    self.titleLabel.text = title;
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.pbxproj
New file
@@ -0,0 +1,432 @@
// !$*UTF8*$!
{
    archiveVersion = 1;
    classes = {
    };
    objectVersion = 55;
    objects = {
/* Begin PBXBuildFile section */
        B9595E4F2744D77800948DB9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E4E2744D77800948DB9 /* AppDelegate.m */; };
        B9595E522744D77800948DB9 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E512744D77800948DB9 /* SceneDelegate.m */; };
        B9595E552744D77800948DB9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E542744D77800948DB9 /* ViewController.m */; };
        B9595E582744D77800948DB9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9595E562744D77800948DB9 /* Main.storyboard */; };
        B9595E5A2744D77D00948DB9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9595E592744D77D00948DB9 /* Assets.xcassets */; };
        B9595E5D2744D77D00948DB9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9595E5B2744D77D00948DB9 /* LaunchScreen.storyboard */; };
        B9595E602744D77D00948DB9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E5F2744D77D00948DB9 /* main.m */; };
        B9595E6B2744D80400948DB9 /* HDLSiriSceneListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E682744D80400948DB9 /* HDLSiriSceneListCell.m */; };
        B9595E6C2744D80400948DB9 /* HDLSiriSceneListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E6A2744D80400948DB9 /* HDLSiriSceneListViewController.m */; };
        B9595E7B2744D9D200948DB9 /* HDLRunSceneIntent.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E792744D9D200948DB9 /* HDLRunSceneIntent.m */; };
        B9595E7E2744DA3B00948DB9 /* HDLSiriSceneModel.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E7D2744DA3B00948DB9 /* HDLSiriSceneModel.m */; };
        B9595E812744DA7000948DB9 /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9595E802744DA7000948DB9 /* Intents.framework */; };
        B9595E842744DC9000948DB9 /* HDLSceneSiri.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E832744DC8F00948DB9 /* HDLSceneSiri.m */; };
        B9595E9A2744E00100948DB9 /* TopBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = B9595E992744E00100948DB9 /* TopBarView.m */; };
        B9595E9D2744E5E900948DB9 /* IntentsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9595E9C2744E5E900948DB9 /* IntentsUI.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
        B9595E4A2744D77800948DB9 /* HDLSceneSiriDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HDLSceneSiriDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
        B9595E4D2744D77800948DB9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
        B9595E4E2744D77800948DB9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
        B9595E502744D77800948DB9 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
        B9595E512744D77800948DB9 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
        B9595E532744D77800948DB9 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
        B9595E542744D77800948DB9 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
        B9595E572744D77800948DB9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
        B9595E592744D77D00948DB9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
        B9595E5C2744D77D00948DB9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
        B9595E5E2744D77D00948DB9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
        B9595E5F2744D77D00948DB9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
        B9595E672744D80400948DB9 /* HDLSiriSceneListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneListCell.h; sourceTree = "<group>"; };
        B9595E682744D80400948DB9 /* HDLSiriSceneListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneListCell.m; sourceTree = "<group>"; };
        B9595E692744D80400948DB9 /* HDLSiriSceneListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneListViewController.h; sourceTree = "<group>"; };
        B9595E6A2744D80400948DB9 /* HDLSiriSceneListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneListViewController.m; sourceTree = "<group>"; };
        B9595E792744D9D200948DB9 /* HDLRunSceneIntent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLRunSceneIntent.m; sourceTree = "<group>"; };
        B9595E7A2744D9D200948DB9 /* HDLRunSceneIntent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLRunSceneIntent.h; sourceTree = "<group>"; };
        B9595E7C2744DA3B00948DB9 /* HDLSiriSceneModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLSiriSceneModel.h; sourceTree = "<group>"; };
        B9595E7D2744DA3B00948DB9 /* HDLSiriSceneModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLSiriSceneModel.m; sourceTree = "<group>"; };
        B9595E802744DA7000948DB9 /* Intents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intents.framework; path = System/Library/Frameworks/Intents.framework; sourceTree = SDKROOT; };
        B9595E822744DC8F00948DB9 /* HDLSceneSiri.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLSceneSiri.h; sourceTree = "<group>"; };
        B9595E832744DC8F00948DB9 /* HDLSceneSiri.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLSceneSiri.m; sourceTree = "<group>"; };
        B9595E982744E00100948DB9 /* TopBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopBarView.h; sourceTree = "<group>"; };
        B9595E992744E00100948DB9 /* TopBarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopBarView.m; sourceTree = "<group>"; };
        B9595E9B2744E49E00948DB9 /* HDLSceneSiriDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HDLSceneSiriDemo.entitlements; sourceTree = "<group>"; };
        B9595E9C2744E5E900948DB9 /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = System/Library/Frameworks/IntentsUI.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
        B9595E472744D77800948DB9 /* Frameworks */ = {
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9595E9D2744E5E900948DB9 /* IntentsUI.framework in Frameworks */,
                B9595E812744DA7000948DB9 /* Intents.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
        B9595E412744D77800948DB9 = {
            isa = PBXGroup;
            children = (
                B9595E4C2744D77800948DB9 /* HDLSceneSiriDemo */,
                B9595E4B2744D77800948DB9 /* Products */,
                B9595E7F2744DA6F00948DB9 /* Frameworks */,
            );
            sourceTree = "<group>";
        };
        B9595E4B2744D77800948DB9 /* Products */ = {
            isa = PBXGroup;
            children = (
                B9595E4A2744D77800948DB9 /* HDLSceneSiriDemo.app */,
            );
            name = Products;
            sourceTree = "<group>";
        };
        B9595E4C2744D77800948DB9 /* HDLSceneSiriDemo */ = {
            isa = PBXGroup;
            children = (
                B9595E9B2744E49E00948DB9 /* HDLSceneSiriDemo.entitlements */,
                B9595E662744D79F00948DB9 /* HDLSceneSiri */,
                B9595E4D2744D77800948DB9 /* AppDelegate.h */,
                B9595E4E2744D77800948DB9 /* AppDelegate.m */,
                B9595E502744D77800948DB9 /* SceneDelegate.h */,
                B9595E512744D77800948DB9 /* SceneDelegate.m */,
                B9595E532744D77800948DB9 /* ViewController.h */,
                B9595E542744D77800948DB9 /* ViewController.m */,
                B9595E562744D77800948DB9 /* Main.storyboard */,
                B9595E592744D77D00948DB9 /* Assets.xcassets */,
                B9595E5B2744D77D00948DB9 /* LaunchScreen.storyboard */,
                B9595E5E2744D77D00948DB9 /* Info.plist */,
                B9595E5F2744D77D00948DB9 /* main.m */,
            );
            path = HDLSceneSiriDemo;
            sourceTree = "<group>";
        };
        B9595E662744D79F00948DB9 /* HDLSceneSiri */ = {
            isa = PBXGroup;
            children = (
                B9595E982744E00100948DB9 /* TopBarView.h */,
                B9595E992744E00100948DB9 /* TopBarView.m */,
                B9595E7A2744D9D200948DB9 /* HDLRunSceneIntent.h */,
                B9595E792744D9D200948DB9 /* HDLRunSceneIntent.m */,
                B9595E672744D80400948DB9 /* HDLSiriSceneListCell.h */,
                B9595E682744D80400948DB9 /* HDLSiriSceneListCell.m */,
                B9595E692744D80400948DB9 /* HDLSiriSceneListViewController.h */,
                B9595E6A2744D80400948DB9 /* HDLSiriSceneListViewController.m */,
                B9595E7C2744DA3B00948DB9 /* HDLSiriSceneModel.h */,
                B9595E7D2744DA3B00948DB9 /* HDLSiriSceneModel.m */,
                B9595E822744DC8F00948DB9 /* HDLSceneSiri.h */,
                B9595E832744DC8F00948DB9 /* HDLSceneSiri.m */,
            );
            path = HDLSceneSiri;
            sourceTree = "<group>";
        };
        B9595E7F2744DA6F00948DB9 /* Frameworks */ = {
            isa = PBXGroup;
            children = (
                B9595E9C2744E5E900948DB9 /* IntentsUI.framework */,
                B9595E802744DA7000948DB9 /* Intents.framework */,
            );
            name = Frameworks;
            sourceTree = "<group>";
        };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
        B9595E492744D77800948DB9 /* HDLSceneSiriDemo */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = B9595E632744D77E00948DB9 /* Build configuration list for PBXNativeTarget "HDLSceneSiriDemo" */;
            buildPhases = (
                B9595E462744D77800948DB9 /* Sources */,
                B9595E472744D77800948DB9 /* Frameworks */,
                B9595E482744D77800948DB9 /* Resources */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = HDLSceneSiriDemo;
            productName = HDLSceneSiriDemo;
            productReference = B9595E4A2744D77800948DB9 /* HDLSceneSiriDemo.app */;
            productType = "com.apple.product-type.application";
        };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
        B9595E422744D77800948DB9 /* Project object */ = {
            isa = PBXProject;
            attributes = {
                BuildIndependentTargetsInParallel = 1;
                LastUpgradeCheck = 1300;
                TargetAttributes = {
                    B9595E492744D77800948DB9 = {
                        CreatedOnToolsVersion = 13.0;
                    };
                };
            };
            buildConfigurationList = B9595E452744D77800948DB9 /* Build configuration list for PBXProject "HDLSceneSiriDemo" */;
            compatibilityVersion = "Xcode 13.0";
            developmentRegion = en;
            hasScannedForEncodings = 0;
            knownRegions = (
                en,
                Base,
            );
            mainGroup = B9595E412744D77800948DB9;
            productRefGroup = B9595E4B2744D77800948DB9 /* Products */;
            projectDirPath = "";
            projectRoot = "";
            targets = (
                B9595E492744D77800948DB9 /* HDLSceneSiriDemo */,
            );
        };
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
        B9595E482744D77800948DB9 /* Resources */ = {
            isa = PBXResourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9595E5D2744D77D00948DB9 /* LaunchScreen.storyboard in Resources */,
                B9595E5A2744D77D00948DB9 /* Assets.xcassets in Resources */,
                B9595E582744D77800948DB9 /* Main.storyboard in Resources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
        B9595E462744D77800948DB9 /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B9595E842744DC9000948DB9 /* HDLSceneSiri.m in Sources */,
                B9595E552744D77800948DB9 /* ViewController.m in Sources */,
                B9595E7E2744DA3B00948DB9 /* HDLSiriSceneModel.m in Sources */,
                B9595E4F2744D77800948DB9 /* AppDelegate.m in Sources */,
                B9595E602744D77D00948DB9 /* main.m in Sources */,
                B9595E7B2744D9D200948DB9 /* HDLRunSceneIntent.m in Sources */,
                B9595E522744D77800948DB9 /* SceneDelegate.m in Sources */,
                B9595E6C2744D80400948DB9 /* HDLSiriSceneListViewController.m in Sources */,
                B9595E9A2744E00100948DB9 /* TopBarView.m in Sources */,
                B9595E6B2744D80400948DB9 /* HDLSiriSceneListCell.m in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
        B9595E562744D77800948DB9 /* Main.storyboard */ = {
            isa = PBXVariantGroup;
            children = (
                B9595E572744D77800948DB9 /* Base */,
            );
            name = Main.storyboard;
            sourceTree = "<group>";
        };
        B9595E5B2744D77D00948DB9 /* LaunchScreen.storyboard */ = {
            isa = PBXVariantGroup;
            children = (
                B9595E5C2744D77D00948DB9 /* Base */,
            );
            name = LaunchScreen.storyboard;
            sourceTree = "<group>";
        };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
        B9595E612744D77D00948DB9 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ANALYZER_NONNULL = YES;
                CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
                CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
                CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
                CLANG_WARN_EMPTY_BODY = YES;
                CLANG_WARN_ENUM_CONVERSION = YES;
                CLANG_WARN_INFINITE_RECURSION = YES;
                CLANG_WARN_INT_CONVERSION = YES;
                CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = dwarf;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                ENABLE_TESTABILITY = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                GCC_DYNAMIC_NO_PIC = NO;
                GCC_NO_COMMON_BLOCKS = YES;
                GCC_OPTIMIZATION_LEVEL = 0;
                GCC_PREPROCESSOR_DEFINITIONS = (
                    "DEBUG=1",
                    "$(inherited)",
                );
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                GCC_WARN_UNUSED_FUNCTION = YES;
                GCC_WARN_UNUSED_VARIABLE = YES;
                IPHONEOS_DEPLOYMENT_TARGET = 11.0;
                MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
                MTL_FAST_MATH = YES;
                ONLY_ACTIVE_ARCH = YES;
                SDKROOT = iphoneos;
            };
            name = Debug;
        };
        B9595E622744D77D00948DB9 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ANALYZER_NONNULL = YES;
                CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
                CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
                CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
                CLANG_WARN_EMPTY_BODY = YES;
                CLANG_WARN_ENUM_CONVERSION = YES;
                CLANG_WARN_INFINITE_RECURSION = YES;
                CLANG_WARN_INT_CONVERSION = YES;
                CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                ENABLE_NS_ASSERTIONS = NO;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                GCC_NO_COMMON_BLOCKS = YES;
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                GCC_WARN_UNUSED_FUNCTION = YES;
                GCC_WARN_UNUSED_VARIABLE = YES;
                IPHONEOS_DEPLOYMENT_TARGET = 11.0;
                MTL_ENABLE_DEBUG_INFO = NO;
                MTL_FAST_MATH = YES;
                SDKROOT = iphoneos;
                VALIDATE_PRODUCT = YES;
            };
            name = Release;
        };
        B9595E642744D77E00948DB9 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
                CODE_SIGN_ENTITLEMENTS = HDLSceneSiriDemo/HDLSceneSiriDemo.entitlements;
                CODE_SIGN_STYLE = Automatic;
                CURRENT_PROJECT_VERSION = 1;
                DEVELOPMENT_TEAM = BVTA78PRYA;
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = HDLSceneSiriDemo/Info.plist;
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                LD_RUNPATH_SEARCH_PATHS = (
                    "$(inherited)",
                    "@executable_path/Frameworks",
                );
                MARKETING_VERSION = 1.0;
                PRODUCT_BUNDLE_IDENTIFIER = com.hdl.HDLSceneSiriDemo;
                PRODUCT_NAME = "$(TARGET_NAME)";
                SWIFT_EMIT_LOC_STRINGS = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Debug;
        };
        B9595E652744D77E00948DB9 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
                CODE_SIGN_ENTITLEMENTS = HDLSceneSiriDemo/HDLSceneSiriDemo.entitlements;
                CODE_SIGN_STYLE = Automatic;
                CURRENT_PROJECT_VERSION = 1;
                DEVELOPMENT_TEAM = BVTA78PRYA;
                GENERATE_INFOPLIST_FILE = YES;
                INFOPLIST_FILE = HDLSceneSiriDemo/Info.plist;
                INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
                INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
                INFOPLIST_KEY_UIMainStoryboardFile = Main;
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
                LD_RUNPATH_SEARCH_PATHS = (
                    "$(inherited)",
                    "@executable_path/Frameworks",
                );
                MARKETING_VERSION = 1.0;
                PRODUCT_BUNDLE_IDENTIFIER = com.hdl.HDLSceneSiriDemo;
                PRODUCT_NAME = "$(TARGET_NAME)";
                SWIFT_EMIT_LOC_STRINGS = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Release;
        };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
        B9595E452744D77800948DB9 /* Build configuration list for PBXProject "HDLSceneSiriDemo" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B9595E612744D77D00948DB9 /* Debug */,
                B9595E622744D77D00948DB9 /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        B9595E632744D77E00948DB9 /* Build configuration list for PBXNativeTarget "HDLSceneSiriDemo" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B9595E642744D77E00948DB9 /* Debug */,
                B9595E652744D77E00948DB9 /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
/* End XCConfigurationList section */
    };
    rootObject = B9595E422744D77800948DB9 /* Project object */;
}
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>
HDLSceneSiriDemo/HDLSceneSiriDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
New file
@@ -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>IDEDidComputeMac32BitWarning</key>
    <true/>
</dict>
</plist>
HDLSceneSiriDemo/HDLSceneSiriDemo/AppDelegate.h
New file
@@ -0,0 +1,14 @@
//
//  AppDelegate.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/AppDelegate.m
New file
@@ -0,0 +1,40 @@
//
//  AppDelegate.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    return YES;
}
#pragma mark - UISceneSession lifecycle
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(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 alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
- (void)application:(UIApplication *)application didDiscardSceneSessions:(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 application:didFinishLaunchingWithOptions.
    // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/AccentColor.colorset/Contents.json
New file
@@ -0,0 +1,11 @@
{
  "colors" : [
    {
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
New file
@@ -0,0 +1,98 @@
{
  "images" : [
    {
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "20x20"
    },
    {
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "20x20"
    },
    {
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "29x29"
    },
    {
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "29x29"
    },
    {
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "40x40"
    },
    {
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "40x40"
    },
    {
      "idiom" : "iphone",
      "scale" : "2x",
      "size" : "60x60"
    },
    {
      "idiom" : "iphone",
      "scale" : "3x",
      "size" : "60x60"
    },
    {
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "20x20"
    },
    {
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "20x20"
    },
    {
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "29x29"
    },
    {
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "29x29"
    },
    {
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "40x40"
    },
    {
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "40x40"
    },
    {
      "idiom" : "ipad",
      "scale" : "1x",
      "size" : "76x76"
    },
    {
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "76x76"
    },
    {
      "idiom" : "ipad",
      "scale" : "2x",
      "size" : "83.5x83.5"
    },
    {
      "idiom" : "ios-marketing",
      "scale" : "1x",
      "size" : "1024x1024"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/Contents.json
New file
@@ -0,0 +1,6 @@
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "ic_nav_back@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "ic_nav_back@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/ic_nav_back@2x.png
HDLSceneSiriDemo/HDLSceneSiriDemo/Assets.xcassets/ic_nav_back.imageset/ic_nav_back@3x.png
HDLSceneSiriDemo/HDLSceneSiriDemo/Base.lproj/LaunchScreen.storyboard
New file
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
    <dependencies>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="EHf-IW-A2E">
            <objects>
                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="53" y="375"/>
        </scene>
    </scenes>
</document>
HDLSceneSiriDemo/HDLSceneSiriDemo/Base.lproj/Main.storyboard
New file
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="qIf-z5-jHf">
    <device id="retina6_1" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--Navigation Controller-->
        <scene sceneID="fBd-VR-P4t">
            <objects>
                <navigationController id="qIf-z5-jHf" sceneMemberID="viewController">
                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="IsF-7t-R9P">
                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
                        <autoresizingMask key="autoresizingMask"/>
                    </navigationBar>
                    <connections>
                        <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="lty-Db-QWC"/>
                    </connections>
                </navigationController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="31j-Ok-nTi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-872" y="-66"/>
        </scene>
        <!--View Controller-->
        <scene sceneID="tne-QT-ifu">
            <objects>
                <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
                        <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5z9-q7-jhS">
                                <rect key="frame" x="20" y="259" width="374" height="31"/>
                                <state key="normal" title="Button"/>
                                <buttonConfiguration key="configuration" style="plain" title="Siri快捷指令"/>
                                <connections>
                                    <action selector="gotoSiriPage:" destination="BYZ-38-t0r" eventType="touchUpInside" id="S5c-ea-lgP"/>
                                </connections>
                            </button>
                        </subviews>
                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                        <constraints>
                            <constraint firstItem="5z9-q7-jhS" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="20" id="Eeo-ev-d2J"/>
                            <constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="5z9-q7-jhS" secondAttribute="trailing" constant="20" id="caf-nL-bkP"/>
                            <constraint firstItem="5z9-q7-jhS" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="171" id="jIb-fM-a91"/>
                        </constraints>
                    </view>
                    <navigationItem key="navigationItem" id="9hh-UL-4oi"/>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="35" y="98"/>
        </scene>
    </scenes>
    <resources>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
    </resources>
</document>
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLRunSceneIntent.h
New file
@@ -0,0 +1,108 @@
//
// HDLRunSceneIntent.h
//
// This file was automatically generated and should not be edited.
//
#if __has_include(<Intents/Intents.h>)
#import <Intents/Intents.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@interface HDLRunSceneIntent : INIntent
@property (readwrite, copy, nullable, nonatomic) NSString *sceneName;
@property (readwrite, copy, nullable, nonatomic) NSString *sceneId;
@end
@class HDLRunSceneIntentResponse;
/*!
 @abstract Protocol to declare support for handling a HDLRunSceneIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
 @discussion The minimum requirement for an implementing class is that it should be able to handle the intent. The confirmation method is optional. The handling method is always called last, after confirming the intent.
 */
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@protocol HDLRunSceneIntentHandling <NSObject>
@required
/*!
 @abstract Handling method - Execute the task represented by the HDLRunSceneIntent that's passed in
 @discussion Called to actually execute the intent. The app must return a response for this intent.
 @param  intent The input intent
 @param  completion The response handling block takes a HDLRunSceneIntentResponse containing the details of the result of having executed the intent
 @see  HDLRunSceneIntentResponse
 */
- (void)handleRunScene:(HDLRunSceneIntent *)intent completion:(void (^)(HDLRunSceneIntentResponse *response))completion NS_SWIFT_NAME(handle(intent:completion:));
@optional
/*!
 @abstract Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
 @discussion Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid, and will assume there is no additional information relevant to this intent.
 @param  intent The input intent
 @param  completion The response block contains a HDLRunSceneIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
 @see HDLRunSceneIntentResponse
 */
- (void)confirmRunScene:(HDLRunSceneIntent *)intent completion:(void (^)(HDLRunSceneIntentResponse *response))completion NS_SWIFT_NAME(confirm(intent:completion:));
@end
/*!
 @abstract Constants indicating the state of the response.
 */
typedef NS_ENUM(NSInteger, HDLRunSceneIntentResponseCode) {
    HDLRunSceneIntentResponseCodeUnspecified = 0,
    HDLRunSceneIntentResponseCodeReady,
    HDLRunSceneIntentResponseCodeContinueInApp,
    HDLRunSceneIntentResponseCodeInProgress,
    HDLRunSceneIntentResponseCodeSuccess,
    HDLRunSceneIntentResponseCodeFailure,
    HDLRunSceneIntentResponseCodeFailureRequiringAppLaunch,
    HDLRunSceneIntentResponseCodeError = 100
} API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos);
API_AVAILABLE(ios(12.0), macos(10.16), watchos(5.0)) API_UNAVAILABLE(tvos)
@interface HDLRunSceneIntentResponse : INIntentResponse
- (instancetype)init NS_UNAVAILABLE;
/*!
 @abstract Initializes the response object with the specified code and user activity object.
 @discussion The app extension has the option of capturing its private state as an NSUserActivity and returning it as the 'currentActivity'. If the app is launched, an NSUserActivity will be passed in with the private state. The NSUserActivity may also be used to query the app's UI extension (if provided) for a view controller representing the current intent handling state. In the case of app launch, the NSUserActivity will have its activityType set to the name of the intent. This intent object will also be available in the NSUserActivity.interaction property.
 @param  code The response code indicating your success or failure in confirming or handling the intent.
 @param  userActivity The user activity object to use when launching your app. Provide an object if you want to add information that is specific to your app. If you specify nil, the system automatically creates a user activity object for you, sets its type to the class name of the intent being handled, and fills it with an INInteraction object containing the intent and your response.
 */
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity NS_DESIGNATED_INITIALIZER;
/*!
 @abstract Initializes and returns the response object with the success code.
 */
+ (instancetype)successIntentResponseWithSceneName:(NSString *)sceneName NS_SWIFT_NAME(success(sceneName:));
/*!
 @abstract Initializes and returns the response object with the failure code.
 */
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage NS_SWIFT_NAME(failure(errorMessage:));
@property (readwrite, copy, nullable, nonatomic) NSString *errorMessage;
@property (readwrite, copy, nullable, nonatomic) NSString *successMessage;
@property (readwrite, copy, nullable, nonatomic) NSString *sceneName;
/*!
 @abstract The response code indicating your success or failure in confirming or handling the intent.
 */
@property (readonly, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
@end
NS_ASSUME_NONNULL_END
#endif
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLRunSceneIntent.m
New file
@@ -0,0 +1,52 @@
//
// HDLRunSceneIntent.m
//
// This file was automatically generated and should not be edited.
//
#import "HDLRunSceneIntent.h"
#if __has_include(<Intents/Intents.h>) && !TARGET_OS_TV
@implementation HDLRunSceneIntent
@dynamic sceneName, sceneId;
@end
@interface HDLRunSceneIntentResponse ()
@property (readwrite, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
@end
@implementation HDLRunSceneIntentResponse
@synthesize code = _code;
@dynamic errorMessage, successMessage, sceneName;
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity {
    self = [super init];
    if (self) {
        _code = code;
        self.userActivity = userActivity;
    }
    return self;
}
+ (instancetype)successIntentResponseWithSceneName:(NSString *)sceneName {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeSuccess userActivity:nil];
    intentResponse.sceneName = sceneName;
    return intentResponse;
}
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeFailure userActivity:nil];
    intentResponse.errorMessage = errorMessage;
    return intentResponse;
}
@end
#endif
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSceneSiri.h
New file
@@ -0,0 +1,49 @@
//
//  HDLSceneSiri.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// APP Screen
#define APP_SCREEN_BOUNDS   [[UIScreen mainScreen] bounds]
#define APP_SCREEN_HEIGHT   (APP_SCREEN_BOUNDS.size.height)
#define APP_SCREEN_WIDTH    (APP_SCREEN_BOUNDS.size.width)
#define APP_STATUS_FRAME    [UIApplication sharedApplication].statusBarFrame
// 是否是IPhoneX的设备
#define IPhoneX ([UIApplication sharedApplication].statusBarFrame.size.height >= 44)
#define APP_TOP_BAR_HEIGHT    (IPhoneX ? 88 : 64)
#define APP_STATUS_BAR_HEIGHT (IPhoneX ? 44 : 20)
#define APP_TOOL_BAR_HEIGHT   49
#define APP_TAB_BAR_HEIGHT    (IPhoneX ? (49 + 34): 49)
#define APP_TAB_BOTTOM_HEIGHT (IPhoneX ? 34 : 0)
#define APP_CONTENT_WIDTH     (APP_SCREEN_BOUNDS.size.width)
#define APP_CONTENT_HEIGHT    (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT - APP_TAB_BAR_HEIGHT)
#define APP_VISIBLE_HEIGHT    (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT)
#define APP_CONTENT_HEIGHT_2  (APP_SCREEN_HEIGHT - APP_STATUS_BAR_HEIGHT - APP_TAB_BAR_HEIGHT)
// WEAKSELF_AT
#define WEAKSELF_AT __weak __typeof(&*self)weakSelf_AT = self;
#define HEXCOLORA(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:a]
// 字体颜色
#define COLOR_TEXT HEXCOLORA(0x222222,1.0)
// APP_UIFont
#define APP_UIFont            @"PingFangSC-Regular"//苹方-简 常规体
#define APP_UIFont_BOLD       @"PingFangSC-Semibold"//苹方-简 中粗体
#define APP_UIFont_Medium       @"PingFangSC-Medium"//苹方-简 中黑体
#define Get_FontWithSize(s)     [UIFont fontWithName:APP_UIFont size:s]
#define Get_FontBoldWithSize(s) [UIFont fontWithName:APP_UIFont_BOLD size:s]
#define Get_FontMediumWithSize(s) [UIFont fontWithName:APP_UIFont_Medium size:s]
@interface HDLSceneSiri : NSObject
@end
NS_ASSUME_NONNULL_END
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSceneSiri.m
New file
@@ -0,0 +1,12 @@
//
//  HDLSceneSiri.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSceneSiri.h"
@implementation HDLSceneSiri
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListCell.h
New file
@@ -0,0 +1,31 @@
//
//  HDLSiriSceneListCell.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
#import <Intents/Intents.h>
#import <IntentsUI/IntentsUI.h>
#import "HDLRunSceneIntent.h"
#import "HDLSiriSceneModel.h"
//#import <HDLSmartKit/HDLSceneModel.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneListCell : UITableViewCell
@property (nonatomic, strong) UIView        *bgView;//背景View
@property (nonatomic, strong) UILabel       *titleLabel;//场景标题
@property (nonatomic, strong) INUIAddVoiceShortcutButton API_AVAILABLE(ios(12.0)) *shortcutButton;//快捷指令按钮
@property (nonatomic, strong) HDLSiriSceneModel  *model;//场景model
-(void)initModel:(HDLSiriSceneModel *)model intent:(HDLRunSceneIntent*)intent API_AVAILABLE(ios(12.0));
@end
NS_ASSUME_NONNULL_END
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListCell.m
New file
@@ -0,0 +1,102 @@
//
//  HDLSiriSceneListCell.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneListCell.h"
#import "HDLSceneSiri.h"
@interface HDLSiriSceneListCell ()<INUIAddVoiceShortcutButtonDelegate>
@end
@implementation HDLSiriSceneListCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        //添加自己需要个子视图控件
        [self addAllChildView];
    }
    return self;
}
///
- (void)addAllChildView{
    self.backgroundColor = [UIColor clearColor];
    self.contentView.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.bgView];
    [self.bgView addSubview:self.titleLabel];
    if (@available(iOS 12.0, *)) {
        [self.bgView addSubview:self.shortcutButton];
    }
}
-(UIView*)bgView{
    if(!_bgView){
        _bgView = [[UIView alloc]initWithFrame:CGRectMake(20, 6, APP_SCREEN_WIDTH - 40, 60)];
        _bgView.backgroundColor = UIColor.whiteColor;
        _bgView.layer.cornerRadius = 12;
        _bgView.layer.masksToBounds = YES;// 隐藏边界
    }
    return _bgView;
}
-(UILabel*)titleLabel{
    if(!_titleLabel){
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(6, 10, APP_SCREEN_WIDTH - 40 - 206, 40)];
        _titleLabel.textColor = COLOR_TEXT;
        _titleLabel.font = Get_FontMediumWithSize(16);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.numberOfLines = 2;
    }
    return _titleLabel;
}
- (INUIAddVoiceShortcutButton*)shortcutButton{
    if(!_shortcutButton){
        _shortcutButton = [[INUIAddVoiceShortcutButton alloc] initWithStyle:INUIAddVoiceShortcutButtonStyleWhite];
//        _shortcutButton.shortcut = [[INShortcut alloc] initWithIntent:self.intent];
        _shortcutButton.translatesAutoresizingMaskIntoConstraints = YES;
        _shortcutButton.frame = CGRectMake(APP_SCREEN_WIDTH - 40 - 150, 6, 150, 48);
        [_shortcutButton setEnabled:NO];
//        _shortcutButton.delegate = self;
    }
    return _shortcutButton;
}
//- (void)setModel:(HDLSceneModel *)model {
//    _model = model;
//    //判空
//    if (_model == nil) return;
//    //处理model数据
//    self.titleLabel.text = model.name;
//}
-(void)initModel:(HDLSiriSceneModel *)model intent:(HDLRunSceneIntent*)intent API_AVAILABLE(ios(12.0)){
    _model = model;
    //判空
    if (_model == nil) return;
    //处理model数据
    self.titleLabel.text = model.name;
    if(intent == nil){
        _shortcutButton.shortcut = [self getINShortcut];
    }else{
        _shortcutButton.shortcut = [[INShortcut alloc] initWithIntent:intent];
    }
}
- (INShortcut *) getINShortcut API_AVAILABLE(ios(12.0)){
    NSString *title = _model.name;
    HDLRunSceneIntent *intent = [[HDLRunSceneIntent alloc] init];
    intent.sceneId = _model.userSceneId;
    intent.suggestedInvocationPhrase = title;   //在Siri语音设置时显示的建议设置唤起文字
    intent.sceneName = title;
    INShortcut *shortCut = [[INShortcut alloc] initWithIntent:intent];
    return shortCut;
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListViewController.h
New file
@@ -0,0 +1,20 @@
//
//  HDLSiriSceneListViewController.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneListViewController : UIViewController<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, assign) UITableViewStyle       tableViewStyle;
@property (nonatomic, strong) UITableView            *tableView;
@property (nonatomic, strong) NSMutableArray         *dataSource;
@property (nonatomic, strong) NSString               *titleName;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneListViewController.m
New file
@@ -0,0 +1,290 @@
//
//  HDLSiriSceneListViewController.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneListViewController.h"
#import <Intents/Intents.h>
#import <IntentsUI/IntentsUI.h>
#import "HDLRunSceneIntent.h"   //上方“设置Custom Intents”图中右边箭头指的“Class Name”
#import "HDLSiriSceneListCell.h"
#import "HDLSiriSceneModel.h"
#import "HDLSceneSiri.h"
#import "TopBarView.h"
NSString * const HDLSiriSceneListCellIdentifier  = @"HDLSiriSceneListCellIdentifier";
@interface HDLSiriSceneListViewController ()<INUIAddVoiceShortcutButtonDelegate,INUIAddVoiceShortcutViewControllerDelegate,INUIEditVoiceShortcutViewControllerDelegate>
/// TopBarView
@property (nonatomic, strong)  TopBarView *topBarView;
@property (copy,nonatomic) NSArray *siriShortcutList;
@end
@implementation HDLSiriSceneListViewController
- (instancetype)init {
    if (self = [super init]) {
        _tableViewStyle = UITableViewStylePlain;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
    self.view.backgroundColor = HEXCOLORA(0xF7F7FC,1.0);
    [self initView];
    // Do any additional setup after loading the view.
}
/// initView
- (void)initView{
    //标题
    if(self.titleName == nil || [self.titleName isEqual:@""]){
        self.titleName = @"Siri快捷指令";
    }
    [self setTopBarViewWithTitle:self.titleName];
    [self initTableView];
    [self refreshSiri];
}
#pragma mark - TopBarView
- (TopBarView *)topBarView{
    if (!_topBarView) {
        _topBarView = [[TopBarView alloc] initWithFrame: CGRectMake(0, 0, APP_SCREEN_WIDTH, 40)];
        [_topBarView.backButton addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    }
    return _topBarView;
}
//设置标题和返回按钮
- (void)setTopBarViewWithTitle:(NSString *)title{
    [self.view addSubview:self.topBarView];
    self.topBarView.backgroundColor = UIColor.whiteColor;
    self.topBarView.titleLabel.text = title;
}
//返回
- (void)goBack{
    if ([self.navigationController.viewControllers indexOfObject:self] == 0) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
    else {
        [self.navigationController popViewControllerAnimated:YES];
//        [self.navigationController popToRootViewControllerAnimated:YES];
    }
}
#pragma mark - UITableView
- (UITableView *)tableView
{
    if (!_tableView)
    {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, APP_SCREEN_WIDTH, 0) style:self.tableViewStyle];
//        _tableView.backgroundColor = COLOR_MAIN_BACKGROUND;
        _tableView.backgroundColor = UIColor.clearColor;
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.showsHorizontalScrollIndicator = NO;
        _tableView.separatorStyle = NO;
        _tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
        _tableView.dataSource = self;
        _tableView.delegate = self;
    }
    return _tableView;
}
- (void)initTableView{
    self.tableView.frame = CGRectMake(0, APP_TOP_BAR_HEIGHT + 12, APP_SCREEN_WIDTH, APP_VISIBLE_HEIGHT - APP_TAB_BOTTOM_HEIGHT-12);
//    self.tableView.backgroundColor = HEXCOLORA(0xF7F7FC,1.0);
    [self.view addSubview:self.tableView];
    //    [self.tableView reloadData];
}
#pragma mark - UITableViewDataSourceXW
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HDLSiriSceneListCell *cell = [tableView dequeueReusableCellWithIdentifier:HDLSiriSceneListCellIdentifier];
    if (cell == nil) {
        cell = [[HDLSiriSceneListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:HDLSiriSceneListCellIdentifier];
    }
    HDLSiriSceneModel *model = self.dataSource[indexPath.row];
    if(model){
        if (@available(iOS 12.0, *)) {
            HDLRunSceneIntent *intent = [self getSceneIntent: model.userSceneId];
            [cell initModel:model intent:intent];
        }
    }
    return cell;
}
#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 72;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (@available(iOS 12.0, *)) {
        HDLSiriSceneModel *model = self.dataSource[indexPath.row];
        if(model){
            INVoiceShortcut *voiceShortcut = [self getSceneINVoiceShortcut:model.userSceneId];
            [self addOrEditVoiceShortcut:voiceShortcut model:model];
        }
    }
}
/// 添加或者编辑快捷指令
/// @param voiceShortcut 快捷指令
/// @param model 场景
-(void)addOrEditVoiceShortcut:(INVoiceShortcut *)voiceShortcut model:(HDLSiriSceneModel*)model API_AVAILABLE(ios(12.0)){
    if(voiceShortcut==nil){
        //1.如果不存在则添加
        INUIAddVoiceShortcutViewController *vc = [[INUIAddVoiceShortcutViewController alloc] initWithShortcut:[self getINShortcut:model]];
        vc.delegate = self;
        if(@available(iOS 13.0, *)) {
            vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
        }
        [self presentViewController:vc animated:YES completion:nil];
    }else{
        //2.存在则编辑
        INUIEditVoiceShortcutViewController* vc = [[INUIEditVoiceShortcutViewController alloc] initWithVoiceShortcut:voiceShortcut];
        vc.delegate = self;
        if(@available(iOS 13.0, *)) {
            vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
        }
        [self presentViewController:vc animated:YES completion:nil];
    }
}
- (INShortcut *) getINShortcut:(HDLSiriSceneModel*)model API_AVAILABLE(ios(12.0)){
    NSString *title = model.name;
    HDLRunSceneIntent *intent = [[HDLRunSceneIntent alloc] init];
    intent.sceneId = model.userSceneId;
    intent.suggestedInvocationPhrase = title;   //在Siri语音设置时显示的建议设置唤起文字
    intent.sceneName = title;
    INShortcut *shortCut = [[INShortcut alloc] initWithIntent:intent];
    return shortCut;
}
/// 根据场景ID或者之前配置过低快捷指令
/// @param sceneId 场景ID
- (HDLRunSceneIntent*)getSceneIntent:(NSString *)sceneId API_AVAILABLE(ios(12.0)){
    HDLRunSceneIntent *intentFind = nil;
    for (INVoiceShortcut *voiceShortcut in self.siriShortcutList) {
        HDLRunSceneIntent *intent = (HDLRunSceneIntent *)voiceShortcut.shortcut.intent;
        if(intent){
            if([intent.sceneId isEqualToString:sceneId]){
                intentFind = intent;
                break;
            }
        }
    }
    return intentFind;
}
/// 根据场景ID或者之前配置过低快捷指令
/// @param sceneId 场景ID
- (INVoiceShortcut*)getSceneINVoiceShortcut:(NSString *)sceneId API_AVAILABLE(ios(12.0)){
    INVoiceShortcut *voiceShortcutFind = nil;
    for (INVoiceShortcut *voiceShortcut in self.siriShortcutList) {
        HDLRunSceneIntent *intent = (HDLRunSceneIntent *)voiceShortcut.shortcut.intent;
        if(intent){
            if([intent.sceneId isEqualToString:sceneId]){
                voiceShortcutFind = voiceShortcut;
                break;
            }
        }
    }
    return voiceShortcutFind;
}
#pragma mark - refreshSiri
- (BOOL)checkCurrentClass:(INVoiceShortcut*)voiceShortcut API_AVAILABLE(ios(12.0)){
    return [voiceShortcut.shortcut.intent isKindOfClass:[HDLRunSceneIntent class]];
}
/// refreshSiri
- (void)refreshSiri {
    if (@available(iOS 12.0, *)) {
        NSMutableArray *temp = [NSMutableArray array];
        [[INVoiceShortcutCenter sharedCenter] getAllVoiceShortcutsWithCompletion:^(NSArray<INVoiceShortcut *> * _Nullable voiceShortcuts, NSError * _Nullable error) {
            //该方法不是在主线程运行的,所以如果ok了需要回到主线程来
            dispatch_async(dispatch_get_main_queue(), ^{
                for (INVoiceShortcut *voiceShortcut in voiceShortcuts) {
                    if ([self checkCurrentClass:voiceShortcut]) {
                        [temp addObject:voiceShortcut];
                    }
                }
                self.siriShortcutList = [NSArray arrayWithArray:temp];
                [self.tableView reloadData];
            });
        }];
    }
    [self.tableView reloadData];
}
#pragma mark - INUIAddVoiceShortcutButtonDelegate
- (void)presentAddVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)addVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton API_AVAILABLE(ios(12.0)){
    addVoiceShortcutViewController.delegate = self;
    if(@available(iOS 13.0, *)) {
        addVoiceShortcutViewController.modalPresentationStyle = UIModalPresentationOverFullScreen;
    }
    [self presentViewController:addVoiceShortcutViewController animated:YES completion:nil];
}
- (void)presentEditVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)editVoiceShortcutViewController forAddVoiceShortcutButton:(INUIAddVoiceShortcutButton *)addVoiceShortcutButton API_AVAILABLE(ios(12.0)){
    editVoiceShortcutViewController.delegate = self;
    if(@available(iOS 13.0, *)) {
        editVoiceShortcutViewController.modalPresentationStyle = UIModalPresentationOverFullScreen;
    }
    [self presentViewController:editVoiceShortcutViewController animated:YES completion:nil];
}
#pragma mark - INUIAddVoiceShortcutViewControllerDelegate
- (void)addVoiceShortcutViewController:(INUIAddVoiceShortcutViewController *)controller didFinishWithVoiceShortcut:(INVoiceShortcut *)voiceShortcut error:(NSError *)error
API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)addVoiceShortcutViewControllerDidCancel:(INUIAddVoiceShortcutViewController *)controller API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - INUIEditVoiceShortcutViewControllerDelegate
- (void)editVoiceShortcutViewControllerDidCancel:(INUIEditVoiceShortcutViewController *)controller API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didUpdateVoiceShortcut:(INVoiceShortcut *)voiceShortcut error:(NSError *)error API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
- (void)editVoiceShortcutViewController:(INUIEditVoiceShortcutViewController *)controller didDeleteVoiceShortcutWithIdentifier:(NSUUID *)deletedVoiceShortcutIdentifier API_AVAILABLE(ios(12.0)){
    [self refreshSiri];
    [controller dismissViewControllerAnimated:YES completion:nil];
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneModel.h
New file
@@ -0,0 +1,17 @@
//
//  HDLSiriSceneModel.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface HDLSiriSceneModel : NSObject
@property (nonatomic, copy)   NSString *userSceneId;
@property (nonatomic, copy)   NSString *name;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/HDLSiriSceneModel.m
New file
@@ -0,0 +1,12 @@
//
//  HDLSiriSceneModel.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "HDLSiriSceneModel.h"
@implementation HDLSiriSceneModel
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/TopBarView.h
New file
@@ -0,0 +1,21 @@
//
//  TopBarView.h
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/5/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TopBarView : UIView
@property (nonatomic, strong) UIButton      *backButton;//返回按钮
@property (nonatomic, strong) UILabel       *titleLabel;//标题
-(void)setTitle:(NSString *)title;
@end
NS_ASSUME_NONNULL_END
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiri/TopBarView.m
New file
@@ -0,0 +1,71 @@
//
//  TopBarView.m
//  HdlSmartIoT
//
//  Created by 陈嘉乐 on 2021/5/18.
//
#import "TopBarView.h"
#import "HDLSceneSiri.h"
@interface TopBarView()
@end
@implementation TopBarView
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.frame = CGRectMake(0, 0, APP_SCREEN_WIDTH, APP_TOP_BAR_HEIGHT);
        [self addSubview:self.backButton];
        [self addSubview:self.titleLabel];
    }
    return self;
}
- (UIButton*)backButton{
    if(!_backButton){
        //buttonWithType UIButtonTypeSystem 设置tintColor 就可以改变图片的颜色
        _backButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _backButton.frame = CGRectMake(0, APP_STATUS_BAR_HEIGHT, 39, 44);
        [_backButton setImage:[UIImage imageNamed:@"ic_nav_back"] forState:UIControlStateNormal];
        //按钮图标颜色
        _backButton.tintColor = COLOR_TEXT;
    }
    return _backButton;
}
- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [self NewLabel:CGRectMake(40, APP_STATUS_BAR_HEIGHT, APP_SCREEN_WIDTH - 80, 44) font:Get_FontMediumWithSize(16) textColor:COLOR_TEXT text:@""];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}
- (UILabel *)NewLabel:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)color text:(NSString *)text{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.backgroundColor = [UIColor clearColor];
    label.font = font;
    if (color != nil) {
        label.textColor = color;
    }
    label.text = text;
    return label;
}
//
-(void)backButtonClick{
}
-(void)setTitle:(NSString *)title{
    self.titleLabel.text = title;
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/HDLSceneSiriDemo.entitlements
New file
@@ -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.developer.siri</key>
    <true/>
</dict>
</plist>
HDLSceneSiriDemo/HDLSceneSiriDemo/Info.plist
New file
@@ -0,0 +1,29 @@
<?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>UIApplicationSceneManifest</key>
    <dict>
        <key>UIApplicationSupportsMultipleScenes</key>
        <false/>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UIWindowSceneSessionRoleApplication</key>
            <array>
                <dict>
                    <key>UISceneConfigurationName</key>
                    <string>Default Configuration</string>
                    <key>UISceneDelegateClassName</key>
                    <string>SceneDelegate</string>
                    <key>UISceneStoryboardFile</key>
                    <string>Main</string>
                </dict>
            </array>
        </dict>
    </dict>
    <key>NSUserActivityTypes</key>
    <array>
        <string>HDLRunSceneIntent</string>
    </array>
</dict>
</plist>
HDLSceneSiriDemo/HDLSceneSiriDemo/SceneDelegate.h
New file
@@ -0,0 +1,15 @@
//
//  SceneDelegate.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow * window;
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/SceneDelegate.m
New file
@@ -0,0 +1,57 @@
//
//  SceneDelegate.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "SceneDelegate.h"
@interface SceneDelegate ()
@end
@implementation SceneDelegate
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
    // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
    // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
    // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
}
- (void)sceneDidDisconnect:(UIScene *)scene {
    // Called as the scene is being released by the system.
    // This occurs shortly after the scene enters the background, or when its session is discarded.
    // Release any resources associated with this scene that can be re-created the next time the scene connects.
    // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
}
- (void)sceneDidBecomeActive:(UIScene *)scene {
    // Called when the scene has moved from an inactive state to an active state.
    // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
- (void)sceneWillResignActive:(UIScene *)scene {
    // Called when the scene will move from an active state to an inactive state.
    // This may occur due to temporary interruptions (ex. an incoming phone call).
}
- (void)sceneWillEnterForeground:(UIScene *)scene {
    // Called as the scene transitions from the background to the foreground.
    // Use this method to undo the changes made on entering the background.
}
- (void)sceneDidEnterBackground:(UIScene *)scene {
    // Called as the scene transitions from the foreground to the background.
    // Use this method to save data, release shared resources, and store enough scene-specific state information
    // to restore the scene back to its current state.
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/ViewController.h
New file
@@ -0,0 +1,14 @@
//
//  ViewController.h
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/ViewController.m
New file
@@ -0,0 +1,41 @@
//
//  ViewController.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import "ViewController.h"
#import "HDLSiriSceneListViewController.h"
#import "HDLSiriSceneModel.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
-(void)gotoSiriSceneListViewController{
    NSMutableArray *list =  [NSMutableArray new];
    for(int i = 0; i<10; i++){
        HDLSiriSceneModel *model = [[HDLSiriSceneModel alloc] init];
        model.name = [NSString stringWithFormat:@"回家模式%d",i];
        model.userSceneId = [NSString stringWithFormat:@"userSceneId%d",i];
        [list addObject:model];
    }
    HDLSiriSceneListViewController *vc = [[HDLSiriSceneListViewController alloc] init];
    vc.dataSource = list;
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)gotoSiriPage:(id)sender {
    [self gotoSiriSceneListViewController];
}
@end
HDLSceneSiriDemo/HDLSceneSiriDemo/main.m
New file
@@ -0,0 +1,18 @@
//
//  main.m
//  HDLSceneSiriDemo
//
//  Created by 陈嘉乐 on 2021/11/17.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
    NSString * appDelegateClassName;
    @autoreleasepool {
        // Setup code that might create autoreleased objects goes here.
        appDelegateClassName = NSStringFromClass([AppDelegate class]);
    }
    return UIApplicationMain(argc, argv, nil, appDelegateClassName);
}
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri.sln
New file
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.810.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.IOS.HDLSceneSiri", "Shared.IOS.HDLSceneSiri\Shared.IOS.HDLSceneSiri.csproj", "{7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {2928E701-250F-4B9D-8477-AB26E29F5CD8}
    EndGlobalSection
EndGlobal
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs
New file
@@ -0,0 +1,122 @@
using System;
using Foundation;
using Intents;
using ObjCRuntime;
using UIKit;
namespace HDLSceneSiri
{
    // @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; }
    }
    // @interface HDLSiriSceneListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
    [BaseType(typeof(UIViewController))]
    interface HDLSiriSceneListViewController : IUITableViewDataSource, IUITableViewDelegate
    {
        // @property (assign, nonatomic) UITableViewStyle tableViewStyle;
        [Export("tableViewStyle", ArgumentSemantic.Assign)]
        UITableViewStyle TableViewStyle { get; set; }
        // @property (nonatomic, strong) UITableView * _Nonnull tableView;
        [Export("tableView", ArgumentSemantic.Strong)]
        UITableView TableView { get; set; }
        [Wrap("WeakDataSource")]
        NSMutableArray DataSource { get; set; }
        // @property (nonatomic, strong) NSMutableArray * _Nonnull dataSource;
        [NullAllowed, Export("dataSource", ArgumentSemantic.Strong)]
        NSObject WeakDataSource { get; set; }
        // @property (nonatomic, strong) NSString * _Nonnull titleName;
        [Export("titleName", ArgumentSemantic.Strong)]
        string TitleName { get; set; }
    }
    // @interface HDLSiriSceneModel : NSObject
    [BaseType(typeof(NSObject))]
    interface HDLSiriSceneModel
    {
        // @property (copy, nonatomic) NSString * _Nonnull userSceneId;
        [Export("userSceneId")]
        string UserSceneId { get; set; }
        // @property (copy, nonatomic) NSString * _Nonnull name;
        [Export("name")]
        string Name { get; set; }
    }
}
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Library/libHDLSceneSiri.a
Binary files differ
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Properties/AssemblyInfo.cs
New file
@@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Foundation;
// This attribute allows you to mark your assemblies as “safe to link”.
// When the attribute is present, the linker—if enabled—will process the assembly
// even if you’re using the “Link 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("Shared.IOS.HDLSceneSiri")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Shared.IOS.HDLSceneSiri")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[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.1")]
// 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("")]
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri.csproj
New file
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<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>
    <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <ProjectGuid>{7B17EF0C-F0EE-494E-BFDE-B94DBAA86853}</ProjectGuid>
    <TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>Shared.IOS.HDLSceneSiri</RootNamespace>
    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
    <AssemblyName>Shared.IOS.HDLSceneSiri</AssemblyName>
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="Xamarin.iOS" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Resources\" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <ObjcBindingApiDefinition Include="ApiDefinition.cs" />
  </ItemGroup>
  <ItemGroup>
    <ObjcBindingCoreSource Include="Structs.cs" />
  </ItemGroup>
  <ItemGroup>
    <NativeReference Include="Library\libHDLSceneSiri.a">
      <Kind>Static</Kind>
      <Frameworks>Intents IntentsUI</Frameworks>
    </NativeReference>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>
Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/Structs.cs
New file
@@ -0,0 +1,18 @@
using ObjCRuntime;
namespace HDLSceneSiri
{
    [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
    }
}