Add PromiseKit dependency
- Added PromiseKit dependency
This commit is contained in:
5
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.gitignore
vendored
Normal file
5
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*.xcodeproj/**/xcuserdata/
|
||||
*.xcscmblueprint
|
||||
/Carthage
|
||||
/.build
|
||||
.DS_Store
|
41
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.travis.yml
vendored
Normal file
41
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.travis.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
os: osx
|
||||
language: objective-c
|
||||
matrix:
|
||||
include:
|
||||
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=3.2 DST="OS=11.2,name=Apple TV"'}
|
||||
- {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=3.2 DST="OS=4.2,name=Apple Watch - 38mm"'}
|
||||
|
||||
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=3.3 DST="OS=11.4,name=iPhone SE"'}
|
||||
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=3.3 DST="OS=11.4,name=Apple TV"'}
|
||||
- {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=3.3 DST="OS=4.3,name=Apple Watch - 38mm"'}
|
||||
|
||||
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=3.4 DST="OS=12.0,name=iPhone SE"'}
|
||||
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=3.4 DST="OS=12.0,name=Apple TV"'}
|
||||
- {osx_image: xcode10, env: 'PLAT=watchOS SWFT=3.4 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'}
|
||||
|
||||
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=4.0 DST="OS=11.2,name=Apple TV"'}
|
||||
- {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=4.0 DST="OS=4.2,name=Apple Watch - 38mm"'}
|
||||
|
||||
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s" TEST=1'}
|
||||
- {osx_image: xcode9.3, env: 'PLAT=tvOS SWFT=4.1 DST="OS=10.2,name=Apple TV 1080p"'}
|
||||
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=4.1 DST="OS=11.4,name=Apple TV" TEST=1'}
|
||||
- {osx_image: xcode9.3, env: 'PLAT=watchOS SWFT=4.1 DST="OS=3.2,name=Apple Watch - 38mm"'}
|
||||
- {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=4.1 DST="OS=4.3,name=Apple Watch - 38mm"'}
|
||||
|
||||
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=4.2 DST="OS=12.0,name=iPhone SE"'}
|
||||
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=4.2 DST="OS=12.0,name=Apple TV"'}
|
||||
- {osx_image: xcode10, env: 'PLAT=watchOS SWFT=4.2 DST="OS=5.0,name=Apple Watch Series 3 - 42mm"'}
|
||||
cache:
|
||||
directories:
|
||||
- Carthage
|
||||
before_install:
|
||||
- carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose
|
||||
install:
|
||||
- xcodebuild -scheme PMKHomeKit -target PMKHomeKit -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
|
||||
- if [[ $TEST == "1" ]]; then
|
||||
xcodebuild -scheme PMKHomeKit -target PMKHKTests -quiet -destination "$DST" build;
|
||||
fi
|
||||
script:
|
||||
- if [[ "$TEST" == "1" ]]; then
|
||||
xcodebuild -scheme PMKHomeKit -quiet -destination "$DST" test;
|
||||
fi
|
1
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile
vendored
Normal file
1
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github "mxcl/PromiseKit" ~> 6.0
|
1
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile.resolved
vendored
Normal file
1
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile.resolved
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github "mxcl/PromiseKit" "6.3.4"
|
6
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Carthage.xcconfig
vendored
Normal file
6
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Carthage.xcconfig
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Created by Kevin Ballard on 12/14/15.
|
||||
// Copyright © 2015 Postmates. All rights reserved.
|
||||
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited)
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited)
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited)
|
24
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Info.plist
vendored
Normal file
24
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Info.plist
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
465
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.pbxproj
vendored
Normal file
465
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.pbxproj
vendored
Normal file
@@ -0,0 +1,465 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
63C7FFF71D5C020D003BAE60 /* PMKHomeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */; };
|
||||
8312EA1521096DF000A47DDF /* HMAccessoryBrowserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */; };
|
||||
8312EA19210974F600A47DDF /* UtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8312EA18210974F600A47DDF /* UtilsTests.swift */; };
|
||||
838C29D32103FB9700CE5309 /* HMAcessoryBrowser+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */; };
|
||||
838C29D42103FB9700CE5309 /* HMHome+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */; };
|
||||
838C29D52103FB9700CE5309 /* HMCharacteristic+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */; };
|
||||
838C29D62103FB9700CE5309 /* HMHomeManager+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */; };
|
||||
838C29D72103FB9700CE5309 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D22103FB9700CE5309 /* Utils.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60;
|
||||
remoteInfo = PMKCoreLocation;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKHomeKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKHKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = "<group>"; };
|
||||
63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = "<group>"; };
|
||||
8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMAccessoryBrowserTests.swift; sourceTree = "<group>"; };
|
||||
8312EA18210974F600A47DDF /* UtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilsTests.swift; sourceTree = "<group>"; };
|
||||
838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMAcessoryBrowser+Promise.swift"; sourceTree = "<group>"; };
|
||||
838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMHome+Promise.swift"; sourceTree = "<group>"; };
|
||||
838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMCharacteristic+Promise.swift"; sourceTree = "<group>"; };
|
||||
838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMHomeManager+Promise.swift"; sourceTree = "<group>"; };
|
||||
838C29D22103FB9700CE5309 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
63C7FFA31D5BEE09003BAE60 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFEF1D5C020D003BAE60 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63C7FFF71D5C020D003BAE60 /* PMKHomeKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
63C7FF9D1D5BEE09003BAE60 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63C700091D5C0253003BAE60 /* Info.plist */,
|
||||
63CCF8121D5C0C4E00503216 /* Cartfile */,
|
||||
63CCF8171D5C11B500503216 /* Carthage.xcconfig */,
|
||||
63C7FFA91D5BEE09003BAE60 /* Sources */,
|
||||
63C7FFF31D5C020D003BAE60 /* Tests */,
|
||||
63C7FFA81D5BEE09003BAE60 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
63C7FFA81D5BEE09003BAE60 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */,
|
||||
63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
63C7FFA91D5BEE09003BAE60 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */,
|
||||
838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */,
|
||||
838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */,
|
||||
838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */,
|
||||
838C29D22103FB9700CE5309 /* Utils.swift */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
63C7FFF31D5C020D003BAE60 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */,
|
||||
8312EA18210974F600A47DDF /* UtilsTests.swift */,
|
||||
);
|
||||
path = Tests;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
63C7FFA41D5BEE09003BAE60 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHomeKit" */;
|
||||
buildPhases = (
|
||||
63C7FFA21D5BEE09003BAE60 /* Sources */,
|
||||
63C7FFA31D5BEE09003BAE60 /* Frameworks */,
|
||||
63C7FFA41D5BEE09003BAE60 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = PMKHomeKit;
|
||||
productName = "PMK+UIKit";
|
||||
productReference = 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
63C7FFF11D5C020D003BAE60 /* PMKHKTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */;
|
||||
buildPhases = (
|
||||
63C7FFEE1D5C020D003BAE60 /* Sources */,
|
||||
63C7FFEF1D5C020D003BAE60 /* Frameworks */,
|
||||
639447051D5D011300DDAE3C /* Embed Carthage Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */,
|
||||
);
|
||||
name = PMKHKTests;
|
||||
productName = PMKTests/NS;
|
||||
productReference = 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
63C7FF9E1D5BEE09003BAE60 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastUpgradeCheck = 0930;
|
||||
ORGANIZATIONNAME = "Max Howell";
|
||||
TargetAttributes = {
|
||||
63C7FFA61D5BEE09003BAE60 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
63C7FFF11D5C020D003BAE60 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0940;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHomeKit" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 63C7FF9D1D5BEE09003BAE60;
|
||||
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */,
|
||||
63C7FFF11D5C020D003BAE60 /* PMKHKTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
PromiseKit,
|
||||
);
|
||||
name = "Embed Carthage Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
63C7FFA21D5BEE09003BAE60 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
838C29D62103FB9700CE5309 /* HMHomeManager+Promise.swift in Sources */,
|
||||
838C29D52103FB9700CE5309 /* HMCharacteristic+Promise.swift in Sources */,
|
||||
838C29D42103FB9700CE5309 /* HMHome+Promise.swift in Sources */,
|
||||
838C29D32103FB9700CE5309 /* HMAcessoryBrowser+Promise.swift in Sources */,
|
||||
838C29D72103FB9700CE5309 /* Utils.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFEE1D5C020D003BAE60 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8312EA1521096DF000A47DDF /* HMAccessoryBrowserTests.swift in Sources */,
|
||||
8312EA19210974F600A47DDF /* UtilsTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */;
|
||||
targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
63C7FFAD1D5BEE09003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
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;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFAE1D5BEE09003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
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;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C7FFB01D5BEE09003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_MODULE_NAME = "${TARGET_NAME}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFB11D5BEE09003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_MODULE_NAME = "${TARGET_NAME}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C7FFFB1D5C020D003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFFC1D5C020D003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHomeKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFAD1D5BEE09003BAE60 /* Debug */,
|
||||
63C7FFAE1D5BEE09003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHomeKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFB01D5BEE09003BAE60 /* Debug */,
|
||||
63C7FFB11D5BEE09003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFFB1D5C020D003BAE60 /* Debug */,
|
||||
63C7FFFC1D5C020D003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
}
|
7
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
vendored
Normal file
7
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:/Users/mxcl/Desktop/PMK+UIKit/PMKFoundation.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@@ -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>
|
@@ -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>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "NO"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKHomeKit.framework"
|
||||
BlueprintName = "PMKHomeKit"
|
||||
ReferencedContainer = "container:PMKHomeKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "NO"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFF11D5C020D003BAE60"
|
||||
BuildableName = "PMKHKTests.xctest"
|
||||
BlueprintName = "PMKHKTests"
|
||||
ReferencedContainer = "container:PMKHomeKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFF11D5C020D003BAE60"
|
||||
BuildableName = "PMKHKTests.xctest"
|
||||
BlueprintName = "PMKHKTests"
|
||||
ReferencedContainer = "container:PMKHomeKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKCoreLocation.framework"
|
||||
BlueprintName = "PMKCoreLocation"
|
||||
ReferencedContainer = "container:PMKCoreLocation.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKHomeKit.framework"
|
||||
BlueprintName = "PMKHomeKit"
|
||||
ReferencedContainer = "container:PMKHomeKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
32
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/README.markdown
vendored
Normal file
32
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/README.markdown
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# PromiseKit HomeKit Extensions ![Build Status]
|
||||
|
||||
This project adds promises to Apple’s HomeKit framework.
|
||||
|
||||
* Xcode >= 9.3 required for iOS
|
||||
* Xcode >= 9.0 required for all other platforms
|
||||
|
||||
Thus, Swift versions supported are: 3.2, 3.3, 3.4, 4.0, 4.1 & 4.2.
|
||||
|
||||
## CocoaPods
|
||||
|
||||
```ruby
|
||||
pod "PromiseKit/HomeKit", "~> 6.0"
|
||||
```
|
||||
|
||||
The extensions are built into PromiseKit.framework thus nothing else is needed.
|
||||
|
||||
## Carthage
|
||||
|
||||
```ruby
|
||||
github "PromiseKit/HomeKit" ~> 1.0
|
||||
```
|
||||
|
||||
The extension is built into it's own framework:
|
||||
|
||||
```swift
|
||||
import PromiseKit
|
||||
import PMKHomeKit
|
||||
```
|
||||
|
||||
|
||||
[Build Status]: https://travis-ci.org/chrischares/PromiseKit-HomeKit.svg?branch=master
|
78
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMAcessoryBrowser+Promise.swift
vendored
Normal file
78
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMAcessoryBrowser+Promise.swift
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import Foundation
|
||||
import HomeKit
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
|
||||
#if !os(tvOS) && !os(watchOS)
|
||||
|
||||
public enum HMPromiseAccessoryBrowserError: Error {
|
||||
case noAccessoryFound
|
||||
}
|
||||
|
||||
public class HMPromiseAccessoryBrowser {
|
||||
private var proxy: BrowserProxy?
|
||||
|
||||
public func start(scanInterval: ScanInterval) -> Promise<[HMAccessory]> {
|
||||
proxy = BrowserProxy(scanInterval: scanInterval)
|
||||
return proxy!.promise
|
||||
}
|
||||
|
||||
public func stop() {
|
||||
proxy?.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
private class BrowserProxy: PromiseProxy<[HMAccessory]>, HMAccessoryBrowserDelegate {
|
||||
let browser = HMAccessoryBrowser()
|
||||
let scanInterval: ScanInterval
|
||||
|
||||
init(scanInterval: ScanInterval) {
|
||||
self.scanInterval = scanInterval
|
||||
super.init()
|
||||
|
||||
browser.delegate = self;
|
||||
browser.startSearchingForNewAccessories()
|
||||
|
||||
//if we have a timeout, set it up
|
||||
var timeout: TimeInterval? = nil
|
||||
switch scanInterval {
|
||||
case .returnAll(let interval): timeout = interval
|
||||
case .returnFirst(let interval): timeout = interval
|
||||
}
|
||||
|
||||
if let timeout = timeout {
|
||||
after(seconds: timeout)
|
||||
.done { [weak self] () -> Void in
|
||||
guard let _self = self else { return }
|
||||
_self.reject(HMPromiseAccessoryBrowserError.noAccessoryFound)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func fulfill(_ value: [HMAccessory]) {
|
||||
browser.stopSearchingForNewAccessories()
|
||||
super.fulfill(value)
|
||||
}
|
||||
|
||||
override func reject(_ error: Error ) {
|
||||
browser.stopSearchingForNewAccessories()
|
||||
super.reject(error)
|
||||
}
|
||||
|
||||
override func cancel() {
|
||||
browser.stopSearchingForNewAccessories()
|
||||
super.cancel()
|
||||
}
|
||||
|
||||
/**
|
||||
HMAccessoryBrowser delegate
|
||||
*/
|
||||
func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory) {
|
||||
if case .returnFirst = scanInterval {
|
||||
fulfill([accessory])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
46
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMCharacteristic+Promise.swift
vendored
Normal file
46
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMCharacteristic+Promise.swift
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import Foundation
|
||||
import HomeKit
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
|
||||
public enum AccessoryError: Error {
|
||||
case incorrectType
|
||||
case serviceMissing
|
||||
case characteristicMissing
|
||||
}
|
||||
|
||||
@available(iOS 8.0, tvOS 10.0, *)
|
||||
extension HMCharacteristic {
|
||||
/**
|
||||
A simple typesafe promise wrapper around readValue
|
||||
*/
|
||||
public func read<T>() -> Promise<T> {
|
||||
return Promise { seal in
|
||||
self.readValue { error in
|
||||
if let error = error { seal.reject(error) }
|
||||
else if let value = self.value as? T { seal.fulfill(value) }
|
||||
else { seal.reject(AccessoryError.incorrectType) }
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Because type inference is great... until you can't compile (thanks Swift)
|
||||
public func readFloat() -> Promise<Float> { return read() }
|
||||
public func readDouble() -> Promise<Double> { return read() }
|
||||
public func readInt() -> Promise<Int> { return read() }
|
||||
public func readString() -> Promise<String> { return read() }
|
||||
|
||||
/**
|
||||
A simple promise wrapper around writeValue
|
||||
*/
|
||||
public func write(_ value: Any?) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.writeValue(value, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
/// Explicit is good
|
||||
public func writeFloat(_ value: Float) -> Promise<Void> { return write(value) }
|
||||
public func writeDouble(_ value: Double) -> Promise<Void> { return write(value) }
|
||||
public func writeInt(_ value: Int) -> Promise<Void> { return write(value) }
|
||||
public func writeString(_ value: String) -> Promise<Void> { return write(value) }
|
||||
}
|
82
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHome+Promise.swift
vendored
Normal file
82
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHome+Promise.swift
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
import Foundation
|
||||
import HomeKit
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
|
||||
#if !os(tvOS) && !os(watchOS)
|
||||
|
||||
extension HMHome {
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func updateName(_ name: String) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.updateName(name, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
/// Add and setup a new HMAccessory. Displays it's own UI
|
||||
@available(iOS 11.3, *)
|
||||
public func addAndSetupAccessories(with payload: HMAccessorySetupPayload) -> Promise<[HMAccessory]> {
|
||||
return Promise { seal in
|
||||
self.addAndSetupAccessories(with: payload, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
/// Add and setup a new HMAccessory. Displays it's own UI
|
||||
@available(iOS 10.0, *)
|
||||
public func addAndSetupAccessories() -> Promise<[HMAccessory]> {
|
||||
// We need to compare what we have before the action to after to know what is new
|
||||
let beforeAccessories = self.accessories
|
||||
let home = self
|
||||
|
||||
return Promise { seal in
|
||||
self.addAndSetupAccessories { error in
|
||||
if let error = error { seal.reject(error) }
|
||||
else {
|
||||
let newAccessories = home.accessories.filter { beforeAccessories.contains($0) == false }
|
||||
seal.fulfill(newAccessories)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func addAccessory(_ accessory: HMAccessory) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.addAccessory(accessory, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func assignAccessory(_ accessory: HMAccessory, to room: HMRoom) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.assignAccessory(accessory, to: room, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func removeAccessory(_ accessory: HMAccessory) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.removeAccessory(accessory, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Rooms
|
||||
*/
|
||||
@available(iOS 8.0, *)
|
||||
public func addRoom(withName name: String) -> Promise<HMRoom> {
|
||||
return Promise { seal in
|
||||
self.addRoom(withName: name, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func removeRoom(_ room: HMRoom) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.removeRoom(room, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
62
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHomeManager+Promise.swift
vendored
Normal file
62
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHomeManager+Promise.swift
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import Foundation
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
import HomeKit
|
||||
|
||||
@available(iOS 8.0, tvOS 10.0, *)
|
||||
public enum HomeKitError: Error {
|
||||
case permissionDeined
|
||||
}
|
||||
|
||||
@available(iOS 8.0, tvOS 10.0, *)
|
||||
extension HMHomeManager {
|
||||
public func homes() -> Promise<[HMHome]> {
|
||||
return HMHomeManagerProxy().promise
|
||||
}
|
||||
|
||||
#if !os(tvOS) && !os(watchOS)
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func addHome(withName name: String) -> Promise<HMHome> {
|
||||
return Promise { seal in
|
||||
self.addHome(withName: name, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func removeHome(_ home: HMHome) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.removeHome(home, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 8.0, *)
|
||||
public func updatePrimaryHome(_ home: HMHome) -> Promise<Void> {
|
||||
return Promise { seal in
|
||||
self.updatePrimaryHome(home, completionHandler: seal.resolve)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@available(iOS 8.0, tvOS 10.0, *)
|
||||
internal class HMHomeManagerProxy: PromiseProxy<[HMHome]>, HMHomeManagerDelegate {
|
||||
|
||||
fileprivate let manager: HMHomeManager
|
||||
|
||||
override init() {
|
||||
self.manager = HMHomeManager()
|
||||
super.init()
|
||||
self.manager.delegate = self
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 20.0) { [weak self] in
|
||||
self?.reject(HomeKitError.permissionDeined)
|
||||
}
|
||||
}
|
||||
|
||||
func homeManagerDidUpdateHomes(_ manager: HMHomeManager) {
|
||||
fulfill(manager.homes)
|
||||
}
|
||||
}
|
45
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/Utils.swift
vendored
Normal file
45
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/Utils.swift
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
|
||||
/**
|
||||
Commonly used functionality when promisifying a delegate pattern
|
||||
*/
|
||||
internal class PromiseProxy<T>: NSObject {
|
||||
internal let (promise, seal) = Promise<T>.pending();
|
||||
|
||||
private var retainCycle: PromiseProxy?
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
// Create a retain cycle
|
||||
self.retainCycle = self
|
||||
// And ensure we break it when the promise is resolved
|
||||
_ = promise.ensure { self.retainCycle = nil }
|
||||
}
|
||||
|
||||
/// These functions ensure we only resolve the promise once
|
||||
internal func fulfill(_ value: T) {
|
||||
guard self.promise.isResolved == false else { return }
|
||||
seal.fulfill(value)
|
||||
}
|
||||
internal func reject(_ error: Error) {
|
||||
guard self.promise.isResolved == false else { return }
|
||||
seal.reject(error)
|
||||
}
|
||||
|
||||
/// Cancel helper
|
||||
internal func cancel() {
|
||||
self.reject(PMKError.cancelled)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Different ways to scan.
|
||||
*/
|
||||
public enum ScanInterval {
|
||||
// Return after our first item with an optional time limit
|
||||
case returnFirst(timeout: TimeInterval?)
|
||||
// Scan for this duration before returning all
|
||||
case returnAll(interval: TimeInterval)
|
||||
}
|
12
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/Entitlements.plist
vendored
Normal file
12
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/Entitlements.plist
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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.private.tcc.allow</key>
|
||||
<array>
|
||||
<string>kTCCServiceAddressBook</string>
|
||||
<string>kTCCServiceCalendar</string>
|
||||
<string>kTCCServicePhotos</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
84
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/HMAccessoryBrowserTests.swift
vendored
Normal file
84
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/HMAccessoryBrowserTests.swift
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// HMAccessoryBrowserTests.swift
|
||||
// PMKHKTests
|
||||
//
|
||||
// Created by Chris Chares on 7/25/18.
|
||||
// Copyright © 2018 Max Howell. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import PromiseKit
|
||||
import HomeKit
|
||||
@testable import PMKHomeKit
|
||||
|
||||
#if os(iOS)
|
||||
|
||||
class HMAccessoryBrowserTests: XCTestCase {
|
||||
|
||||
func testBrowserScanReturningFirst() {
|
||||
swizzle(HMAccessoryBrowser.self, #selector(HMAccessoryBrowser.startSearchingForNewAccessories)) {
|
||||
let ex = expectation(description: "")
|
||||
|
||||
HMPromiseAccessoryBrowser().start(scanInterval: .returnFirst(timeout: 0.5))
|
||||
.done { accessories in
|
||||
XCTAssertEqual(accessories.count, 1)
|
||||
ex.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: 1, handler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
func testBrowserScanReturningTimeout() {
|
||||
let ex = expectation(description: "")
|
||||
|
||||
HMPromiseAccessoryBrowser().start(scanInterval: .returnFirst(timeout: 0.5))
|
||||
.catch { error in
|
||||
// Why would we have discovered anything?
|
||||
ex.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: 1, handler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
extension HMAccessoryBrowser {
|
||||
@objc func pmk_startSearchingForNewAccessories() {
|
||||
after(.milliseconds(100))
|
||||
.done { swag in
|
||||
self.delegate!.accessoryBrowser?(self, didFindNewAccessory: MockAccessory())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Mocks
|
||||
class MockAccessory: HMAccessory {
|
||||
var _uniqueID: UUID = UUID()
|
||||
override var uniqueIdentifier: UUID { return _uniqueID }
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
}
|
||||
}
|
||||
|
||||
// Utilty taken from https://github.com/PromiseKit/CoreLocation/blob/master/Tests/CLLocationManagerTests.swift
|
||||
import ObjectiveC
|
||||
|
||||
func swizzle(_ foo: AnyClass, _ from: Selector, isClassMethod: Bool = false, body: () -> Void) {
|
||||
let originalMethod: Method
|
||||
let swizzledMethod: Method
|
||||
|
||||
if isClassMethod {
|
||||
originalMethod = class_getClassMethod(foo, from)!
|
||||
swizzledMethod = class_getClassMethod(foo, Selector("pmk_\(from)"))!
|
||||
} else {
|
||||
originalMethod = class_getInstanceMethod(foo, from)!
|
||||
swizzledMethod = class_getInstanceMethod(foo, Selector("pmk_\(from)"))!
|
||||
}
|
||||
|
||||
method_exchangeImplementations(originalMethod, swizzledMethod)
|
||||
body()
|
||||
method_exchangeImplementations(swizzledMethod, originalMethod)
|
||||
}
|
||||
|
||||
#endif
|
63
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/UtilsTests.swift
vendored
Normal file
63
Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/UtilsTests.swift
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// UtilsTests.swift
|
||||
// PMKHKTests
|
||||
//
|
||||
// Created by Chris Chares on 7/25/18.
|
||||
// Copyright © 2018 Max Howell. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import PromiseKit
|
||||
@testable import PMKHomeKit
|
||||
|
||||
class UtilsTests: XCTestCase {
|
||||
|
||||
var strongProxy: PromiseProxy<Int>? = PromiseProxy()
|
||||
|
||||
override func setUp() {
|
||||
strongProxy = PromiseProxy()
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
strongProxy = nil
|
||||
}
|
||||
|
||||
// The proxy should create a retain cycle until the promise is resolved
|
||||
func testRetainCycle() {
|
||||
weak var weakVar = strongProxy
|
||||
XCTAssertNotNil(weakVar)
|
||||
|
||||
let exp = expectation(description: "")
|
||||
strongProxy = nil
|
||||
after(.milliseconds(50))
|
||||
.done {
|
||||
XCTAssertNotNil(weakVar)
|
||||
exp.fulfill()
|
||||
}
|
||||
waitForExpectations(timeout: 1.0, handler: nil)
|
||||
}
|
||||
|
||||
// Once resolved, the proxy should break the retain cycle
|
||||
func testRelease() {
|
||||
weak var weakVar = strongProxy
|
||||
XCTAssertNotNil(weakVar)
|
||||
|
||||
let exp = expectation(description: "")
|
||||
strongProxy!.fulfill(42)
|
||||
strongProxy = nil
|
||||
|
||||
after(.milliseconds(50))
|
||||
.done {
|
||||
XCTAssertNil(weakVar)
|
||||
exp.fulfill()
|
||||
}
|
||||
waitForExpectations(timeout: 1.0, handler: nil)
|
||||
}
|
||||
|
||||
// Cancel should reject with a PMKError
|
||||
func testCancel() {
|
||||
let proxy = strongProxy!
|
||||
proxy.cancel()
|
||||
XCTAssertNotNil(proxy.promise.error)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user