diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..77c153e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: objective-c +osx_image: xcode11 +xcode_scheme: ZFMainTests +xcode_project: sample/ZFAlertViewController.xcodeproj +xcode_destination: id=60CD9292-3EC7-4C1C-8166-E1C2F5A47F01 diff --git a/README.md b/README.md index 880a026..2d14e92 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ZFAlertController

+ [![Build Status](https://travis-ci.org/FranLucky/ZFAlertController.svg?branch=master)](https://travis-ci.org/FranLucky/ZFAlertController) ![podversion](https://img.shields.io/cocoapods/v/ZFAlertController.svg) [![Platform](https://img.shields.io/cocoapods/p/ZFAlertController.svg?style=flat)](http://cocoadocs.org/docsets/ZFAlertController) diff --git a/sample/ZFAlertViewController.xcodeproj/project.pbxproj b/sample/ZFAlertViewController.xcodeproj/project.pbxproj index 4d99840..78f44c9 100644 --- a/sample/ZFAlertViewController.xcodeproj/project.pbxproj +++ b/sample/ZFAlertViewController.xcodeproj/project.pbxproj @@ -14,8 +14,19 @@ 7DAFB5122338582E00A1A8E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DAFB5112338582E00A1A8E9 /* Assets.xcassets */; }; 7DAFB5152338582E00A1A8E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7DAFB5132338582E00A1A8E9 /* LaunchScreen.storyboard */; }; 7DAFB5182338582E00A1A8E9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAFB5172338582E00A1A8E9 /* main.m */; }; + 7DC0402B236057B600986F54 /* ZFMainTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DC0402A236057B600986F54 /* ZFMainTests.m */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 7DC0402D236057B600986F54 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7DAFB4FD2338582D00A1A8E9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7DAFB5042338582D00A1A8E9; + remoteInfo = ZFAlertViewController; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 7D77C2782339C806002029AE /* ZFAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFAlertController.m; sourceTree = ""; }; 7D77C2792339C806002029AE /* ZFAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFAlertController.h; sourceTree = ""; }; @@ -29,6 +40,9 @@ 7DAFB5142338582E00A1A8E9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 7DAFB5162338582E00A1A8E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7DAFB5172338582E00A1A8E9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 7DC04028236057B600986F54 /* ZFMainTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZFMainTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7DC0402A236057B600986F54 /* ZFMainTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZFMainTests.m; sourceTree = ""; }; + 7DC0402C236057B600986F54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -39,6 +53,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7DC04025236057B600986F54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -56,6 +77,7 @@ isa = PBXGroup; children = ( 7DAFB5072338582D00A1A8E9 /* ZFAlertController */, + 7DC04029236057B600986F54 /* ZFMainTests */, 7DAFB5062338582D00A1A8E9 /* Products */, ); sourceTree = ""; @@ -64,6 +86,7 @@ isa = PBXGroup; children = ( 7DAFB5052338582D00A1A8E9 /* ZFAlertController.app */, + 7DC04028236057B600986F54 /* ZFMainTests.xctest */, ); name = Products; sourceTree = ""; @@ -85,6 +108,15 @@ path = ZFAlertController; sourceTree = ""; }; + 7DC04029236057B600986F54 /* ZFMainTests */ = { + isa = PBXGroup; + children = ( + 7DC0402A236057B600986F54 /* ZFMainTests.m */, + 7DC0402C236057B600986F54 /* Info.plist */, + ); + path = ZFMainTests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,6 +137,24 @@ productReference = 7DAFB5052338582D00A1A8E9 /* ZFAlertController.app */; productType = "com.apple.product-type.application"; }; + 7DC04027236057B600986F54 /* ZFMainTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7DC0402F236057B600986F54 /* Build configuration list for PBXNativeTarget "ZFMainTests" */; + buildPhases = ( + 7DC04024236057B600986F54 /* Sources */, + 7DC04025236057B600986F54 /* Frameworks */, + 7DC04026236057B600986F54 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7DC0402E236057B600986F54 /* PBXTargetDependency */, + ); + name = ZFMainTests; + productName = ZFMainTests; + productReference = 7DC04028236057B600986F54 /* ZFMainTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -117,6 +167,10 @@ 7DAFB5042338582D00A1A8E9 = { CreatedOnToolsVersion = 10.3; }; + 7DC04027236057B600986F54 = { + CreatedOnToolsVersion = 11.0; + TestTargetID = 7DAFB5042338582D00A1A8E9; + }; }; }; buildConfigurationList = 7DAFB5002338582D00A1A8E9 /* Build configuration list for PBXProject "ZFAlertViewController" */; @@ -133,6 +187,7 @@ projectRoot = ""; targets = ( 7DAFB5042338582D00A1A8E9 /* ZFAlertViewController */, + 7DC04027236057B600986F54 /* ZFMainTests */, ); }; /* End PBXProject section */ @@ -148,6 +203,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7DC04026236057B600986F54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -162,8 +224,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7DC04024236057B600986F54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7DC0402B236057B600986F54 /* ZFMainTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 7DC0402E236057B600986F54 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7DAFB5042338582D00A1A8E9 /* ZFAlertViewController */; + targetProxy = 7DC0402D236057B600986F54 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 7DAFB50E2338582D00A1A8E9 /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -308,7 +386,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.test.wkwebview.ZFAlertViewController; + PRODUCT_BUNDLE_IDENTIFIER = com.pokey.ZFAlertViewController; PRODUCT_NAME = ZFAlertController; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -326,12 +404,52 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.test.wkwebview.ZFAlertViewController; + PRODUCT_BUNDLE_IDENTIFIER = com.pokey.ZFAlertViewController; PRODUCT_NAME = ZFAlertController; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; + 7DC04030236057B600986F54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 22HHB2G722; + INFOPLIST_FILE = ZFMainTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.pokey.ZFAlertViewController.ZFMainTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFAlertController.app/ZFAlertController"; + }; + name = Debug; + }; + 7DC04031236057B600986F54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 22HHB2G722; + INFOPLIST_FILE = ZFMainTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.pokey.ZFAlertViewController.ZFMainTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFAlertController.app/ZFAlertController"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -353,6 +471,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 7DC0402F236057B600986F54 /* Build configuration list for PBXNativeTarget "ZFMainTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7DC04030236057B600986F54 /* Debug */, + 7DC04031236057B600986F54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 7DAFB4FD2338582D00A1A8E9 /* Project object */; diff --git a/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFAlertViewController.xcscheme b/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFAlertViewController.xcscheme new file mode 100644 index 0000000..4cf9fff --- /dev/null +++ b/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFAlertViewController.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFMainTests.xcscheme b/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFMainTests.xcscheme new file mode 100644 index 0000000..2a119df --- /dev/null +++ b/sample/ZFAlertViewController.xcodeproj/xcshareddata/xcschemes/ZFMainTests.xcscheme @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample/ZFMainTests/Info.plist b/sample/ZFMainTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/sample/ZFMainTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/sample/ZFMainTests/ZFMainTests.m b/sample/ZFMainTests/ZFMainTests.m new file mode 100644 index 0000000..212ec32 --- /dev/null +++ b/sample/ZFMainTests/ZFMainTests.m @@ -0,0 +1,38 @@ +// +// ZFMainTests.m +// ZFMainTests +// +// Created by 张帆 on 2019/10/23. +// Copyright © 2019 张帆. All rights reserved. +// + +#import +#import "ZFAlertController.h" + +@interface ZFMainTests : XCTestCase + +@end + +@implementation ZFMainTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { +// ZFAlertController *ac = [ZFAlertController alertWithTitle:@"" message:@"" style:ZFAlertControllerStyleAlert]; +// XCTAssertNotNil(ac); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end