Skip to content

Commit f660841

Browse files
committed
Carthage support
1 parent be7e3ab commit f660841

File tree

19 files changed

+898
-19
lines changed

19 files changed

+898
-19
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ xcuserdata
2222
*.moved-aside
2323
*.xcuserstate
2424
*.orig
25+
ci.sh
2526

2627
## Obj-C/Swift specific
2728
*.hmap
@@ -37,5 +38,6 @@ xcuserdata
3738

3839
## CocoaPods
3940
Pods/
41+
Carthage/
4042

4143
docs/

.travis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
osx_image: xcode8.3
22
language: objective-c
33

4-
podfile: Example/Podfile
5-
64
before_install:
75
- gem install cocoapods -v '1.2.1'
86
- pod --version
97
- pod repo update --silent
8+
- brew outdated carthage || brew upgrade carthage
109

1110
install:
1211
- pushd Example; pod install; popd;
1312
- if [[ ! $(which xcpretty) ]]; then gem install xcpretty --user-install; fi;
1413

1514
env:
1615
matrix:
17-
- DESTINATION="platform=iOS Simulator,OS=10.3.1,name=iPhone 7" POD_LINT="YES"
18-
- DESTINATION="platform=iOS Simulator,OS=9.0,name=iPhone 6" POD_LINT="NO"
19-
- DESTINATION="platform=iOS Simulator,OS=8.3,name=iPhone 4S" POD_LINT="NO"
16+
- DESTINATION="platform=iOS Simulator,OS=10.3.1,name=iPhone 7"
17+
- DESTINATION="platform=iOS Simulator,OS=9.0,name=iPhone 6"
18+
- DESTINATION="platform=iOS Simulator,OS=8.3,name=iPhone 4S"
19+
20+
before_script:
21+
- carthage bootstrap --platform iOS
2022

2123
script:
2224
- xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination "$DESTINATION" build | xcpretty
2325
- xcodebuild -workspace Example/ReCaptcha.xcworkspace -scheme ReCaptcha-Example -destination "$DESTINATION" test | xcpretty
2426

