Add PromiseKit dependency
- Added PromiseKit dependency
This commit is contained in:
5
Carthage/Checkouts/PromiseKit/Extensions/UIKit/.gitignore
vendored
Normal file
5
Carthage/Checkouts/PromiseKit/Extensions/UIKit/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*.xcodeproj/**/xcuserdata/
|
||||
*.xcscmblueprint
|
||||
/Carthage
|
||||
/.build
|
||||
.DS_Store
|
||||
70
Carthage/Checkouts/PromiseKit/Extensions/UIKit/.travis.yml
vendored
Normal file
70
Carthage/Checkouts/PromiseKit/Extensions/UIKit/.travis.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
stages:
|
||||
- lint
|
||||
- carthage
|
||||
- test
|
||||
jobs:
|
||||
include:
|
||||
- &pod
|
||||
stage: lint
|
||||
osx_image: xcode8.3
|
||||
env: SWIFT=3.1
|
||||
name: pod lib lint --swift-version=3.1
|
||||
os: osx
|
||||
language: objective-c
|
||||
before_install:
|
||||
gem install cocoapods --prerelease --version 1.6.0.beta.1
|
||||
install:
|
||||
carthage bootstrap --no-build PromiseKit
|
||||
script: |
|
||||
cd Carthage/Checkouts/PromiseKit
|
||||
mv .github/PromiseKit.podspec .
|
||||
rm -rf Extensions/UIKit/Sources
|
||||
cp -R ../../../Sources Extensions/UIKit
|
||||
pod lib lint --subspec=PromiseKit/UIKit --fail-fast --swift-version=$SWIFT
|
||||
- <<: *pod
|
||||
osx_image: xcode9.2
|
||||
env: SWIFT=3.2
|
||||
name: pod lib lint --swift-version=3.2
|
||||
- <<: *pod
|
||||
osx_image: xcode9.4
|
||||
env: SWIFT=3.3
|
||||
name: pod lib lint --swift-version=3.3
|
||||
- <<: *pod
|
||||
osx_image: xcode10
|
||||
env: SWIFT=3.4
|
||||
name: pod lib lint --swift-version=3.4
|
||||
- <<: *pod
|
||||
osx_image: xcode9.2
|
||||
env: SWIFT=4.0
|
||||
name: pod lib lint --swift-version=4.0
|
||||
- <<: *pod
|
||||
osx_image: xcode9.4
|
||||
env: SWIFT=4.1
|
||||
name: pod lib lint --swift-version=4.1
|
||||
- <<: *pod
|
||||
osx_image: xcode10
|
||||
env: SWIFT=4.2
|
||||
name: pod lib lint --swift-version=4.2
|
||||
|
||||
- &test
|
||||
stage: test
|
||||
osx_image: xcode10
|
||||
name: iOS Tests
|
||||
env: DST='OS=12.0,name=iPhone SE' PLAT=iOS
|
||||
os: osx
|
||||
language: objective-c
|
||||
cache:
|
||||
directories:
|
||||
- Carthage
|
||||
before_install:
|
||||
carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT
|
||||
install:
|
||||
xcodebuild -scheme PMKUIKit -target PMKUIKit -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
|
||||
script:
|
||||
xcodebuild -scheme PMKUIKit -quiet -destination "$DST" test
|
||||
- <<: *test
|
||||
env: DST='OS=12.0,name=Apple TV' PLAT=tvOS
|
||||
name: tvOS Tests
|
||||
1
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile
vendored
Normal file
1
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github "mxcl/PromiseKit" ~> 6.0
|
||||
1
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile.resolved
vendored
Normal file
1
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile.resolved
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github "mxcl/PromiseKit" "6.5.0"
|
||||
7
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Carthage.xcconfig
vendored
Normal file
7
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Carthage.xcconfig
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Created by Kevin Ballard on 12/14/15.
|
||||
// Copyright © 2015 Postmates. All rights reserved.
|
||||
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited)
|
||||
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/UIKit/Info.plist
vendored
Normal file
24
Carthage/Checkouts/PromiseKit/Extensions/UIKit/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>$(BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
753
Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.pbxproj
vendored
Normal file
753
Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.pbxproj
vendored
Normal file
@@ -0,0 +1,753 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
6304D6FE1D5F986A00CE6C99 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
630B2E161D5D0B3200DC10E9 /* TestUIImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */; };
|
||||
632B573520324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */; };
|
||||
6332142B1D83CD17009F67CE /* TestUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6332142A1D83CD17009F67CE /* TestUIView.swift */; };
|
||||
637E2C841D5C2E0B0043E370 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
637E2C851D5C2E0B0043E370 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */; };
|
||||
637E2C861D5C2E0B0043E370 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */; };
|
||||
637E2C871D5C2E0B0043E370 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
637E2C881D5C2E0B0043E370 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */; };
|
||||
637E2C951D5C2E720043E370 /* TestUIImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */; };
|
||||
637E2C961D5C2E720043E370 /* TestUIViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C8F1D5C2E720043E370 /* TestUIViewController.m */; };
|
||||
637E2C9B1D5C2F600043E370 /* infrastructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C9A1D5C2F600043E370 /* infrastructure.swift */; };
|
||||
63A686811D88E93300D1C66B /* UIImagePickerController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */; };
|
||||
63C7FFF71D5C020D003BAE60 /* PMKUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; };
|
||||
63C9C4571D5D339900101ECE /* app.swift in Sources */ = {isa = PBXBuildFile; fileRef = 630B2DF41D5D0AD400DC10E9 /* app.swift */; };
|
||||
63C9C4581D5D339B00101ECE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */; };
|
||||
63C9C45E1D5D341600101ECE /* PMKUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; };
|
||||
63C9C45F1D5D341600101ECE /* PMKUIKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60;
|
||||
remoteInfo = PMKUIKit;
|
||||
};
|
||||
63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 63C9C4441D5D334700101ECE;
|
||||
remoteInfo = PMKTestsHost;
|
||||
};
|
||||
63C9C45B1D5D33AB00101ECE /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 63C9C4441D5D334700101ECE;
|
||||
remoteInfo = PMKTestsHost;
|
||||
};
|
||||
63C9C4601D5D341600101ECE /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60;
|
||||
remoteInfo = PMKUIKit;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
63C9C4621D5D341600101ECE /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
63C9C45F1D5D341600101ECE /* PMKUIKit.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Sources/PMKUIKit.h; sourceTree = SOURCE_ROOT; };
|
||||
630B2DF41D5D0AD400DC10E9 /* app.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = app.swift; path = UITests/app.swift; sourceTree = "<group>"; };
|
||||
630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "UITests/Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIImagePickerController.swift; path = UITests/TestUIImagePickerController.swift; sourceTree = "<group>"; };
|
||||
630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKUIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewPropertyAnimator+Promise.swift"; sourceTree = "<group>"; };
|
||||
6332142A1D83CD17009F67CE /* TestUIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIView.swift; path = Tests/TestUIView.swift; sourceTree = SOURCE_ROOT; };
|
||||
637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Sources/UIView+AnyPromise.h"; sourceTree = SOURCE_ROOT; };
|
||||
637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Sources/UIView+AnyPromise.m"; sourceTree = SOURCE_ROOT; };
|
||||
637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Sources/UIView+Promise.swift"; sourceTree = SOURCE_ROOT; };
|
||||
637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Sources/UIViewController+AnyPromise.h"; sourceTree = SOURCE_ROOT; };
|
||||
637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Sources/UIViewController+AnyPromise.m"; sourceTree = SOURCE_ROOT; };
|
||||
637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIImagePickerController.swift; path = Tests/TestUIImagePickerController.swift; sourceTree = SOURCE_ROOT; };
|
||||
637E2C8F1D5C2E720043E370 /* TestUIViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestUIViewController.m; path = Tests/TestUIViewController.m; sourceTree = SOURCE_ROOT; };
|
||||
637E2C9A1D5C2F600043E370 /* infrastructure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = infrastructure.swift; path = Tests/infrastructure.swift; sourceTree = SOURCE_ROOT; };
|
||||
63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIImagePickerController+Promise.swift"; path = "Sources/UIImagePickerController+Promise.swift"; sourceTree = SOURCE_ROOT; };
|
||||
63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
63C9C4451D5D334700101ECE /* PMKTestsHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PMKTestsHost.app; 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>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
630B2E0D1D5D0AF500DC10E9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFA31D5BEE09003BAE60 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFEF1D5C020D003BAE60 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63C7FFF71D5C020D003BAE60 /* PMKUIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C9C4421D5D334700101ECE /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63C9C45E1D5D341600101ECE /* PMKUIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
630B2DF31D5D0ABF00DC10E9 /* TestsHost */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
630B2DF41D5D0AD400DC10E9 /* app.swift */,
|
||||
630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */,
|
||||
630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */,
|
||||
);
|
||||
name = TestsHost;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
63C7FF9D1D5BEE09003BAE60 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63C700091D5C0253003BAE60 /* Info.plist */,
|
||||
63CCF8121D5C0C4E00503216 /* Cartfile */,
|
||||
63CCF8171D5C11B500503216 /* Carthage.xcconfig */,
|
||||
63C7FFA91D5BEE09003BAE60 /* Sources */,
|
||||
63C7FFF31D5C020D003BAE60 /* Tests */,
|
||||
630B2DF31D5D0ABF00DC10E9 /* TestsHost */,
|
||||
63C7FFA81D5BEE09003BAE60 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
63C7FFA81D5BEE09003BAE60 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */,
|
||||
63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */,
|
||||
630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */,
|
||||
63C9C4451D5D334700101ECE /* PMKTestsHost.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
63C7FFA91D5BEE09003BAE60 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */,
|
||||
637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */,
|
||||
637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */,
|
||||
637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */,
|
||||
637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */,
|
||||
637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */,
|
||||
63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */,
|
||||
632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
63C7FFF31D5C020D003BAE60 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */,
|
||||
637E2C8F1D5C2E720043E370 /* TestUIViewController.m */,
|
||||
6332142A1D83CD17009F67CE /* TestUIView.swift */,
|
||||
637E2C9A1D5C2F600043E370 /* infrastructure.swift */,
|
||||
);
|
||||
path = Tests;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
63C7FFA41D5BEE09003BAE60 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6304D6FE1D5F986A00CE6C99 /* PMKUIKit.h in Headers */,
|
||||
637E2C871D5C2E0B0043E370 /* UIViewController+AnyPromise.h in Headers */,
|
||||
637E2C841D5C2E0B0043E370 /* UIView+AnyPromise.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
630B2DFF1D5D0AF500DC10E9 /* PMKUIUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKUIUITests" */;
|
||||
buildPhases = (
|
||||
630B2E041D5D0AF500DC10E9 /* Sources */,
|
||||
630B2E0D1D5D0AF500DC10E9 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
63C9C45A1D5D33A900101ECE /* PBXTargetDependency */,
|
||||
);
|
||||
name = PMKUIUITests;
|
||||
productName = PMKUIUITests;
|
||||
productReference = 630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
63C7FFA61D5BEE09003BAE60 /* PMKUIKit */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKUIKit" */;
|
||||
buildPhases = (
|
||||
63C7FFA21D5BEE09003BAE60 /* Sources */,
|
||||
63C7FFA31D5BEE09003BAE60 /* Frameworks */,
|
||||
63C7FFA41D5BEE09003BAE60 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = PMKUIKit;
|
||||
productName = PMKUIKit;
|
||||
productReference = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
63C7FFF11D5C020D003BAE60 /* PMKUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKUITests" */;
|
||||
buildPhases = (
|
||||
63C7FFEE1D5C020D003BAE60 /* Sources */,
|
||||
63C7FFEF1D5C020D003BAE60 /* Frameworks */,
|
||||
6332EC8D1D5D085F00480270 /* Embed Carthage Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */,
|
||||
63C9C45C1D5D33AB00101ECE /* PBXTargetDependency */,
|
||||
);
|
||||
name = PMKUITests;
|
||||
productName = PMKUITests;
|
||||
productReference = 63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
63C9C4441D5D334700101ECE /* PMKTestsHost */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKTestsHost" */;
|
||||
buildPhases = (
|
||||
63C9C4411D5D334700101ECE /* Sources */,
|
||||
63C9C4421D5D334700101ECE /* Frameworks */,
|
||||
63C9C4431D5D334700101ECE /* Resources */,
|
||||
63C9C45D1D5D33E700101ECE /* Embed Carthage Frameworks */,
|
||||
63C9C4621D5D341600101ECE /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
63C9C4611D5D341600101ECE /* PBXTargetDependency */,
|
||||
);
|
||||
name = PMKTestsHost;
|
||||
productName = PMKTestsHost;
|
||||
productReference = 63C9C4451D5D334700101ECE /* PMKTestsHost.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
63C7FF9E1D5BEE09003BAE60 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastUpgradeCheck = 1000;
|
||||
ORGANIZATIONNAME = "Max Howell";
|
||||
TargetAttributes = {
|
||||
630B2DFF1D5D0AF500DC10E9 = {
|
||||
LastSwiftMigration = 0900;
|
||||
TestTargetID = 63C9C4441D5D334700101ECE;
|
||||
};
|
||||
63C7FFA61D5BEE09003BAE60 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
63C7FFF11D5C020D003BAE60 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 63C9C4441D5D334700101ECE;
|
||||
};
|
||||
63C9C4441D5D334700101ECE = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKUIKit" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 63C7FF9D1D5BEE09003BAE60;
|
||||
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
63C7FFA61D5BEE09003BAE60 /* PMKUIKit */,
|
||||
63C7FFF11D5C020D003BAE60 /* PMKUITests */,
|
||||
630B2DFF1D5D0AF500DC10E9 /* PMKUIUITests */,
|
||||
63C9C4441D5D334700101ECE /* PMKTestsHost */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
63C9C4431D5D334700101ECE /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63C9C4581D5D339B00101ECE /* Default-568h@2x.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
6332EC8D1D5D085F00480270 /* 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";
|
||||
};
|
||||
63C9C45D1D5D33E700101ECE /* 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 */
|
||||
630B2E041D5D0AF500DC10E9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
630B2E161D5D0B3200DC10E9 /* TestUIImagePickerController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFA21D5BEE09003BAE60 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63A686811D88E93300D1C66B /* UIImagePickerController+Promise.swift in Sources */,
|
||||
637E2C861D5C2E0B0043E370 /* UIView+Promise.swift in Sources */,
|
||||
637E2C851D5C2E0B0043E370 /* UIView+AnyPromise.m in Sources */,
|
||||
632B573520324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift in Sources */,
|
||||
637E2C881D5C2E0B0043E370 /* UIViewController+AnyPromise.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C7FFEE1D5C020D003BAE60 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
637E2C951D5C2E720043E370 /* TestUIImagePickerController.swift in Sources */,
|
||||
637E2C961D5C2E720043E370 /* TestUIViewController.m in Sources */,
|
||||
637E2C9B1D5C2F600043E370 /* infrastructure.swift in Sources */,
|
||||
6332142B1D83CD17009F67CE /* TestUIView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
63C9C4411D5D334700101ECE /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
63C9C4571D5D339900101ECE /* app.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */;
|
||||
targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */;
|
||||
};
|
||||
63C9C45A1D5D33A900101ECE /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 63C9C4441D5D334700101ECE /* PMKTestsHost */;
|
||||
targetProxy = 63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */;
|
||||
};
|
||||
63C9C45C1D5D33AB00101ECE /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 63C9C4441D5D334700101ECE /* PMKTestsHost */;
|
||||
targetProxy = 63C9C45B1D5D33AB00101ECE /* PBXContainerItemProxy */;
|
||||
};
|
||||
63C9C4611D5D341600101ECE /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */;
|
||||
targetProxy = 63C9C4601D5D341600101ECE /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
630B2E111D5D0AF500DC10E9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_PACKAGE_TYPE = BNDL;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TEST_TARGET_NAME = PMKTestsHost;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
630B2E121D5D0AF500DC10E9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_PACKAGE_TYPE = BNDL;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TEST_TARGET_NAME = PMKTestsHost;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C7FFAD1D5BEE09003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_PACKAGE_TYPE = FMWK;
|
||||
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;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1.0.3;
|
||||
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.UIKit;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos 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;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFAE1D5BEE09003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_PACKAGE_TYPE = FMWK;
|
||||
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;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1.0.3;
|
||||
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.UIKit;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos 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;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C7FFB01D5BEE09003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
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)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFB11D5BEE09003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
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)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C7FFFB1D5C020D003BAE60 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_PACKAGE_TYPE = BNDL;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PMKTestsHost.app/PMKTestsHost";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C7FFFC1D5C020D003BAE60 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_PACKAGE_TYPE = BNDL;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SUPPRESS_WARNINGS = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PMKTestsHost.app/PMKTestsHost";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
63C9C4551D5D334800101ECE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_PACKAGE_TYPE = APPL;
|
||||
CODE_SIGN_ENTITLEMENTS = UITests/Entitlements.plist;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
63C9C4561D5D334800101ECE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_PACKAGE_TYPE = APPL;
|
||||
CODE_SIGN_ENTITLEMENTS = UITests/Entitlements.plist;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKUIUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
630B2E111D5D0AF500DC10E9 /* Debug */,
|
||||
630B2E121D5D0AF500DC10E9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKUIKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFAD1D5BEE09003BAE60 /* Debug */,
|
||||
63C7FFAE1D5BEE09003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKUIKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFB01D5BEE09003BAE60 /* Debug */,
|
||||
63C7FFB11D5BEE09003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C7FFFB1D5C020D003BAE60 /* Debug */,
|
||||
63C7FFFC1D5C020D003BAE60 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKTestsHost" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
63C9C4551D5D334800101ECE /* Debug */,
|
||||
63C9C4561D5D334800101ECE /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */;
|
||||
}
|
||||
7
Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
vendored
Normal file
7
Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.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:PMKUIKit.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,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKUIKit.framework"
|
||||
BlueprintName = "PMKUIKit"
|
||||
ReferencedContainer = "container:PMKUIKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "NO"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFF11D5C020D003BAE60"
|
||||
BuildableName = "PMKUITests.xctest"
|
||||
BlueprintName = "PMKUITests"
|
||||
ReferencedContainer = "container:PMKUIKit.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 = "PMKUITests.xctest"
|
||||
BlueprintName = "PMKUITests"
|
||||
ReferencedContainer = "container:PMKUIKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "630B2DFF1D5D0AF500DC10E9"
|
||||
BuildableName = "PMKUIUITests.xctest"
|
||||
BlueprintName = "PMKUIUITests"
|
||||
ReferencedContainer = "container:PMKUIKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
<SkippedTests>
|
||||
<Test
|
||||
Identifier = "UIImagePickerControllerTests/test_fulfills_with_edited_image()">
|
||||
</Test>
|
||||
<Test
|
||||
Identifier = "UIImagePickerControllerTests/test_fulfills_with_image()">
|
||||
</Test>
|
||||
<Test
|
||||
Identifier = "UIImagePickerControllerTests/test_rejects_when_cancelled()">
|
||||
</Test>
|
||||
</SkippedTests>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKUIKit.framework"
|
||||
BlueprintName = "PMKUIKit"
|
||||
ReferencedContainer = "container:PMKUIKit.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 = "PMKUIKit.framework"
|
||||
BlueprintName = "PMKUIKit"
|
||||
ReferencedContainer = "container:PMKUIKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "63C7FFA61D5BEE09003BAE60"
|
||||
BuildableName = "PMKUIKit.framework"
|
||||
BlueprintName = "PMKUIKit"
|
||||
ReferencedContainer = "container:PMKUIKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
48
Carthage/Checkouts/PromiseKit/Extensions/UIKit/README.markdown
vendored
Normal file
48
Carthage/Checkouts/PromiseKit/Extensions/UIKit/README.markdown
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# PromiseKit UIKit Extensions ![Build Status]
|
||||
|
||||
This project adds promises to Apple’s UIKit framework.
|
||||
|
||||
This project supports Swift 3.0, 3.1, 3.2 and 4.0; iOS 9, 10 and 11; tvOS 10 and
|
||||
11; CocoaPods and Carthage; Xcode 8.0, 8.1, 8.2, 8.3 and 9.0.
|
||||
|
||||
## CocoaPods
|
||||
|
||||
```ruby
|
||||
pod "PromiseKit/UIKit", "~> 6.0"
|
||||
```
|
||||
|
||||
The extensions are built into `PromiseKit.framework` thus `import PromiseKit` is
|
||||
all that is needed.
|
||||
|
||||
## Carthage
|
||||
|
||||
```ruby
|
||||
github "PromiseKit/UIKit" ~> 3.0
|
||||
```
|
||||
|
||||
The extensions are built into their own framework:
|
||||
|
||||
```swift
|
||||
// swift
|
||||
import PromiseKit
|
||||
import PMKUIKit
|
||||
```
|
||||
|
||||
```objc
|
||||
// objc
|
||||
@import PromiseKit;
|
||||
@import PMKUIKit;
|
||||
```
|
||||
|
||||
# `UIImagePickerController`
|
||||
|
||||
Due to iOS 10 requiring an entry in your app’s `Info.plist` for any usage of `UIImagePickerController` (even if you don’t actually call it directly), we have removed UIImagePickerController from the default `UIKit` pod. To use it you must add an additional subspec:
|
||||
|
||||
```ruby
|
||||
pod "PromiseKit/UIImagePickerController"
|
||||
```
|
||||
|
||||
Sorry, but there’s not an easier way.
|
||||
|
||||
|
||||
[Build Status]: https://travis-ci.org/PromiseKit/UIKit.svg?branch=master
|
||||
8
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h
vendored
Normal file
8
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#import "UIView+AnyPromise.h"
|
||||
#import "UIViewController+AnyPromise.h"
|
||||
|
||||
typedef NS_OPTIONS(NSInteger, PMKAnimationOptions) {
|
||||
PMKAnimationOptionsNone = 1 << 0,
|
||||
PMKAnimationOptionsAppear = 1 << 1,
|
||||
PMKAnimationOptionsDisappear = 1 << 2,
|
||||
};
|
||||
80
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIImagePickerController+Promise.swift
vendored
Normal file
80
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIImagePickerController+Promise.swift
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
import UIKit
|
||||
|
||||
#if !os(tvOS)
|
||||
|
||||
extension UIViewController {
|
||||
#if swift(>=4.2)
|
||||
/// Presents the UIImagePickerController, resolving with the user action.
|
||||
public func promise(_ vc: UIImagePickerController, animate: PMKAnimationOptions = [.appear, .disappear], completion: (() -> Void)? = nil) -> Promise<[UIImagePickerController.InfoKey: Any]> {
|
||||
let animated = animate.contains(.appear)
|
||||
let proxy = UIImagePickerControllerProxy()
|
||||
vc.delegate = proxy
|
||||
present(vc, animated: animated, completion: completion)
|
||||
return proxy.promise.ensure {
|
||||
vc.presentingViewController?.dismiss(animated: animated, completion: nil)
|
||||
}
|
||||
}
|
||||
#else
|
||||
/// Presents the UIImagePickerController, resolving with the user action.
|
||||
public func promise(_ vc: UIImagePickerController, animate: PMKAnimationOptions = [.appear, .disappear], completion: (() -> Void)? = nil) -> Promise<[String: Any]> {
|
||||
let animated = animate.contains(.appear)
|
||||
let proxy = UIImagePickerControllerProxy()
|
||||
vc.delegate = proxy
|
||||
present(vc, animated: animated, completion: completion)
|
||||
return proxy.promise.ensure {
|
||||
vc.presentingViewController?.dismiss(animated: animated, completion: nil)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@objc private class UIImagePickerControllerProxy: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
|
||||
#if swift(>=4.2)
|
||||
let (promise, seal) = Promise<[UIImagePickerController.InfoKey: Any]>.pending()
|
||||
#else
|
||||
let (promise, seal) = Promise<[String: Any]>.pending()
|
||||
#endif
|
||||
var retainCycle: AnyObject?
|
||||
|
||||
required override init() {
|
||||
super.init()
|
||||
retainCycle = self
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
||||
seal.fulfill(info)
|
||||
retainCycle = nil
|
||||
}
|
||||
#else
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String: Any]) {
|
||||
seal.fulfill(info)
|
||||
retainCycle = nil
|
||||
}
|
||||
#endif
|
||||
|
||||
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
||||
seal.reject(UIImagePickerController.PMKError.cancelled)
|
||||
retainCycle = nil
|
||||
}
|
||||
}
|
||||
|
||||
extension UIImagePickerController {
|
||||
/// Errors representing PromiseKit UIImagePickerController failures
|
||||
public enum PMKError: CancellableError {
|
||||
/// The user cancelled the UIImagePickerController.
|
||||
case cancelled
|
||||
/// - Returns: true
|
||||
public var isCancelled: Bool {
|
||||
switch self {
|
||||
case .cancelled:
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
80
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h
vendored
Normal file
80
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
#import <PromiseKit/AnyPromise.h>
|
||||
#import <UIKit/UIView.h>
|
||||
|
||||
// Created by Masafumi Yoshida on 2014/07/11.
|
||||
// Copyright (c) 2014年 DeNA. All rights reserved.
|
||||
|
||||
/**
|
||||
To import the `UIView` category:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit/UIKit"
|
||||
|
||||
Or `UIKit` is one of the categories imported by the umbrella pod:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit"
|
||||
|
||||
And then in your sources:
|
||||
|
||||
@import PromiseKit;
|
||||
*/
|
||||
@interface UIView (PromiseKit)
|
||||
|
||||
/**
|
||||
Animate changes to one or more views using the specified duration.
|
||||
|
||||
@param duration The total duration of the animations, measured in
|
||||
seconds. If you specify a negative value or 0, the changes are made
|
||||
without animating them.
|
||||
|
||||
@param animations A block object containing the changes to commit to the
|
||||
views.
|
||||
|
||||
@return A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/**
|
||||
Animate changes to one or more views using the specified duration, delay,
|
||||
options, and completion handler.
|
||||
|
||||
@param duration The total duration of the animations, measured in
|
||||
seconds. If you specify a negative value or 0, the changes are made
|
||||
without animating them.
|
||||
|
||||
@param delay The amount of time (measured in seconds) to wait before
|
||||
beginning the animations. Specify a value of 0 to begin the animations
|
||||
immediately.
|
||||
|
||||
@param options A mask of options indicating how you want to perform the
|
||||
animations. For a list of valid constants, see UIViewAnimationOptions.
|
||||
|
||||
@param animations A block object containing the changes to commit to the
|
||||
views.
|
||||
|
||||
@return A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/**
|
||||
Performs a view animation using a timing curve corresponding to the
|
||||
motion of a physical spring.
|
||||
|
||||
@return A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/**
|
||||
Creates an animation block object that can be used to set up
|
||||
keyframe-based animations for the current view.
|
||||
|
||||
@return A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void (^)(void))animations NS_REFINED_FOR_SWIFT;
|
||||
|
||||
@end
|
||||
64
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m
vendored
Normal file
64
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// UIView+PromiseKit_UIAnimation.m
|
||||
// YahooDenaStudy
|
||||
//
|
||||
// Created by Masafumi Yoshida on 2014/07/11.
|
||||
// Copyright (c) 2014年 DeNA. All rights reserved.
|
||||
//
|
||||
|
||||
#import <PromiseKit/PromiseKit.h>
|
||||
#import "UIView+AnyPromise.h"
|
||||
|
||||
|
||||
#define CopyPasta \
|
||||
NSAssert([NSThread isMainThread], @"UIKit animation must be performed on the main thread"); \
|
||||
\
|
||||
if (![NSThread isMainThread]) { \
|
||||
id error = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"Animation was attempted on a background thread"}]; \
|
||||
return [AnyPromise promiseWithValue:error]; \
|
||||
} \
|
||||
\
|
||||
PMKResolver resolve = nil; \
|
||||
AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve];
|
||||
|
||||
|
||||
@implementation UIView (PromiseKit)
|
||||
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations {
|
||||
return [self promiseWithDuration:duration delay:0 options:0 animations:animations];
|
||||
}
|
||||
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void(^)(void))animations
|
||||
{
|
||||
CopyPasta;
|
||||
|
||||
[UIView animateWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) {
|
||||
resolve(@(finished));
|
||||
}];
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void(^)(void))animations
|
||||
{
|
||||
CopyPasta;
|
||||
|
||||
[UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:velocity options:options animations:animations completion:^(BOOL finished) {
|
||||
resolve(@(finished));
|
||||
}];
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void(^)(void))animations
|
||||
{
|
||||
CopyPasta;
|
||||
|
||||
[UIView animateKeyframesWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) {
|
||||
resolve(@(finished));
|
||||
}];
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
@end
|
||||
115
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift
vendored
Normal file
115
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
import UIKit.UIView
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
|
||||
/**
|
||||
To import the `UIView` category:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit/UIKit"
|
||||
|
||||
Or `UIKit` is one of the categories imported by the umbrella pod:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit"
|
||||
|
||||
And then in your sources:
|
||||
|
||||
import PromiseKit
|
||||
*/
|
||||
public extension UIView {
|
||||
#if swift(>=4.2)
|
||||
/**
|
||||
Animate changes to one or more views using the specified duration, delay,
|
||||
options, and completion handler.
|
||||
|
||||
- Parameter duration: The total duration of the animations, measured in
|
||||
seconds. If you specify a negative value or 0, the changes are made
|
||||
without animating them.
|
||||
|
||||
- Parameter delay: The amount of time (measured in seconds) to wait before
|
||||
beginning the animations. Specify a value of 0 to begin the animations
|
||||
immediately.
|
||||
|
||||
- Parameter options: A mask of options indicating how you want to perform the
|
||||
animations. For a list of valid constants, see UIViewAnimationOptions.
|
||||
|
||||
- Parameter animations: A block object containing the changes to commit to the
|
||||
views.
|
||||
|
||||
- Returns: A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
@discardableResult
|
||||
static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee<Bool> {
|
||||
return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee<Bool> {
|
||||
return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee<Bool> {
|
||||
return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIView.AnimationOptions = []) -> Guarantee<Bool> {
|
||||
return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func perform(_: PMKNamespacer, animation: UIView.SystemAnimation, on views: [UIView], options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee<Bool> {
|
||||
return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
#else
|
||||
/**
|
||||
Animate changes to one or more views using the specified duration, delay,
|
||||
options, and completion handler.
|
||||
|
||||
- Parameter duration: The total duration of the animations, measured in
|
||||
seconds. If you specify a negative value or 0, the changes are made
|
||||
without animating them.
|
||||
|
||||
- Parameter delay: The amount of time (measured in seconds) to wait before
|
||||
beginning the animations. Specify a value of 0 to begin the animations
|
||||
immediately.
|
||||
|
||||
- Parameter options: A mask of options indicating how you want to perform the
|
||||
animations. For a list of valid constants, see UIViewAnimationOptions.
|
||||
|
||||
- Parameter animations: A block object containing the changes to commit to the
|
||||
views.
|
||||
|
||||
- Returns: A promise that fulfills with a boolean NSNumber indicating
|
||||
whether or not the animations actually finished.
|
||||
*/
|
||||
@discardableResult
|
||||
static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee<Bool> {
|
||||
return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee<Bool> {
|
||||
return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee<Bool> {
|
||||
return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIViewAnimationOptions = []) -> Guarantee<Bool> {
|
||||
return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) }
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func perform(_: PMKNamespacer, animation: UISystemAnimation, on views: [UIView], options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee<Bool> {
|
||||
return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
71
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h
vendored
Normal file
71
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
#import <PromiseKit/PromiseKit.h>
|
||||
#import <UIKit/UIViewController.h>
|
||||
|
||||
/**
|
||||
To import the `UIViewController` category:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit/UIKit"
|
||||
|
||||
Or `UIKit` is one of the categories imported by the umbrella pod:
|
||||
|
||||
use_frameworks!
|
||||
pod "PromiseKit"
|
||||
|
||||
And then in your sources:
|
||||
|
||||
@import PromiseKit;
|
||||
*/
|
||||
@interface UIViewController (PromiseKit)
|
||||
|
||||
/**
|
||||
Presents a view controller modally.
|
||||
|
||||
If the view controller is one of the following:
|
||||
|
||||
- MFMailComposeViewController
|
||||
- MFMessageComposeViewController
|
||||
- UIImagePickerController
|
||||
- SLComposeViewController
|
||||
|
||||
Then PromiseKit presents the view controller returning a promise that is
|
||||
resolved as per the documentation for those classes. Eg. if you present a
|
||||
`UIImagePickerController` the view controller will be presented for you
|
||||
and the returned promise will resolve with the media the user selected.
|
||||
|
||||
[self promiseViewController:[MFMailComposeViewController new] animated:YES completion:nil].then(^{
|
||||
//…
|
||||
});
|
||||
|
||||
Otherwise PromiseKit expects your view controller to implement a
|
||||
`promise` property. This promise will be returned from this method and
|
||||
presentation and dismissal of the presented view controller will be
|
||||
managed for you.
|
||||
|
||||
\@interface MyViewController: UIViewController
|
||||
@property (readonly) AnyPromise *promise;
|
||||
@end
|
||||
|
||||
@implementation MyViewController {
|
||||
PMKResolver resolve;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
_promise = [[AnyPromise alloc] initWithResolver:&resolve];
|
||||
}
|
||||
|
||||
- (void)later {
|
||||
resolve(@"some fulfilled value");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
[self promiseViewController:[MyViewController new] aniamted:YES completion:nil].then(^(id value){
|
||||
// value == @"some fulfilled value"
|
||||
});
|
||||
|
||||
@return A promise that can be resolved by the presented view controller.
|
||||
*/
|
||||
- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block NS_REFINED_FOR_SWIFT;
|
||||
|
||||
@end
|
||||
140
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m
vendored
Normal file
140
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
#import <UIKit/UINavigationController.h>
|
||||
#import "UIViewController+AnyPromise.h"
|
||||
#import <PromiseKit/PromiseKit.h>
|
||||
|
||||
#if PMKImagePickerController
|
||||
#import <UIKit/UIImagePickerController.h>
|
||||
#endif
|
||||
|
||||
@interface PMKGenericDelegate : NSObject <UINavigationControllerDelegate> {
|
||||
@public
|
||||
PMKResolver resolve;
|
||||
}
|
||||
+ (instancetype)delegateWithPromise:(AnyPromise **)promise;
|
||||
@end
|
||||
|
||||
@interface UIViewController ()
|
||||
- (AnyPromise*) promise;
|
||||
@end
|
||||
|
||||
@implementation UIViewController (PromiseKit)
|
||||
|
||||
- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block {
|
||||
__kindof UIViewController *vc2present = vc;
|
||||
AnyPromise *promise = nil;
|
||||
|
||||
if ([vc isKindOfClass:NSClassFromString(@"MFMailComposeViewController")]) {
|
||||
PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise];
|
||||
[vc setValue:delegate forKey:@"mailComposeDelegate"];
|
||||
}
|
||||
else if ([vc isKindOfClass:NSClassFromString(@"MFMessageComposeViewController")]) {
|
||||
PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise];
|
||||
[vc setValue:delegate forKey:@"messageComposeDelegate"];
|
||||
}
|
||||
#ifdef PMKImagePickerController
|
||||
else if ([vc isKindOfClass:[UIImagePickerController class]]) {
|
||||
PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise];
|
||||
[vc setValue:delegate forKey:@"delegate"];
|
||||
}
|
||||
#endif
|
||||
else if ([vc isKindOfClass:NSClassFromString(@"SLComposeViewController")]) {
|
||||
PMKResolver resolve;
|
||||
promise = [[AnyPromise alloc] initWithResolver:&resolve];
|
||||
[vc setValue:^(NSInteger result){
|
||||
if (result == 0) {
|
||||
resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]);
|
||||
} else {
|
||||
resolve(@(result));
|
||||
}
|
||||
} forKey:@"completionHandler"];
|
||||
}
|
||||
else if ([vc isKindOfClass:[UINavigationController class]])
|
||||
vc = [(id)vc viewControllers].firstObject;
|
||||
|
||||
if (!vc) {
|
||||
id userInfo = @{NSLocalizedDescriptionKey: @"nil or effective nil passed to promiseViewController"};
|
||||
id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo];
|
||||
return [AnyPromise promiseWithValue:err];
|
||||
}
|
||||
|
||||
if (!promise) {
|
||||
if (![vc respondsToSelector:@selector(promise)]) {
|
||||
id userInfo = @{NSLocalizedDescriptionKey: @"ViewController is not promisable"};
|
||||
id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo];
|
||||
return [AnyPromise promiseWithValue:err];
|
||||
}
|
||||
|
||||
promise = [vc valueForKey:@"promise"];
|
||||
|
||||
if (![promise isKindOfClass:[AnyPromise class]]) {
|
||||
id userInfo = @{NSLocalizedDescriptionKey: @"The promise property is nil or not of type AnyPromise"};
|
||||
id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo];
|
||||
return [AnyPromise promiseWithValue:err];
|
||||
}
|
||||
}
|
||||
|
||||
if (!promise.pending)
|
||||
return promise;
|
||||
|
||||
[self presentViewController:vc2present animated:animated completion:block];
|
||||
|
||||
promise.ensure(^{
|
||||
[vc2present.presentingViewController dismissViewControllerAnimated:animated completion:nil];
|
||||
});
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation PMKGenericDelegate {
|
||||
id retainCycle;
|
||||
}
|
||||
|
||||
+ (instancetype)delegateWithPromise:(AnyPromise **)promise; {
|
||||
PMKGenericDelegate *d = [PMKGenericDelegate new];
|
||||
d->retainCycle = d;
|
||||
*promise = [[AnyPromise alloc] initWithResolver:&d->resolve];
|
||||
return d;
|
||||
}
|
||||
|
||||
- (void)mailComposeController:(id)controller didFinishWithResult:(int)result error:(NSError *)error {
|
||||
if (error != nil) {
|
||||
resolve(error);
|
||||
} else if (result == 0) {
|
||||
resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]);
|
||||
} else {
|
||||
resolve(@(result));
|
||||
}
|
||||
retainCycle = nil;
|
||||
}
|
||||
|
||||
- (void)messageComposeViewController:(id)controller didFinishWithResult:(int)result {
|
||||
if (result == 2) {
|
||||
id userInfo = @{NSLocalizedDescriptionKey: @"The attempt to save or send the message was unsuccessful."};
|
||||
id error = [NSError errorWithDomain:PMKErrorDomain code:PMKOperationFailed userInfo:userInfo];
|
||||
resolve(error);
|
||||
} else {
|
||||
resolve(@(result));
|
||||
}
|
||||
retainCycle = nil;
|
||||
}
|
||||
|
||||
#ifdef PMKImagePickerController
|
||||
|
||||
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
|
||||
id img = info[UIImagePickerControllerEditedImage] ?: info[UIImagePickerControllerOriginalImage];
|
||||
resolve(PMKManifold(img, info));
|
||||
retainCycle = nil;
|
||||
}
|
||||
|
||||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
|
||||
resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]);
|
||||
retainCycle = nil;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
14
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift
vendored
Normal file
14
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
#if !PMKCocoaPods
|
||||
import PromiseKit
|
||||
#endif
|
||||
import UIKit
|
||||
|
||||
@available(iOS 10, tvOS 10, *)
|
||||
public extension UIViewPropertyAnimator {
|
||||
func startAnimation(_: PMKNamespacer) -> Guarantee<UIViewAnimatingPosition> {
|
||||
return Guarantee {
|
||||
addCompletion($0)
|
||||
startAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIImagePickerController.swift
vendored
Normal file
34
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIImagePickerController.swift
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import PromiseKit
|
||||
import PMKUIKit
|
||||
import XCTest
|
||||
import UIKit
|
||||
|
||||
#if os(iOS)
|
||||
|
||||
class Test_UIImagePickerController_Swift: XCTestCase {
|
||||
func test() {
|
||||
class Mock: UIViewController {
|
||||
var info = [String:AnyObject]()
|
||||
|
||||
override func present(_ vc: UIViewController, animated flag: Bool, completion: (() -> Void)?) {
|
||||
let ipc = vc as! UIImagePickerController
|
||||
after(seconds: 0.05).done {
|
||||
ipc.delegate?.imagePickerController?(ipc, didFinishPickingMediaWithInfo: self.info)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let (originalImage, editedImage) = (UIImage(), UIImage())
|
||||
|
||||
let mockvc = Mock()
|
||||
mockvc.info = [UIImagePickerControllerOriginalImage: originalImage, UIImagePickerControllerEditedImage: editedImage]
|
||||
|
||||
let ex = expectation(description: "")
|
||||
mockvc.promise(UIImagePickerController(), animate: []).done { _ in
|
||||
ex.fulfill()
|
||||
}
|
||||
waitForExpectations(timeout: 10, handler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
19
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIView.swift
vendored
Normal file
19
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIView.swift
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import PromiseKit
|
||||
import PMKUIKit
|
||||
import XCTest
|
||||
import UIKit
|
||||
|
||||
class UIViewTests: XCTestCase {
|
||||
func test() {
|
||||
let ex1 = expectation(description: "")
|
||||
let ex2 = expectation(description: "")
|
||||
|
||||
UIView.animate(.promise, duration: 0.1) {
|
||||
ex1.fulfill()
|
||||
}.done { _ in
|
||||
ex2.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: 1)
|
||||
}
|
||||
}
|
||||
135
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIViewController.m
vendored
Normal file
135
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIViewController.m
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
@import PromiseKit;
|
||||
@import PMKUIKit;
|
||||
@import XCTest;
|
||||
@import UIKit;
|
||||
|
||||
|
||||
@interface MyViewController: UIViewController
|
||||
@property AnyPromise *promise;
|
||||
@end
|
||||
@implementation MyViewController
|
||||
@end
|
||||
|
||||
|
||||
@implementation UIViewControllerTests: XCTestCase {
|
||||
UIViewController *rootvc;
|
||||
}
|
||||
|
||||
- (void)setUp {
|
||||
rootvc = [UIApplication sharedApplication].keyWindow.rootViewController = [UIViewController new];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
[UIApplication sharedApplication].keyWindow.rootViewController = nil;
|
||||
}
|
||||
|
||||
// view controller is presented and dismissed when promise is resolved
|
||||
- (void)test1 {
|
||||
XCTestExpectation *ex = [self expectationWithDescription:@""];
|
||||
|
||||
PMKResolver resolve;
|
||||
|
||||
MyViewController *myvc = [MyViewController new];
|
||||
myvc.promise = [[AnyPromise alloc] initWithResolver:&resolve];
|
||||
[rootvc promiseViewController:myvc animated:NO completion:nil].then(^{
|
||||
// seems to take another tick for the dismissal to complete
|
||||
}).then(^{
|
||||
[ex fulfill];
|
||||
});
|
||||
|
||||
XCTAssertNotNil(rootvc.presentedViewController);
|
||||
|
||||
PMKAfter(1).then(^{
|
||||
resolve(@1);
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
// view controller is not presented if promise is resolved
|
||||
- (void)test2 {
|
||||
MyViewController *myvc = [MyViewController new];
|
||||
myvc.promise = [AnyPromise promiseWithValue:nil];
|
||||
[rootvc promiseViewController:myvc animated:NO completion:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
// promise property must be promise
|
||||
- (void)test3 {
|
||||
XCTestExpectation *ex = [self expectationWithDescription:@""];
|
||||
|
||||
MyViewController *myvc = [MyViewController new];
|
||||
myvc.promise = (id) @1;
|
||||
[rootvc promiseViewController:myvc animated:NO completion:nil].catch(^(id err){
|
||||
[ex fulfill];
|
||||
});
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
|
||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
// promise property must not be nil
|
||||
- (void)test4 {
|
||||
XCTestExpectation *ex = [self expectationWithDescription:@""];
|
||||
|
||||
MyViewController *myvc = [MyViewController new];
|
||||
[rootvc promiseViewController:myvc animated:NO completion:nil].catch(^(id err){
|
||||
[ex fulfill];
|
||||
});
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
|
||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
// view controller must have a promise property
|
||||
- (void)test5 {
|
||||
XCTestExpectation *ex = [self expectationWithDescription:@""];
|
||||
|
||||
UIViewController *vc = [UIViewController new];
|
||||
[rootvc promiseViewController:vc animated:NO completion:nil].catch(^(id err){
|
||||
[ex fulfill];
|
||||
});
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
|
||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
// promised nav controllers use their root vc’s promise property
|
||||
- (void)test6 {
|
||||
XCTestExpectation *ex = [self expectationWithDescription:@""];
|
||||
|
||||
PMKResolver resolve;
|
||||
|
||||
MyViewController *myvc = [MyViewController new];
|
||||
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:myvc];
|
||||
myvc.promise = [[AnyPromise alloc] initWithResolver:&resolve];
|
||||
[rootvc promiseViewController:nc animated:NO completion:nil].then(^(id obj){
|
||||
XCTAssertEqualObjects(@1, obj);
|
||||
}).then(^{
|
||||
[ex fulfill];
|
||||
});
|
||||
|
||||
XCTAssertNotNil(rootvc.presentedViewController);
|
||||
|
||||
PMKAfter(1).then(^{
|
||||
resolve(@1);
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||
|
||||
XCTAssertNil(rootvc.presentedViewController);
|
||||
}
|
||||
|
||||
@end
|
||||
16
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/infrastructure.swift
vendored
Normal file
16
Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/infrastructure.swift
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import XCTest
|
||||
import UIKit
|
||||
|
||||
extension XCTestCase {
|
||||
var rootvc: UIViewController {
|
||||
return UIApplication.shared.keyWindow!.rootViewController!
|
||||
}
|
||||
|
||||
override open func setUp() {
|
||||
UIApplication.shared.keyWindow!.rootViewController = UIViewController()
|
||||
}
|
||||
|
||||
override open func tearDown() {
|
||||
UIApplication.shared.keyWindow!.rootViewController = nil
|
||||
}
|
||||
}
|
||||
BIN
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Default-568h@2x.png
vendored
Normal file
BIN
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Default-568h@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
12
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Entitlements.plist
vendored
Normal file
12
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/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>
|
||||
61
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/TestUIImagePickerController.swift
vendored
Normal file
61
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/TestUIImagePickerController.swift
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import XCTest
|
||||
|
||||
class UIImagePickerControllerTests: XCTestCase {
|
||||
var button: XCUIElement {
|
||||
// calling this ensures that any other ViewController has dismissed
|
||||
// as a side-effect since otherwise the switch won't be found
|
||||
return XCUIApplication().tables.buttons.element
|
||||
}
|
||||
|
||||
var value: Bool {
|
||||
return button.isEnabled
|
||||
}
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
continueAfterFailure = false
|
||||
XCUIApplication().launch()
|
||||
XCTAssertFalse(value)
|
||||
}
|
||||
|
||||
#if !os(tvOS)
|
||||
// this test works locally but not on travis
|
||||
// attempting to detect Travis and early-return did not work
|
||||
func test_rejects_when_cancelled() {
|
||||
let app = XCUIApplication()
|
||||
let table = app.tables
|
||||
table.cells.staticTexts["1"].tap()
|
||||
table.cells.element(boundBy: 0).tap()
|
||||
app.navigationBars.buttons["Cancel"].tap()
|
||||
|
||||
XCTAssertTrue(value)
|
||||
}
|
||||
|
||||
// following two don't seem to work since Xcode 8.1
|
||||
// The UI-Testing infrastructure cannot “see” the image picking UI
|
||||
// And… trying to re-record by hand fails.
|
||||
|
||||
func test_fulfills_with_edited_image() {
|
||||
let app = XCUIApplication()
|
||||
app.tables.cells.staticTexts["2"].tap()
|
||||
app.tables.children(matching: .cell).element(boundBy: 1).tap()
|
||||
app.collectionViews.children(matching: .cell).element(boundBy: 0).tap()
|
||||
|
||||
// XCUITesting fails to tap this button, hence this test disabled
|
||||
app.buttons["Choose"].tap()
|
||||
|
||||
XCTAssertTrue(value)
|
||||
}
|
||||
|
||||
func test_fulfills_with_image() {
|
||||
let app = XCUIApplication()
|
||||
let tablesQuery = app.tables
|
||||
tablesQuery.staticTexts["3"].tap()
|
||||
tablesQuery.children(matching: .cell).element(boundBy: 1).tap()
|
||||
|
||||
app.collectionViews.children(matching: .cell).element(boundBy: 0).tap()
|
||||
|
||||
XCTAssertTrue(value)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
100
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/app.swift
vendored
Normal file
100
Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/app.swift
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
import PromiseKit
|
||||
import PMKUIKit
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class App: UITableViewController, UIApplicationDelegate {
|
||||
var window: UIWindow? = UIWindow(frame: UIScreen.main.bounds)
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
window!.rootViewController = self
|
||||
window!.backgroundColor = UIColor.purple
|
||||
window!.makeKeyAndVisible()
|
||||
UIView.setAnimationsEnabled(false)
|
||||
return true
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return Row.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = UITableViewCell()
|
||||
cell.textLabel?.text = Row(indexPath)?.description
|
||||
return cell
|
||||
}
|
||||
|
||||
let testSuceededButton = UIButton()
|
||||
|
||||
override func viewDidLoad() {
|
||||
testSuceededButton.setTitle("unused", for: .normal)
|
||||
testSuceededButton.sizeToFit()
|
||||
testSuceededButton.backgroundColor = UIColor.blue
|
||||
testSuceededButton.isEnabled = false
|
||||
|
||||
view.addSubview(testSuceededButton)
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
testSuceededButton.center = view.center
|
||||
}
|
||||
|
||||
private func success() {
|
||||
self.testSuceededButton.isEnabled = true
|
||||
}
|
||||
|
||||
#if !os(tvOS)
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
switch Row(indexPath)! {
|
||||
case .ImagePickerCancel:
|
||||
let p = promise(UIImagePickerController())
|
||||
p.catch(policy: .allErrors) { error in
|
||||
guard (error as! CancellableError).isCancelled else { abort() }
|
||||
self.success()
|
||||
}
|
||||
p.catch { error in
|
||||
abort()
|
||||
}
|
||||
case .ImagePickerEditImage:
|
||||
let picker = UIImagePickerController()
|
||||
picker.allowsEditing = true
|
||||
_ = promise(picker).done { _ in
|
||||
self.success()
|
||||
}
|
||||
case .ImagePickerPickImage:
|
||||
_ = promise(UIImagePickerController()).done { image in
|
||||
self.success()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
enum Row: Int {
|
||||
case ImagePickerCancel
|
||||
case ImagePickerEditImage
|
||||
case ImagePickerPickImage
|
||||
|
||||
init?(_ indexPath: IndexPath) {
|
||||
guard let row = Row(rawValue: indexPath.row) else {
|
||||
return nil
|
||||
}
|
||||
self = row
|
||||
}
|
||||
|
||||
var indexPath: IndexPath {
|
||||
return IndexPath(row: rawValue, section: 0)
|
||||
}
|
||||
|
||||
var description: String {
|
||||
return (rawValue + 1).description
|
||||
}
|
||||
|
||||
static var count: Int {
|
||||
var x = 0
|
||||
while Row(rawValue: x) != nil {
|
||||
x += 1
|
||||
}
|
||||
return x
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user