Skip to content

Commit

Permalink
Carthage support
Browse files Browse the repository at this point in the history
  • Loading branch information
fjcaetano committed Oct 19, 2017
1 parent be7e3ab commit f660841
Show file tree
Hide file tree
Showing 19 changed files with 898 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ xcuserdata
*.moved-aside
*.xcuserstate
*.orig
ci.sh

## Obj-C/Swift specific
*.hmap
Expand All @@ -37,5 +38,6 @@ xcuserdata

## CocoaPods
Pods/
Carthage/

docs/
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
osx_image: xcode8.3
language: objective-c

podfile: Example/Podfile

before_install:
- gem install cocoapods -v '1.2.1'
- pod --version
- pod repo update --silent
- brew outdated carthage || brew upgrade carthage

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

env:
matrix:
- DESTINATION="platform=iOS Simulator,OS=10.3.1,name=iPhone 7" POD_LINT="YES"
- DESTINATION="platform=iOS Simulator,OS=9.0,name=iPhone 6" POD_LINT="NO"
- DESTINATION="platform=iOS Simulator,OS=8.3,name=iPhone 4S" POD_LINT="NO"
- DESTINATION="platform=iOS Simulator,OS=10.3.1,name=iPhone 7"
- DESTINATION="platform=iOS Simulator,OS=9.0,name=iPhone 6"
- DESTINATION="platform=iOS Simulator,OS=8.3,name=iPhone 4S"

before_script:
- carthage bootstrap --platform iOS

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

# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint --verbose;
fi

after_success:
- pod lib lint --verbose
- carthage build --no-skip-current --platform iOS
- bash <(curl -s https://codecov.io/bash) -J 'ReCaptcha'
2 changes: 2 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github "antitypical/Result" >= 3.0
github "ReactiveX/RxSwift" ~> 3.0
2 changes: 2 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github "ReactiveX/RxSwift" "3.6.1"
github "antitypical/Result" "3.2.4"
8 changes: 6 additions & 2 deletions Example/ReCaptcha.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
BD850CB2DF4C9C94FC51226C /* Pods_ReCaptcha_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62BEEA62161F672468CCFD64 /* Pods_ReCaptcha_Example.framework */; };
D091B6E053FD250B4757E34C /* Pods_ReCaptcha_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A28DC340FF0BC1627B3F /* Pods_ReCaptcha_Tests.framework */; };
F206BAD51F8D3FEB00A25807 /* Cartfile in Resources */ = {isa = PBXBuildFile; fileRef = F206BAD41F8D3FEB00A25807 /* Cartfile */; };
F288E9451F9537760018688D /* ReCaptchaError+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F288E9441F9537760018688D /* ReCaptchaError+Equatable.swift */; };
F2E2685E1F7AEE3400CD876D /* ReCaptcha__Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2685D1F7AEE3400CD876D /* ReCaptcha__Tests.swift */; };
F2ECCF881E9FCE930097B199 /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = F2ECCF871E9FCE930097B199 /* .travis.yml */; };
Expand Down Expand Up @@ -53,6 +54,7 @@
9417A28DC340FF0BC1627B3F /* Pods_ReCaptcha_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReCaptcha_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
C8537003ECC47117AF54DCA9 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
F206BAD41F8D3FEB00A25807 /* Cartfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cartfile; path = ../Cartfile; sourceTree = "<group>"; };
F288E9441F9537760018688D /* ReCaptchaError+Equatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ReCaptchaError+Equatable.swift"; sourceTree = "<group>"; };
F2E2685D1F7AEE3400CD876D /* ReCaptcha__Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReCaptcha__Tests.swift; sourceTree = "<group>"; };
F2ECCF761E9FC47B0097B199 /* ReCaptcha_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReCaptcha_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -134,6 +136,7 @@
isa = PBXGroup;
children = (
62C1DD0E80E9920845E5DA51 /* ReCaptcha.podspec */,
F206BAD41F8D3FEB00A25807 /* Cartfile */,
0A2D0E5B4C6E445BF971488B /* README.md */,
C8537003ECC47117AF54DCA9 /* LICENSE */,
F2ECCF871E9FCE930097B199 /* .travis.yml */,
Expand Down Expand Up @@ -292,6 +295,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F206BAD51F8D3FEB00A25807 /* Cartfile in Resources */,
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
F2ECCF901EA008C20097B199 /* codecov.yml in Resources */,
Expand Down Expand Up @@ -520,7 +524,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -566,7 +570,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
1 change: 1 addition & 0 deletions Example/ReCaptcha_Tests/mock.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
<span id="submit" style="visibility: hidden;"></span>
</body>
</html>
cartha
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,31 @@ invisibility is not possible.

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

#### _Warning ⚠️_
#### _Warning_ ⚠️

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

## Installation

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

#### Cocoapods
``` ruby
pod "ReCaptcha"
# or
pod "ReCaptcha/RxSwift"
```

#### Carthage
``` ruby
github "fjcaetano/ReCaptcha"
```

Carthage will create two different frameworks named `ReCaptcha` and `ReCaptcha_RxSwift`, the latter containing the RxSwift
extension for the ReCaptcha framework.

## Usage

Simply add `ReCaptchaKey` and `ReCaptchaDomain` to your Info.plist and run:
Expand Down
Loading

0 comments on commit f660841

Please sign in to comment.