Skip to content

Commit

Permalink
Merge branch 'release/v1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
MattCheetham committed Dec 24, 2015
2 parents d2abb89 + c50a400 commit 3d4a6c0
Show file tree
Hide file tree
Showing 35 changed files with 2,704 additions and 133 deletions.
26 changes: 13 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Created by http://www.gitignore.io

### Objective-C ###
# OS X
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
Expand All @@ -16,18 +11,23 @@ build/
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
Pods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

### Xcode ###
build
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcworkspace/contents.xcworkspacedata
Carthage/Build
54 changes: 54 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
language: objective-c
xcode_project: ThunderRequest.xcodeproj # path to your xcodeproj folder
xcode_scheme: ThunderRequest
osx_image: xcode7.2
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
- IOS_FRAMEWORK_SCHEME="ThunderRequest"
- TVOS_FRAMEWORK_SCHEME="ThunderRequestTV"
- OSX_FRAMEWORK_SCHEME="ThunderRequestMac"
- IOS_SDK=iphonesimulator9.2
- TVOS_SDK=appletvsimulator9.1
- OSX_SDK=macosx10.11
matrix:
- DESTINATION="OS=8.1,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.2,name=iPhone 5S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.3,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 6 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPhone 6S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.1,name=iPhone 6S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.1,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks

# Build Framework in Debug and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
else
xcodebuild -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi

# Build Framework in Release and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
else
xcodebuild -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi

# Build Example in Debug if specified
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi

# Build Example in Release if specified
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#Thunder Request

[![Build Status](https://travis-ci.org/3sidedcube/iOS-ThunderRequest.svg)](https://travis-ci.org/3sidedcube/iOS-ThunderRequest)

Thunder Request is a Framework used to simplify making web requests.

#Installation
Expand All @@ -10,6 +12,15 @@ Setting up your app to use Thunder Request is a simple and quick process. Thunde
+ Add ThunderRequest.framework to your Embedded Binaries.
+ Wherever you want to use ThunderTable use `@import ThunderRequest` or `import ThunderRequest` if you're using swift.

#OAuth 2.0 Support
OAuth 2.0 support is available via the protocol `<TSCOAuth2Manager>` which when set on `TSCRequestController` will have it's delegate methods called to refresh the user's token when it either expires or a 403 is received by the server.

When OAuth2Delegate is set on `TSCRequestController` any current OAuth2 credentials will be pulled from the user's keychain by the service identifier provided by `-serviceIdentifier` on the delegate.

To register an OAuth2 credential for the first time to the user's keychain, use the method `-setSharedRequestCredential:andSaveToKeychain:` after having set the delegate. This will store the credential to the keychain for later use by the request controller and also set the `sharedRequestCredential` property on the request controller.

If the request controller detects that the `TSCOAuth2Credential` object is expired, or recieves a 403 on a request it will call the method `-reAuthenticateCredential:withCompletion:` to re-authenticate the user before then continuing to make the request (Or re-making) the request.

#Code level documentation
Documentation is available for the entire library in AppleDoc format. This is available in the framework itself or in the [Hosted Version](http://3sidedcube.github.io/iOS-ThunderRequest/)

Expand Down
Loading

0 comments on commit 3d4a6c0

Please sign in to comment.