Merge branch 'master' into swift_3.0
# Conflicts:
# Tests/ASSET_Tests.swift
# Tests/GET_Tests.swift
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..2f043b5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,37 @@
+language: objective-c
+osx_image: xcode7.3
+env:
+ global:
+ - LC_CTYPE=en_US.UTF-8
+ - LANG=en_US.UTF-8
+ - WORKSPACE=UsergridSDK.xcworkspace
+ - IOS_FRAMEWORK_SCHEME="UsergridSDK iOS"
+ - OSX_FRAMEWORK_SCHEME="UsergridSDK OSX"
+ - TVOS_FRAMEWORK_SCHEME="UsergridSDK tvOS"
+ - WATCHOS_FRAMEWORK_SCHEME="UsergridSDK watchOS"
+ - IOS_SDK=iphonesimulator9.3
+ - OSX_SDK=macosx10.11
+ - TVOS_SDK=appletvsimulator9.2
+ - WATCHOS_SDK=watchsimulator2.2
+ matrix:
+ - DESTINATION="OS=9.3,name=iPhone 6S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES"
+ - DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="YES"
+ - DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES"
+ - DESTINATION="OS=2.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO"
+script:
+ - xcodebuild -version
+ - xcodebuild -showsdks
+
+ # Build Framework in Debug and Run Tests if specified
+ - if [ $RUN_TESTS == "YES" ]; then
+ xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;
+ else
+ xcodebuild -workspace "$WORKSPACE" -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 -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;
+ else
+ xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+ fi
\ No newline at end of file
diff --git a/README.md b/README.md
index cf1f071..b6552bd 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
[![Platform](https://img.shields.io/cocoapods/p/UsergridSDK.svg?style=flat)](http://cocoadocs.org/docsets/UsergridSDK)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/UsergridSDK.svg)](https://cocoapods.org/pods/UsergridSDK)
+[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
Usergrid SDK written in Swift
@@ -16,9 +17,7 @@
## Installation
-> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).**
-
-### CocoaPods
+### [CocoaPods](http://cocoapods.org)
> **CocoaPods 0.39.0+ is required to build the UsergridSDK library.**
@@ -37,8 +36,30 @@
$ pod install
```
+### [Carthage](https://github.com/Carthage/Carthage)
+
+Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
+
+You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
+
+```bash
+$ brew update
+$ brew install carthage
+```
+
+To integrate the UsergridSDK into your Xcode project using Carthage, specify it in your `Cartfile`:
+
+```ogdl
+github "apache/usergrid-swift" "master"
+```
+
+Run `carthage update` to build the framework and drag the built `UsergridSDK.framework` into your Xcode project.
+
+
### Embedded Framework
+> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).**
+
- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:
```bash
@@ -51,7 +72,7 @@
$ git submodule add https://github.com/apache/usergrid
```
-- Open the `sdks/swift` folder, and drag the `UsergridSDK.xcodeproj` into the Project Navigator of your application's Xcode project.
+- Drag the `UsergridSDK.xcodeproj` into the Project Navigator of your application's Xcode project.
> It should appear nested underneath your application's blue project icon.
diff --git a/Tests/ASSET_Tests.swift b/Tests/ASSET_Tests.swift
index 0de2127..0bbeb92 100644
--- a/Tests/ASSET_Tests.swift
+++ b/Tests/ASSET_Tests.swift
@@ -241,7 +241,7 @@
"etag":"dfa7421ea4f35d33e12ba93979a46b7e",
"checkSum":"dfa7421ea4f35d33e12ba93979a46b7e",
"content-length":1417896,
- "last-modified":1455728898545] as [String : Any]
+ "last-modified":Int(Date().timeIntervalSince1970 * Double(1000))] as [String : Any]
let fileMetaData = UsergridFileMetaData(fileMetaDataJSON:fileMetaDataDict)
diff --git a/UsergridSDK.xcworkspace/contents.xcworkspacedata b/UsergridSDK.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..c4efa30
--- /dev/null
+++ b/UsergridSDK.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:UsergridSDK.xcodeproj">
+ </FileRef>
+</Workspace>