25-
# Run `pod lib lint` if specified
26-
- if [ $POD_LINT == "YES" ]; then
27-
pod lib lint --verbose;
28-
fi
29-
3027
after_success:
28+
- pod lib lint --verbose
29+
- carthage build --no-skip-current --platform iOS
3130
- bash <(curl -s https://codecov.io/bash) -J 'ReCaptcha'

Cartfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github "antitypical/Result" >= 3.0
2+
github "ReactiveX/RxSwift" ~> 3.0

Cartfile.resolved

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github "ReactiveX/RxSwift" "3.6.1"
2+
github "antitypical/Result" "3.2.4"

Example/ReCaptcha.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
1515
BD850CB2DF4C9C94FC51226C /* Pods_ReCaptcha_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62BEEA62161F672468CCFD64 /* Pods_ReCaptcha_Example.framework */; };
1616
D091B6E053FD250B4757E34C /* Pods_ReCaptcha_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A28DC340FF0BC1627B3F /* Pods_ReCaptcha_Tests.framework */; };
17+
F206BAD51F8D3FEB00A25807 /* Cartfile in Resources */ = {isa = PBXBuildFile; fileRef = F206BAD41F8D3FEB00A25807 /* Cartfile */; };
1718
F288E9451F9537760018688D /* ReCaptchaError+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F288E9441F9537760018688D /* ReCaptchaError+Equatable.swift */; };
1819
F2E2685E1F7AEE3400CD876D /* ReCaptcha__Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2685D1F7AEE3400CD876D /* ReCaptcha__Tests.swift */; };
1920
F2ECCF881E9FCE930097B199 /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = F2ECCF871E9FCE930097B199 /* .travis.yml */; };
@@ -53,6 +54,7 @@
5354
9417A28DC340FF0BC1627B3F /* Pods_ReCaptcha_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReCaptcha_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5455
C2A0BDD35B5E219129E9BC65 /* Pods-ReCaptcha_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReCaptcha_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ReCaptcha_Example/Pods-ReCaptcha_Example.release.xcconfig"; sourceTree = "<group>"; };
5556
C8537003ECC47117AF54DCA9 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
57+
F206BAD41F8D3FEB00A25807 /* Cartfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cartfile; path = ../Cartfile; sourceTree = "<group>"; };
5658
F288E9441F9537760018688D /* ReCaptchaError+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ReCaptchaError+Equatable.swift"; sourceTree = "<group>"; };
5759
F2E2685D1F7AEE3400CD876D /* ReCaptcha__Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReCaptcha__Tests.swift; sourceTree = "<group>"; };
5860
F2ECCF761E9FC47B0097B199 /* ReCaptcha_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReCaptcha_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -134,6 +136,7 @@
134136
isa = PBXGroup;
135137
children = (
136138
62C1DD0E80E9920845E5DA51 /* ReCaptcha.podspec */,
139+
F206BAD41F8D3FEB00A25807 /* Cartfile */,
137140
0A2D0E5B4C6E445BF971488B /* README.md */,
138141
C8537003ECC47117AF54DCA9 /* LICENSE */,
139142
F2ECCF871E9FCE930097B199 /* .travis.yml */,
@@ -292,6 +295,7 @@
292295
isa = PBXResourcesBuildPhase;
293296
buildActionMask = 2147483647;
294297
files = (
298+
F206BAD51F8D3FEB00A25807 /* Cartfile in Resources */,
295299
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
296300
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
297301
F2ECCF901EA008C20097B199 /* codecov.yml in Resources */,
@@ -520,7 +524,7 @@
520524
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
521525
GCC_WARN_UNUSED_FUNCTION = YES;
522526
GCC_WARN_UNUSED_VARIABLE = YES;
523-
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
527+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
524528
MTL_ENABLE_DEBUG_INFO = YES;
525529
ONLY_ACTIVE_ARCH = YES;
526530
SDKROOT = iphoneos;
@@ -566,7 +570,7 @@
566570
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
567571
GCC_WARN_UNUSED_FUNCTION = YES;
568572
GCC_WARN_UNUSED_VARIABLE = YES;
569-
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
573+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
570574
MTL_ENABLE_DEBUG_INFO = NO;
571575
SDKROOT = iphoneos;
572576
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

Example/ReCaptcha_Tests/mock.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
<span id="submit" style="visibility: hidden;"></span>
1414
</body>
1515
</html>
16+
cartha

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,31 @@ invisibility is not possible.
1414

1515
![Example Gif 2](https://raw.githubusercontent.com/fjcaetano/ReCaptcha/master/example2.gif) ![Example Gif](https://raw.githubusercontent.com/fjcaetano/ReCaptcha/master/example.gif)
1616

17-
#### _Warning ⚠️_
17+
#### _Warning_ ⚠️
1818

1919
Beware that this library only works for Invisible ReCaptcha keys! Make sure to check the Invisible reCAPTCHA option
20-
when creating your [API Key](https://www.google.com/recaptcha/admin)
20+
when creating your [API Key](https://www.google.com/recaptcha/admin).
2121

2222
## Installation
2323

24-
ReCaptcha is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your
25-
Podfile:
24+
ReCaptcha is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).
25+
To install it, simply add the following line to your depedencies file:
2626

27+
#### Cocoapods
2728
``` ruby
2829
pod "ReCaptcha"
2930
# or
3031
pod "ReCaptcha/RxSwift"
3132
```
3233

34+
#### Carthage
35+
``` ruby
36+
github "fjcaetano/ReCaptcha"
37+
```
38+
39+
Carthage will create two different frameworks named `ReCaptcha` and `ReCaptcha_RxSwift`, the latter containing the RxSwift
40+
extension for the ReCaptcha framework.
41+
3342
## Usage
3443

3544
Simply add `ReCaptchaKey` and `ReCaptchaDomain` to your Info.plist and run:

0 commit comments

Comments
 (0)