Initial commit of Usergrid Swift SDK.
Project: http://git-wip-us.apache.org/repos/asf/usergrid-swift/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid-swift/commit/8283a6dd Tree: http://git-wip-us.apache.org/repos/asf/usergrid-swift/tree/8283a6dd Diff: http://git-wip-us.apache.org/repos/asf/usergrid-swift/diff/8283a6dd Branch: refs/heads/master Commit: 8283a6dd0e9fff7ffde5ad21e1dda80e569f08d6 Parents: Author: Michael Russo <[email protected]> Authored: Thu Sep 1 16:50:54 2016 -0700 Committer: Michael Russo <[email protected]> Committed: Thu Sep 1 16:50:54 2016 -0700 ---------------------------------------------------------------------- .gitignore | 28 + LICENSE.txt | 19 + Package.swift | 30 + README.md | 802 ++++ .../ActivityFeed.xcodeproj/project.pbxproj | 827 ++++ .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 7 + .../xcshareddata/ActivityFeed.xcscmblueprint | 30 + Samples/ActivityFeed/Podfile | 8 + Samples/ActivityFeed/Readme.md | 29 + .../ActivityFeed/Source/ActivityEntity.swift | 60 + Samples/ActivityFeed/Source/AppDelegate.swift | 65 + .../AppIcon.appiconset/Contents.json | 38 + .../Source/Assets.xcassets/Contents.json | 6 + .../UsergridGuy.imageset/Contents.json | 21 + .../UsergridGuy.imageset/UsergridGuy.png | Bin 0 -> 6230 bytes .../Source/Base.lproj/LaunchScreen.storyboard | 27 + .../Source/Base.lproj/Main.storyboard | 371 ++ .../Source/FollowViewController.swift | 50 + Samples/ActivityFeed/Source/FormTextField.swift | 71 + Samples/ActivityFeed/Source/Info.plist | 43 + .../Source/LoginViewController.swift | 77 + .../Source/MessageTableViewCell.swift | 101 + .../ActivityFeed/Source/MessageTextView.swift | 39 + .../Source/MessageViewController.swift | 224 + .../Source/RegisterViewController.swift | 62 + .../ActivityFeed/Source/UsergridManager.swift | 78 + .../Source/ViewControllerExtensions.swift | 36 + .../Assets.xcassets/README__ignoredByTemplate__ | 1 + .../ExtensionDelegate.swift | 45 + .../WatchSample Extension/Info.plist | 45 + .../InterfaceController.swift | 81 + .../AppIcon.appiconset/Contents.json | 55 + .../WatchSample/Base.lproj/Interface.storyboard | 46 + Samples/ActivityFeed/WatchSample/Info.plist | 35 + Samples/Push/Push.xcodeproj/project.pbxproj | 473 +++ .../contents.xcworkspacedata | 7 + .../Push.xcworkspace/contents.xcworkspacedata | 7 + Samples/Push/Readme.md | 21 + Samples/Push/Source/AppDelegate.swift | 53 + .../AppIcon.appiconset/Contents.json | 38 + .../Push/Source/Assets.xcassets/Contents.json | 6 + .../UsergridGuy.imageset/Contents.json | 21 + .../UsergridGuy.imageset/UsergridGuy.png | Bin 0 -> 6230 bytes .../Source/Base.lproj/LaunchScreen.storyboard | 27 + Samples/Push/Source/Base.lproj/Main.storyboard | 75 + Samples/Push/Source/Info.plist | 38 + Samples/Push/Source/UsergridManager.swift | 72 + Samples/Push/Source/ViewController.swift | 39 + Samples/Readme.md | 27 + Source/Info.plist | 26 + Source/Usergrid.swift | 637 +++ Source/UsergridAsset.swift | 198 + Source/UsergridAssetRequestWrapper.swift | 48 + Source/UsergridAuth.swift | 276 ++ Source/UsergridClient.swift | 931 +++++ Source/UsergridClientConfig.swift | 149 + Source/UsergridDevice.swift | 213 + Source/UsergridEntity.swift | 635 +++ Source/UsergridEnums.swift | 417 ++ Source/UsergridExtensions.swift | 112 + Source/UsergridFileMetaData.swift | 114 + Source/UsergridKeychainHelpers.swift | 196 + Source/UsergridQuery.swift | 591 +++ Source/UsergridRequest.swift | 245 ++ Source/UsergridRequestManager.swift | 176 + Source/UsergridResponse.swift | 203 + Source/UsergridResponseError.swift | 90 + Source/UsergridSDK.h | 37 + Source/UsergridSessionDelegate.swift | 90 + Source/UsergridUser.swift | 523 +++ Tests/ASSET_Tests.swift | 280 ++ Tests/AUTH_Tests.swift | 132 + Tests/CONNECTION_Tests.swift | 105 + Tests/ClientCreationTests.swift | 74 + Tests/Entity_Tests.swift | 173 + Tests/GET_Tests.swift | 113 + Tests/Info.plist | 24 + Tests/PUT_Tests.swift | 158 + Tests/TestAssets/UsergridGuy.jpg | Bin 0 -> 12981 bytes Tests/TestAssets/logo_apigee.png | Bin 0 -> 10696 bytes Tests/TestAssets/test.png | Bin 0 -> 1417937 bytes Tests/User_Tests.swift | 399 ++ UsergridSDK.xcodeproj/project.pbxproj | 1179 ++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcschemes/UsergridSDK OSX.xcscheme | 100 + .../xcschemes/UsergridSDK iOS.xcscheme | 100 + .../xcschemes/UsergridSDK tvOS.xcscheme | 114 + .../xcschemes/UsergridSDK watchOS.xcscheme | 80 + .../xcschemes/UsergridSDK_OSX_Tests.xcscheme | 56 + .../xcschemes/UsergridSDK_TVOS_Tests.xcscheme | 56 + .../xcschemes/UsergridSDK_iOS_Tests.xcscheme | 57 + docs/Classes.html | 702 ++++ docs/Classes/Usergrid.html | 3798 +++++++++++++++++ docs/Classes/UsergridAppAuth.html | 410 ++ docs/Classes/UsergridAsset.html | 702 ++++ docs/Classes/UsergridAssetUploadRequest.html | 356 ++ docs/Classes/UsergridAuth.html | 558 +++ docs/Classes/UsergridClient.html | 3873 ++++++++++++++++++ docs/Classes/UsergridClientConfig.html | 744 ++++ docs/Classes/UsergridDevice.html | 763 ++++ docs/Classes/UsergridEntity.html | 2683 ++++++++++++ docs/Classes/UsergridFileMetaData.html | 532 +++ docs/Classes/UsergridQuery.html | 2278 ++++++++++ .../UsergridQuery/UsergridQueryOperator.html | 272 ++ .../UsergridQuery/UsergridQuerySortOrder.html | 203 + docs/Classes/UsergridRequest.html | 619 +++ docs/Classes/UsergridResponse.html | 969 +++++ docs/Classes/UsergridResponseError.html | 473 +++ docs/Classes/UsergridUser.html | 2434 +++++++++++ .../UsergridUser/UsergridUserProperties.html | 346 ++ docs/Classes/UsergridUserAuth.html | 410 ++ docs/Enums.html | 435 ++ docs/Enums/UsergridAuthFallback.html | 248 ++ docs/Enums/UsergridAuthMode.html | 283 ++ docs/Enums/UsergridDeviceProperties.html | 369 ++ docs/Enums/UsergridDirection.html | 286 ++ docs/Enums/UsergridEntityProperties.html | 514 +++ docs/Enums/UsergridHttpMethod.html | 341 ++ docs/Enums/UsergridImageContentType.html | 286 ++ docs/Enums/UsergridQueryOperator.html | 431 ++ docs/Enums/UsergridQuerySortOrder.html | 338 ++ docs/Enums/UsergridUserProperties.html | 524 +++ docs/Extensions.html | 203 + docs/Extensions/NSDate.html | 448 ++ docs/Extensions/UsergridAsset.html | 184 + docs/Extensions/UsergridAuth.html | 260 ++ docs/Extensions/UsergridClient.html | 1962 +++++++++ docs/Global Variables.html | 210 + docs/Protocols.html | 146 + docs/Protocols/UsergridAuth.html | 260 ++ docs/Typealiases.html | 411 ++ docs/css/highlight.css | 200 + docs/css/jazzy.css | 331 ++ docs/docsets/.docset/Contents/Info.plist | 20 + .../Contents/Resources/Documents/Classes.html | 702 ++++ .../Resources/Documents/Classes/Usergrid.html | 3798 +++++++++++++++++ .../Documents/Classes/UsergridAppAuth.html | 410 ++ .../Documents/Classes/UsergridAsset.html | 702 ++++ .../Classes/UsergridAssetUploadRequest.html | 356 ++ .../Documents/Classes/UsergridAuth.html | 558 +++ .../Documents/Classes/UsergridClient.html | 3873 ++++++++++++++++++ .../Documents/Classes/UsergridClientConfig.html | 744 ++++ .../Documents/Classes/UsergridDevice.html | 763 ++++ .../Documents/Classes/UsergridEntity.html | 2683 ++++++++++++ .../Documents/Classes/UsergridFileMetaData.html | 532 +++ .../Documents/Classes/UsergridQuery.html | 2278 ++++++++++ .../UsergridQuery/UsergridQueryOperator.html | 272 ++ .../UsergridQuery/UsergridQuerySortOrder.html | 203 + .../Documents/Classes/UsergridRequest.html | 619 +++ .../Documents/Classes/UsergridResponse.html | 969 +++++ .../Classes/UsergridResponseError.html | 473 +++ .../Documents/Classes/UsergridUser.html | 2434 +++++++++++ .../UsergridUser/UsergridUserProperties.html | 346 ++ .../Documents/Classes/UsergridUserAuth.html | 410 ++ .../Contents/Resources/Documents/Enums.html | 435 ++ .../Documents/Enums/UsergridAuthFallback.html | 248 ++ .../Documents/Enums/UsergridAuthMode.html | 283 ++ .../Enums/UsergridDeviceProperties.html | 369 ++ .../Documents/Enums/UsergridDirection.html | 286 ++ .../Enums/UsergridEntityProperties.html | 514 +++ .../Documents/Enums/UsergridHttpMethod.html | 341 ++ .../Enums/UsergridImageContentType.html | 286 ++ .../Documents/Enums/UsergridQueryOperator.html | 431 ++ .../Documents/Enums/UsergridQuerySortOrder.html | 338 ++ .../Documents/Enums/UsergridUserProperties.html | 524 +++ .../Resources/Documents/Extensions.html | 203 + .../Resources/Documents/Extensions/NSDate.html | 448 ++ .../Documents/Extensions/UsergridAsset.html | 184 + .../Documents/Extensions/UsergridAuth.html | 260 ++ .../Documents/Extensions/UsergridClient.html | 1962 +++++++++ .../Resources/Documents/Global Variables.html | 210 + .../Contents/Resources/Documents/Protocols.html | 146 + .../Documents/Protocols/UsergridAuth.html | 260 ++ .../Resources/Documents/Typealiases.html | 411 ++ .../Resources/Documents/css/highlight.css | 200 + .../Contents/Resources/Documents/css/jazzy.css | 331 ++ .../Contents/Resources/Documents/img/carat.png | Bin 0 -> 274 bytes .../Contents/Resources/Documents/img/dash.png | Bin 0 -> 1338 bytes .../Contents/Resources/Documents/img/gh.png | Bin 0 -> 1571 bytes .../Contents/Resources/Documents/index.html | 927 +++++ .../Contents/Resources/Documents/js/jazzy.js | 40 + .../Resources/Documents/js/jquery.min.js | 4 + .../Resources/Documents/undocumented.txt | 0 .../.docset/Contents/Resources/docSet.dsidx | Bin 0 -> 147456 bytes docs/docsets/.tgz | Bin 0 -> 148251 bytes .../UsergridSDK.docset/Contents/Info.plist | 20 + .../Contents/Resources/Documents/Classes.html | 694 ++++ .../Resources/Documents/Classes/Usergrid.html | 3704 +++++++++++++++++ .../Documents/Classes/UsergridAppAuth.html | 402 ++ .../Documents/Classes/UsergridAsset.html | 694 ++++ .../Classes/UsergridAssetUploadRequest.html | 348 ++ .../Documents/Classes/UsergridAuth.html | 550 +++ .../Documents/Classes/UsergridClient.html | 3800 +++++++++++++++++ .../Documents/Classes/UsergridClientConfig.html | 736 ++++ .../Documents/Classes/UsergridDevice.html | 644 +++ .../Documents/Classes/UsergridEntity.html | 2612 ++++++++++++ .../Documents/Classes/UsergridFileMetaData.html | 524 +++ .../Documents/Classes/UsergridQuery.html | 2270 ++++++++++ .../UsergridQuery/UsergridQueryOperator.html | 272 ++ .../UsergridQuery/UsergridQuerySortOrder.html | 203 + .../Documents/Classes/UsergridRequest.html | 611 +++ .../Documents/Classes/UsergridResponse.html | 961 +++++ .../Classes/UsergridResponseError.html | 465 +++ .../Documents/Classes/UsergridUser.html | 2319 +++++++++++ .../UsergridUser/UsergridUserProperties.html | 346 ++ .../Documents/Classes/UsergridUserAuth.html | 402 ++ .../Contents/Resources/Documents/Enums.html | 427 ++ .../Documents/Enums/UsergridAuthFallback.html | 248 ++ .../Enums/UsergridDeviceProperties.html | 361 ++ .../Documents/Enums/UsergridDirection.html | 278 ++ .../Enums/UsergridEntityProperties.html | 506 +++ .../Documents/Enums/UsergridHttpMethod.html | 333 ++ .../Enums/UsergridImageContentType.html | 278 ++ .../Documents/Enums/UsergridQueryOperator.html | 423 ++ .../Documents/Enums/UsergridQuerySortOrder.html | 330 ++ .../Documents/Enums/UsergridUserProperties.html | 516 +++ .../Resources/Documents/Extensions.html | 175 + .../Documents/Extensions/UsergridAsset.html | 184 + .../Documents/Extensions/UsergridAuth.html | 260 ++ .../Documents/Extensions/UsergridClient.html | 1962 +++++++++ .../Resources/Documents/Global Variables.html | 202 + .../Contents/Resources/Documents/Protocols.html | 146 + .../Documents/Protocols/UsergridAuth.html | 260 ++ .../Resources/Documents/Typealiases.html | 403 ++ .../Resources/Documents/css/highlight.css | 200 + .../Contents/Resources/Documents/css/jazzy.css | 331 ++ .../Contents/Resources/Documents/img/carat.png | Bin 0 -> 274 bytes .../Contents/Resources/Documents/img/dash.png | Bin 0 -> 1338 bytes .../Contents/Resources/Documents/img/gh.png | Bin 0 -> 1571 bytes .../Contents/Resources/Documents/index.html | 919 +++++ .../Contents/Resources/Documents/js/jazzy.js | 40 + .../Resources/Documents/js/jquery.min.js | 4 + .../Resources/Documents/undocumented.txt | 0 .../Contents/Resources/docSet.dsidx | Bin 0 -> 151552 bytes docs/docsets/UsergridSDK.tgz | Bin 0 -> 145485 bytes docs/img/carat.png | Bin 0 -> 274 bytes docs/img/dash.png | Bin 0 -> 1338 bytes docs/img/gh.png | Bin 0 -> 1571 bytes docs/index.html | 927 +++++ docs/js/jazzy.js | 40 + docs/js/jquery.min.js | 4 + docs/undocumented.txt | 0 244 files changed, 110405 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fbb5c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Mac OS X +.DS_Store + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Carthage +Carthage/Build +ActivityFeed/ActivityFeed.xcworkspace/xcuserdata/ApigeeCorporation.xcuserdatad/xcdebugger +.build + +#Intellij +.idea \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/LICENSE.txt ---------------------------------------------------------------------- diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..34193ba --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,19 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + * + */ http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Package.swift ---------------------------------------------------------------------- diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..73f2c87 --- /dev/null +++ b/Package.swift @@ -0,0 +1,30 @@ +// +// Package.swift +// +// Created by Robert Walsh on 10/23/15. +// +/* +* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. The ASF licenses this file to You +* under the Apache License, Version 2.0 (the "License"); you may not +* use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. For additional information regarding +* copyright in this work, please see the NOTICE file in the top level +* directory of this distribution. +* +*/ + +import PackageDescription + +let package = Package( + name: "UsergridSDK" +) http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md new file mode 100644 index 0000000..cf1f071 --- /dev/null +++ b/README.md @@ -0,0 +1,802 @@ +# Usergrid Swift SDK + +[](http://cocoadocs.org/docsets/UsergridSDK) +[](https://cocoapods.org/pods/UsergridSDK) + +Usergrid SDK written in Swift + +## Requirements + +> **While the Usergrid SDK is written in Swift, the functionality remains compatible with Objective-C.** + +> **Use `#import <UsergridSDK/UsergridSDK-Swift.h>` in your Objective-C files to enable the use of the SDK.** + +- iOS 8.0+ / Mac OS X 10.11+ / tvOS 9.1+ / watchOS 2.1+ +- Xcode 7.1+ + +## Installation + +> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** + +### CocoaPods + +> **CocoaPods 0.39.0+ is required to build the UsergridSDK library.** + +To integrate the UsergridSDK into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +platform :ios, '8.0' +use_frameworks! + +pod 'UsergridSDK' +``` + +Then, run the following command: + +```bash +$ pod install +``` + +### Embedded Framework + +- 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 +$ git init +``` + +- Add UsergridSDK as a git submodule by running the following command: + +```bash +$ 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. + +> It should appear nested underneath your application's blue project icon. + +- Select the `UsergridSDK.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. +- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. +- In the tab bar at the top of that window, open the "General" panel. +- Click on the `+` button under the "Embedded Binaries" section. +- Select the `UsergridSDK.framework`. + +> The `UsergridSDK.framework` is automatically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. + +## Documentation + +The documentation for this library is available [here](http://cocoadocs.org/docsets/UsergridSDK). + +## Initialization + +There are two different ways of initializing the Usergrid Swift SDK: + +1. The singleton pattern is both convenient and enables the developer to use a globally available and always-initialized instance of Usergrid. + +```swift +Usergrid.initSharedInstance(orgId: "orgId", appId: "appId") +``` + +2. The Instance pattern enables the developer to manage instances of the Usergrid client independently and in an isolated fashion. The primary use-case for this is when an application connects to multiple Usergrid targets. + +```swift +let client = UsergridClient(orgId: "orgId", appId: "appId") +``` + +_Note: Examples in this readme assume you are using the `Usergrid` shared instance. If you've implemented the instance pattern instead, simply replace `Usergrid` with your client instance variable._ + +## Push Notifications + +_Note: You must have an Apple Developer account along with valid provisioning profiles set in order to receive push notifications._ + +In order to utilize Usergrid push notifications, you must register the device with an Usergrid push notifier identifier. + +> For a more thorough example of recieving push notifications and sending push notifications (from the device) refer to the Push sample app located in the `/Samples` folder. + +The following code snippet shows how you would register for push notifications and apply the push token within the application delegate. + +```swift +import UsergridSDK + +@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + + // Initialize the shared instance of Usergrid. + Usergrid.initSharedInstance(orgId:"orgId", appId: "appId") + + // Register for APN + application.registerUserNotificationSettings(UIUserNotificationSettings( forTypes: [.Alert, .Badge, .Sound], categories: nil)) + application.registerForRemoteNotifications() + + return true + } + + func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { + Usergrid.applyPushToken(deviceToken, notifierID: "notifierId") { response in + // The push notification is now added to Usergrid for this device and this device will now be able to recieve notifications. + } + } +} +``` + +## RESTful operations + +When making any RESTful call, a `type` parameter (or `path`) is always required. Whether you specify this as an argument or in an object as a parameter is up to you. + +### GET + +- To get entities in a collection: + +```swift +Usergrid.GET("collection") { response in + var entities: [UsergridEntity]? = response.entities +} +``` + +- To get a specific entity in a collection by uuid or name: + +```swift +Usergrid.GET("collection", uuidOrName:"<uuid-or-name>") { response in + var entity: UsergridEntity? = response.entity? +} +``` + +- To get specific entities in a collection by passing a `UsergridQuery` object: + +```swift +var query = UsergridQuery("cats").gt("weight", value: 2.4) + .contains("color", value:"bl*") + .not() + .eq("color", value:"blue") + .or() + .eq("color", value:"orange") + +// this will build out the following query: +// select * where weight > 2.4 and color contains 'bl*' and not color = 'blue' or color = 'orange' + +Usergrid.GET(query) { response in + var entities: [UsergridEntity]? = response.entities +} +``` + +### POST and PUT + +POST and PUT requests both require a JSON body payload. You can pass either a Swift object or a `UsergridEntity` instance. While the former works in principle, best practise is to use a `UsergridEntity` wherever practical. When an entity has a uuid or name property and already exists on the server, use a PUT request to update it. If it does not, use POST to create it. + +- To create a new entity in a collection (**POST**): + +```swift +var entity = UsergridEntity(type: "restaurant", propertyDict: ["restaurant": "Dino's Deep Dish","cuisine": "pizza"]) + +Usergrid.POST(entity) { response in + // entity should now have a uuid property and be created +} + +// you can also POST an array of entities: + +var entities = [UsergridEntity(type: "restaurant", propertyDict:["restaurant": "Dino's Deep Dish","cuisine": "pizza"]), + UsergridEntity(type: "restaurant", propertyDict:["restaurant": "Pizza da Napoli","cuisine": "pizza"])] + +Usergrid.POST(entities) { response in + // response.entities should now contain now valid posted entities. +} +``` + +- To update an entity in a collection (**PUT**): + +```swift +var entity = UsergridEntity(type: "restaurant", propertyDict:["restaurant": "Dino's Deep Dish", "cuisine": "pizza"]) + +Usergrid.POST(entity) { response in + if let responseEntity = response.entity { + responseEntity["owner"] = "Mia Carrara" + Usergrid.PUT(responseEntity) { (response) -> Void in + // entity now has the property 'owner' + } + } +} + +// or update a set of entities by passing a UsergridQuery object + +var query = UsergridQuery("restaurants").eq("cuisine", value:"italian") + +Usergrid.PUT(query, jsonBody: ["keywords":["pasta"]]) { response in + + /* the first 10 entities matching this query criteria will be updated: + e.g.: + [ + { + "type": "restaurant", + "restaurant": "Il Tarazzo", + "cuisine": "italian", + "keywords": ["pasta"] + }, + { + "type": "restaurant", + "restaurant": "Cono Sur Pizza & Pasta", + "cuisine": "italian", + "keywords": ["pasta"] + } + ] + */ +} +``` + +### DELETE + +DELETE requests require either a specific entity or a `UsergridQuery` object to be passed as an argument. + +- To delete a specific entity in a collection by uuid or name: + +```swift +Usergrid.DELETE("collection", uuidOrName: "<uuid-or-name>") { response in + // if successful, entity will now be deleted +}) +``` + +- To specific entities in a collection to delete by passing a `UsergridQuery` object: + +```swift +let query = UsergridQuery("cats").eq("color", value:"black") + .or() + .eq("color", value:"white") + +// this will build out the following query: +// select * where color = 'black' or color = 'white' + +Usergrid.DELETE(query) { response in + // the first 10 entities matching this query criteria will be deleted +} +``` + +## Entity operations and convenience methods + +`UsergridEntity` has a number of helper/convenience methods to make working with entities more convenient. + +### reload() + +Reloads the entity from the server: + +```swift +entity.reload() { response in + // entity is now reloaded from the server +} +``` + +### save() + +Saves (or creates) the entity on the server: + + +```swift +entity["aNewProperty"] = "A new value" +entity.save() { response in + // entity is now updated on the server +} +``` + +### remove() + +Deletes the entity from the server: + +```swift +entity.remove() { response in + // entity is now deleted on the server and the local instance should be destroyed +} +``` + +## Authentication, current user, and auth-fallback + +### appAuth and authenticateApp() + +`Usergrid` can use the app client ID and secret that were passed upon initialization and automatically retrieve an app-level token for these credentials. + +```swift +Usergrid.setAppAuth("<client-id>", "<client-secret>") +Usergrid.authenticateApp() { response in + // Usergrid.appAuth is authenticated automatically when this call is successful +} +``` + +### currentUser, userAuth, and authenticateUser() + +`Usergrid` has a special `currentUser` property. + +> The current user is stored within the keychain so app relaunches will persist the user's login and token information. To adjust this feature edit the `Usergrid.persistCurrentUserInKeychain` property upon initialization. + +By default, when calling `authenticateUser()`, `.currentUser` will be set to this user if the authentication flow is successful. + +```swift +let userAuth = UsergridUserAuth(username: "<username>", password: "<password>") +Usergrid.authenticateUser(userAuth) { auth, user, error in + // Usergrid.currentUser is set to the authenticated user and the token is stored within that context +} +``` + +If you want to utilize authenticateUser without setting as the current user, simply pass a `false` boolean value as the second parameter: + +```swift +let userAuth = UsergridUserAuth(username: "<username>", password: "<password>") +Usergrid.authenticateUser(userAuth,setAsCurrentUser: false) { auth, user, error in + // user is authenticated but Usergrid.currentUser is not set. +} +``` + +### authFallback + +Auth-fallback defines what the client should do when a user token is not present. + +By default, `Usergrid.authFallback` is set to `.None`, whereby when a token is *not* present, an API call will be performed unauthenticated. + +If instead `Usergrid.authFallback` is set to `.App`, the API call will instead be performed using client credentials, _if_ they're available (i.e. `authenticateApp()` was performed at some point). + +### usingAuth() + +At times it is desireable to have complete, granular control over the authentication context of an API call. + +To facilitate this, the passthrough function `.usingAuth()` allows you to pre-define the auth context of the next API call. + +```swift +// assume Usergrid.authFallback = .None + +Usergrid.usingAuth(Usergrid.appAuth!).POST("roles/guest/permissions", jsonBody: ["permission" : "get,post,put,delete:/**"] ) { response in + // here we've temporarily used the client credentials to modify permissions + // subsequent calls will not use this auth context +} +``` + +## User operations and convenience methods + +`UsergridUser` has a number of helper/convenience methods to make working with user entities more convenient. If you are _not_ utilizing the `Usergrid` shared instance, you must pass an instance of `UsergridClient` as the first argument to any of these helper methods. + +### create() + +Creating a new user: + +```swift +let user = UsergridUser(username: "username", password: "password") +user.create() { response in + // user has now been created and should have a valid uuid +} +``` + +### login() + +A simpler means of retrieving a user-level token: + +```swift +user.login("username", password: "password") { auth, user, error in + // user is now logged in +} +``` + +### logout() + +Logs out the selected user. You can also use this convenience method on `Usergrid.currentUser`. + +```swift +user.logout() { response in + // user is now logged out +} +``` + +### resetPassword() + +Resets the password for the selected user. + +```swift +user.resetPassword("oldPassword", new: "newPassword") { error, didSucceed in + // if it was done correctly, the new password will be changed + // 'didSucceed' is a boolean value that indicates whether it was changed successfully +} +``` + +### UsergridUser.CheckAvailable() + +This is a class (static) method that allows you to check whether a username or email address is available or not. + +```swift +UsergridUser.checkAvailable("email", username: nil) { error, available in + // 'available' == whether an email already exists for a user +} + +UsergridUser.checkAvailable(nil, username: "username") { error, available in + // 'available' == whether an username already exists for a user +} + +UsergridUser.checkAvailable("email", username: "username") { error, available in + // 'available' == whether an email or username already exist for a user +} +``` + +## Querying and filtering data + +### UsergridQuery initialization + +The `UsergridQuery` class allows you to build out complex query filters using the Usergrid [query syntax](http://docs.apigee.com/app-services/content/querying-your-data). + +The first parameter of the `UsergridQuery` builder pattern should be the collection (or type) you intend to query. You can either pass this as an argument, or as the first builder object: + +```swift +var query = UsergridQuery("cats") +// or +var query = UsergridQuery().collection("cats") +``` + +You then can layer on additional queries: + +```swift +var query = UsergridQuery("cats").gt("weight", value: 2.4) + .contains("color", value: "bl*") + .not() + .eq("color", value:"white") + .or() + .eq("color", value:"orange") +``` + +You can also adjust the number of results returned: + +```swift +var query = UsergridQuery("cats").eq("color", value: "black") + .limit(100) + +// returns a maximum of 100 entiteis +``` + +And sort the results: + +```swift +var query = UsergridQuery("cats").eq("color", value: "black") + .limit(100) + .asc("name") + +// sorts by 'name', ascending +``` + +And you can do geo-location queries: + +```swift +var query = UsergridQuery("devices").locationWithin(<distance>, latitude: <lat>, longitude: <long>) +``` + +### Using a query in a request + +Queries can be passed as parameters to GET, PUT, and DELETE requests: + +```swift +Usergrid.GET("type", query: query) { response in + // Gets entities of a given type matching the query. +} + +Usergrid.PUT(query, jsonBody: ["aNewProperty":"A new value"]) { response in + // Updates the entities matching the query with the new property. +} + +Usergrid.DELETE(query) { response in + // Deletes entities of a given type matching the query. +} +``` +### List of query builder objects + +`type("string")` + +> The collection name to query + +`collection("string")` + +> An alias for `type` + +`eq("key", value: "value")` or +`equals("key", value: "value")` or +`filter("key", value: "value")` + +> Equal to (e.g. `where color = 'black'`) + +`contains("key", value: "value")` or +`containsString("key", value: "value")` or +`containsWord("key", value: "value")` + +> Contains a string (e.g.` where color contains 'bl*'`) + +`gt("key", value: "value")` or +`greaterThan("key", value: "value")` + +> Greater than (e.g. `where weight > 2.4`) + +`gte("key", value: "value")` or +`greaterThanOrEqual("key", value: "value")` + +> Greater than or equal to (e.g. `where weight >= 2.4`) + +`lt("key", value: "value")` or `lessThan("key", value: "value")` + +> Less than (e.g. `where weight < 2.4`) + +`lte("key", value: "value")` or `lessThanOrEqual("key", value: "value")` + +> Less than or equal to (e.g. `where weight <= 2.4`) + +`not()` + +> Negates the next block in the builder pattern, e.g.: + +```swift +var query = UsergridQuery("cats").not().eq("color", value: "black") +// select * from cats where not color = 'black' +``` + +`and()` + +> Joins two queries by requiring both of them. `and` is also implied when joining two queries _without_ an operator. E.g.: + +```swift +var query = UsergridQuery("cats").eq("color", value:"black").eq("fur", value:"longHair") +// is identical to: +var query = UsergridQuery("cats").eq("color", value:"black").and().eq("fur", value:"longHair") +``` + +`or()` + +> Joins two queries by requiring only one of them. `or` is never implied. e.g.: + +```swift +var query = UsergridQuery("cats").eq("color",value: "black").or().eq("color", value: "white") +``` + +> When using `or()` and `and()` operators, `and()` joins will take precedence over `or()` joins. You can read more about query operators and precedence [here](http://docs.apigee.com/api-baas/content/supported-query-operators-data-types). + +`locationWithin(distanceInMeters, latitude: latitude, longitude: longitude)` + +> Returns entities which have a location within the specified radius. Arguments can be `float` or `int`. + +`asc("key")` or `ascending("key")` + +> Sorts the results by the specified property, ascending + +`desc("key")` or `descending("key")` + +> Sorts the results by the specified property, descending + +`sort("key", value: .Asc)` + +> Sorts the results by the specified property, in the specified `UsergridQuerySortOrder` (`.Asc` or `.Desc`). + +`limit(int)` + +> The maximum number of entities to return + +`cursor("string")` + +> A pagination cursor string + +`fromString("query string")` + +> A special builder property that allows you to input a pre-defined query string. All builder properties will be ignored when this property is defined. For example: + +```swift +var query = UsergridQuery().fromString("select * where color = 'black' order by name asc") +``` + +## UsergridResponse object + +`UsergridResponse` is the core class that handles both successful and unsuccessful HTTP responses from Usergrid. + +If a request is successful, any entities returned in the response will be automatically parsed into `UsergridEntity` objects and pushed to the `entities` property. + +If a request fails, the `error` property will contain information about the problem encountered. + +### ok + +You can check `UsergridResponse.ok`, a `Bool` value, to see if the response was successful. Any status code `< 400` returns true. + +```swift +Usergrid.GET("collection") { response in + if response.ok { + // woo! + } +} +``` + +### entity, entities, user, users, first, last + +Depending on the call you make, any entities returned in the response will be automatically parsed into `UsergridEntity` objects and pushed to the `entities` property. If you're querying the `users` collection, these will also be `UsergridUser` objects, a subclass of `UsergridEntity`. + +- `.first` returns the first entity in an array of entities; `.entity` is an alias to `.first`. If there are no entities, both of these will be undefined. + +- `.last` returns the last entity in an array of entities; if there is only one entity in the array, this will be the same as `.first` _and_ `.entity`, and will be undefined if there are no entities in the response. + +- `.entities` will either be an array of entities in the response, or an empty array. + +- `.user` is a special alias for `.entity` for when querying the `users` collection. Instead of being a `UsergridEntity`, it will be its subclass, `UsergridUser`. + +- `.users` is the same as `.user`, though behaves as `.entities` does by returning either an array of UsergridUser objects or an empty array. + +Examples: + +```swift +Usergrid.GET("collection") { response in + // you can access: + // response.entities (the returned entities) + // response.first (the first entity) + // response.entity (same as response.first) + // response.last (the last entity returned) +} + +Usergrid.GET("collection", uuidOrName:"<uuid-or-name>") { response in + // you can access: + // response.entity (the returned entity) + // response.entities (containing only the returned entity) + // response.first (same as response.entity) + // response.last (same as response.entity) +} + +Usergrid.GET("users") { response in + // you can access: + // response.users (the returned users) + // response.entities (same as response.users) + // response.user (the first user) + // response.entity (same as response.user) + // response.first (same as response.user) + // response.last (the last user) +} + +Usergrid.GET("users", uuidOrName:"<uuid-or-name>") { response in + // you can access; + // response.users (containing only the one user) + // response.entities (same as response.users) + // response.user (the returned user) + // response.entity (same as response.user) + // response.first (same as response.user) + // response.last (same as response.user) +} +``` + +## Connections + +Connections can be managed using `Usergrid.connect()`, `Usergrid.disconnect()`, and `Usergrid.getConnections()`, or entity convenience methods of the same name. + +When retrieving connections via `Usergrid.getConnections()`, you can pass in a optional `UsergridQuery` object in order to filter the connectioned entities returned. + +### Connect + +Create a connection between two entities: + +```swift +Usergrid.connect(entity1, relationship: "relationship", to: entity2) { response in + // entity1 now has an outbound connection to entity2 +} +``` + +### Retrieve Connections + +Retrieve outbound connections: + +```swift +Usergrid.getConnections(.Out, entity: entity1, relationship: "relationship", query: nil) { response in + // entities is an array of entities that entity1 is connected to via 'relationship' + // in this case, we'll see entity2 in the array +} +``` + +Retrieve inbound connections: + +```swift +Usergrid.getConnections(.In, entity: entity2, relationship: "relationship", query: nil) { response in + // entities is an array of entities that connect to entity2 via 'relationship' + // in this case, we'll see entity1 in the array +} +``` + +### Disconnect + +Delete a connection between two entities: + +```swift +Usergrid.disconnect(entity1, relationship: "relationship", from: entity2) { response in + // entity1's outbound connection to entity2 has been destroyed +} +``` + +## Assets + +Assets can be uploaded and downloaded either directly using `Usergrid.uploadAsset()` or `Usergrid.downloadAsset()`, or via `UsergridEntity` convenience methods with the same names. Before uploading an asset, you will need to initialize a `UsergridAsset` instance. + +### Initialization + +_Note: When initializing a `UsergridAsset` object specifying a file name is optional._ + +- Using NSData: + +```swift +let image = UIImage(contentsOfFile: "path/to/image") +let data = UIImagePNGRepresentation(image) +let asset = UsergridAsset(fileName:"<file-name-or-nil>", data: data!, contentType:"image/png") +``` + +- Using an UIImage object: + +```swift +let image = UIImage(contentsOfFile: "path/to/image") +let asset = UsergridAsset(fileName:"<file-name-or-nil>", image: image!, imageContentType: .Png) +``` + +- Using a file URL: + +```swift +let fileUrl = NSURL(string: "local/path/to/file") +if fileUrl.isFileReferenceURL() { // This must be a file reference url. + let asset = UsergridAsset(fileName:"<file-name-or-nil>", fileUrl: fileUrl!, contentType:"<content-type>") +} +``` + +### Uploading + +Upload an image and connect it to an entity: + +```swift +let image = UIImage(contentsOfFile: "path/to/image") +let asset = UsergridAsset(fileName:"<file-name-or-nil>", image: image!, imageContentType: .Png)! +Usergrid.uploadAsset(entity, + asset: asset, + progress: { bytesFinished, bytesExpected in + // Monitor the upload progress + }, + completion: { asset, response in + // The asset is now uploaded to Usergrid and entity.asset == asset +}) +``` + +### Downloading + +Download an image which is connected to an entity: + +```swift +Usergrid.downloadAsset(entity, + contentType: "<expected-content-type>", + progress: { bytesFinished, bytesExpected in + // Monitor the download progress + }, + completion:{ asset, error in + // The asset is now downloaded from Usergrid and entity.asset == asset +}) +``` + +## Custom UsergridEntity Subclasses + +Creating custom subclasses of the base `UsergridEntity` class (just like `UsergridUser` and `UsergridDevice`) is possible. + +> For a working example of creating a custom subclass refer to the ActivityFeed sample app located in the `/Samples` folder. The custom subclass there is named `ActivityEntity`. + +- To do so, subclass `UsergridEntity` and implement the required methods: + +```swift +import UsergridSDK + +public class ActivityEntity: UsergridEntity { + + required public init(type: String, name: String?, propertyDict: [String : AnyObject]?) { + super.init(type: type, name: name, propertyDict: propertyDict) + } + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + } +} +``` +- You will also need to register the custom subclass: + +```swift +Usergrid.initSharedInstance(orgId: "orgId", appId: "appId") +UsergridEntity.mapCustomType("activity", toSubclass: ActivityEntity.self) +``` + +By registering your custom subclass, the `UsergridEntity` and `UsergridResponse` classes are able to generate instances of these classes based on the an entities `type`. + +In the above example, entities which have a `type` value of `activity` can now be cast as `ActivityEntity` objects. e.g.: + +```swift +Usergrid.GET("activity") { response in + var activityEntities: [ActivityEntity]? = response.entities as? [ActivityEntity] +} +``` http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj ---------------------------------------------------------------------- diff --git a/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj new file mode 100644 index 0000000..215ca87 --- /dev/null +++ b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.pbxproj @@ -0,0 +1,827 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 634855401C726AE9005FE016 /* UsergridSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 634855331C726AD3005FE016 /* UsergridSDK.framework */; }; + 634855411C726AE9005FE016 /* UsergridSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 634855331C726AD3005FE016 /* UsergridSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 634855451C726AF7005FE016 /* UsergridSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 634855351C726AD3005FE016 /* UsergridSDK.framework */; }; + 634855461C726AF7005FE016 /* UsergridSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 634855351C726AD3005FE016 /* UsergridSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 6348D95F1C4EAC0B005C978C /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6348D95D1C4EAC0B005C978C /* Interface.storyboard */; }; + 6348D9611C4EAC0B005C978C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6348D9601C4EAC0B005C978C /* Assets.xcassets */; }; + 6348D9681C4EAC0B005C978C /* WatchSample Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6348D9671C4EAC0B005C978C /* WatchSample Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 6348D96D1C4EAC0B005C978C /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6348D96C1C4EAC0B005C978C /* InterfaceController.swift */; }; + 6348D96F1C4EAC0B005C978C /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6348D96E1C4EAC0B005C978C /* ExtensionDelegate.swift */; }; + 6348D9711C4EAC0C005C978C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6348D9701C4EAC0C005C978C /* Assets.xcassets */; }; + 6348D9751C4EAC0C005C978C /* WatchSample.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 6348D95B1C4EAC0B005C978C /* WatchSample.app */; }; + 6348D9861C4EC1FD005C978C /* UsergridManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6348D9851C4EC1FD005C978C /* UsergridManager.swift */; }; + 6348D9871C4EC1FD005C978C /* UsergridManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6348D9851C4EC1FD005C978C /* UsergridManager.swift */; }; + 6355FEC51BFE4FC600E07170 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6355FEC41BFE4FC600E07170 /* AppDelegate.swift */; }; + 6355FEC71BFE4FC600E07170 /* ViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6355FEC61BFE4FC600E07170 /* ViewControllerExtensions.swift */; }; + 6355FECA1BFE4FC600E07170 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6355FEC81BFE4FC600E07170 /* Main.storyboard */; }; + 6355FECC1BFE4FC600E07170 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6355FECB1BFE4FC600E07170 /* Assets.xcassets */; }; + 6355FECF1BFE4FC600E07170 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6355FECD1BFE4FC600E07170 /* LaunchScreen.storyboard */; }; + 63C9E52A1C04F3B900C65F81 /* MessageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C9E5291C04F3B900C65F81 /* MessageTableViewCell.swift */; }; + 63C9E5311C05184900C65F81 /* MessageTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C9E5301C05184900C65F81 /* MessageTextView.swift */; }; + 63CD143D1C505EC500C00076 /* ActivityEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD143C1C505EC500C00076 /* ActivityEntity.swift */; }; + 63CD143E1C505EC500C00076 /* ActivityEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD143C1C505EC500C00076 /* ActivityEntity.swift */; }; + 63E7DD741C518BAD00D84B12 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E7DD731C518BAD00D84B12 /* LoginViewController.swift */; }; + 63E7DD761C518C9000D84B12 /* RegisterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E7DD751C518C9000D84B12 /* RegisterViewController.swift */; }; + 63E7DD781C518E0400D84B12 /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E7DD771C518E0400D84B12 /* MessageViewController.swift */; }; + 63E7DD7A1C518F1700D84B12 /* FollowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E7DD791C518F1700D84B12 /* FollowViewController.swift */; }; + 63E7DD7E1C518FDD00D84B12 /* FormTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E7DD7D1C518FDD00D84B12 /* FormTextField.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 634855321C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 63AF0E881BBC38FB009D4196; + remoteInfo = "UsergridSDK iOS"; + }; + 634855341C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 639B4BEB1C3DD6CF005E26E7; + remoteInfo = "UsergridSDK watchOS"; + }; + 634855361C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 63EE610B1C406E1600AFC2CF; + remoteInfo = "UsergridSDK tvOS"; + }; + 634855381C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 631920451C48436500F99E86; + remoteInfo = "UsergridSDK OSX"; + }; + 6348553A1C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 6319204B1C49BC0700F99E86; + remoteInfo = UsergridSDK_TVOS_Tests; + }; + 6348553C1C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 630A219F1C49BFFC008BE87F; + remoteInfo = UsergridSDK_OSX_Tests; + }; + 6348553E1C726AD3005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 630A21B81C49C473008BE87F; + remoteInfo = UsergridSDK_iOS_Tests; + }; + 634855421C726AE9005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 63AF0E871BBC38FB009D4196; + remoteInfo = "UsergridSDK iOS"; + }; + 634855471C726AF7005FE016 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 639B4BEA1C3DD6CF005E26E7; + remoteInfo = "UsergridSDK watchOS"; + }; + 6348D9691C4EAC0B005C978C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6355FEB91BFE4FC600E07170 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6348D9661C4EAC0B005C978C; + remoteInfo = "WatchSample Extension"; + }; + 6348D9731C4EAC0C005C978C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6355FEB91BFE4FC600E07170 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6348D95A1C4EAC0B005C978C; + remoteInfo = WatchSample; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 634855441C726AE9005FE016 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 634855411C726AE9005FE016 /* UsergridSDK.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 634855491C726AF8005FE016 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 634855461C726AF7005FE016 /* UsergridSDK.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 6348D97B1C4EAC0C005C978C /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 6348D9681C4EAC0B005C978C /* WatchSample Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 6348D97D1C4EAC0C005C978C /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 6348D9751C4EAC0C005C978C /* WatchSample.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = UsergridSDK.xcodeproj; path = ../../UsergridSDK.xcodeproj; sourceTree = "<group>"; }; + 6348D95B1C4EAC0B005C978C /* WatchSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6348D95E1C4EAC0B005C978C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; }; + 6348D9601C4EAC0B005C978C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 6348D9621C4EAC0B005C978C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 6348D9671C4EAC0B005C978C /* WatchSample Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "WatchSample Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6348D96C1C4EAC0B005C978C /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; }; + 6348D96E1C4EAC0B005C978C /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; }; + 6348D9701C4EAC0C005C978C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 6348D9721C4EAC0C005C978C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 6348D9851C4EC1FD005C978C /* UsergridManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UsergridManager.swift; sourceTree = "<group>"; }; + 6355FEC11BFE4FC600E07170 /* ActivityFeed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ActivityFeed.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6355FEC41BFE4FC600E07170 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; + 6355FEC61BFE4FC600E07170 /* ViewControllerExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewControllerExtensions.swift; sourceTree = "<group>"; }; + 6355FEC91BFE4FC600E07170 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; + 6355FECB1BFE4FC600E07170 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 6355FECE1BFE4FC600E07170 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + 6355FED01BFE4FC600E07170 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 63C9E5291C04F3B900C65F81 /* MessageTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageTableViewCell.swift; sourceTree = "<group>"; }; + 63C9E5301C05184900C65F81 /* MessageTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageTextView.swift; sourceTree = "<group>"; }; + 63CD143C1C505EC500C00076 /* ActivityEntity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityEntity.swift; sourceTree = "<group>"; }; + 63E7DD731C518BAD00D84B12 /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; }; + 63E7DD751C518C9000D84B12 /* RegisterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegisterViewController.swift; sourceTree = "<group>"; }; + 63E7DD771C518E0400D84B12 /* MessageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = "<group>"; }; + 63E7DD791C518F1700D84B12 /* FollowViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FollowViewController.swift; sourceTree = "<group>"; }; + 63E7DD7D1C518FDD00D84B12 /* FormTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTextField.swift; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6348D9641C4EAC0B005C978C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 634855451C726AF7005FE016 /* UsergridSDK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6355FEBE1BFE4FC600E07170 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 634855401C726AE9005FE016 /* UsergridSDK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 634855291C726AD3005FE016 /* Products */ = { + isa = PBXGroup; + children = ( + 634855331C726AD3005FE016 /* UsergridSDK.framework */, + 634855351C726AD3005FE016 /* UsergridSDK.framework */, + 634855371C726AD3005FE016 /* UsergridSDK.framework */, + 634855391C726AD3005FE016 /* UsergridSDK.framework */, + 6348553B1C726AD3005FE016 /* UsergridSDK_TVOS_Tests.xctest */, + 6348553D1C726AD3005FE016 /* UsergridSDK_OSX_Tests.xctest */, + 6348553F1C726AD3005FE016 /* UsergridSDK_iOS_Tests.xctest */, + ); + name = Products; + sourceTree = "<group>"; + }; + 6348D95C1C4EAC0B005C978C /* WatchSample */ = { + isa = PBXGroup; + children = ( + 6348D95D1C4EAC0B005C978C /* Interface.storyboard */, + 6348D9601C4EAC0B005C978C /* Assets.xcassets */, + 6348D9621C4EAC0B005C978C /* Info.plist */, + ); + path = WatchSample; + sourceTree = "<group>"; + }; + 6348D96B1C4EAC0B005C978C /* WatchSample Extension */ = { + isa = PBXGroup; + children = ( + 6348D96C1C4EAC0B005C978C /* InterfaceController.swift */, + 6348D96E1C4EAC0B005C978C /* ExtensionDelegate.swift */, + 6348D9701C4EAC0C005C978C /* Assets.xcassets */, + 6348D9721C4EAC0C005C978C /* Info.plist */, + ); + path = "WatchSample Extension"; + sourceTree = "<group>"; + }; + 6355FEB81BFE4FC600E07170 = { + isa = PBXGroup; + children = ( + 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */, + 6355FEC31BFE4FC600E07170 /* Source */, + 6348D95C1C4EAC0B005C978C /* WatchSample */, + 6348D96B1C4EAC0B005C978C /* WatchSample Extension */, + 6355FEC21BFE4FC600E07170 /* Products */, + ); + sourceTree = "<group>"; + }; + 6355FEC21BFE4FC600E07170 /* Products */ = { + isa = PBXGroup; + children = ( + 6355FEC11BFE4FC600E07170 /* ActivityFeed.app */, + 6348D95B1C4EAC0B005C978C /* WatchSample.app */, + 6348D9671C4EAC0B005C978C /* WatchSample Extension.appex */, + ); + name = Products; + sourceTree = "<group>"; + }; + 6355FEC31BFE4FC600E07170 /* Source */ = { + isa = PBXGroup; + children = ( + 6355FEC41BFE4FC600E07170 /* AppDelegate.swift */, + 6348D9851C4EC1FD005C978C /* UsergridManager.swift */, + 63CD143C1C505EC500C00076 /* ActivityEntity.swift */, + 63E7DD7B1C518F9600D84B12 /* View Controllers */, + 63E7DD7C1C518FC300D84B12 /* Custom Views */, + 63E7DD801C51903A00D84B12 /* Storyboards */, + 63E7DD7F1C51902F00D84B12 /* Supporting Files */, + ); + path = Source; + sourceTree = "<group>"; + }; + 63E7DD7B1C518F9600D84B12 /* View Controllers */ = { + isa = PBXGroup; + children = ( + 63E7DD791C518F1700D84B12 /* FollowViewController.swift */, + 63E7DD731C518BAD00D84B12 /* LoginViewController.swift */, + 63E7DD771C518E0400D84B12 /* MessageViewController.swift */, + 63E7DD751C518C9000D84B12 /* RegisterViewController.swift */, + 6355FEC61BFE4FC600E07170 /* ViewControllerExtensions.swift */, + ); + name = "View Controllers"; + sourceTree = "<group>"; + }; + 63E7DD7C1C518FC300D84B12 /* Custom Views */ = { + isa = PBXGroup; + children = ( + 63E7DD7D1C518FDD00D84B12 /* FormTextField.swift */, + 63C9E5291C04F3B900C65F81 /* MessageTableViewCell.swift */, + 63C9E5301C05184900C65F81 /* MessageTextView.swift */, + ); + name = "Custom Views"; + sourceTree = "<group>"; + }; + 63E7DD7F1C51902F00D84B12 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6355FECB1BFE4FC600E07170 /* Assets.xcassets */, + 6355FED01BFE4FC600E07170 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = "<group>"; + }; + 63E7DD801C51903A00D84B12 /* Storyboards */ = { + isa = PBXGroup; + children = ( + 6355FEC81BFE4FC600E07170 /* Main.storyboard */, + 6355FECD1BFE4FC600E07170 /* LaunchScreen.storyboard */, + ); + name = Storyboards; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6348D95A1C4EAC0B005C978C /* WatchSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6348D97C1C4EAC0C005C978C /* Build configuration list for PBXNativeTarget "WatchSample" */; + buildPhases = ( + 6348D9591C4EAC0B005C978C /* Resources */, + 6348D97B1C4EAC0C005C978C /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 6348D96A1C4EAC0B005C978C /* PBXTargetDependency */, + ); + name = WatchSample; + productName = WatchSample; + productReference = 6348D95B1C4EAC0B005C978C /* WatchSample.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 6348D9661C4EAC0B005C978C /* WatchSample Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6348D97A1C4EAC0C005C978C /* Build configuration list for PBXNativeTarget "WatchSample Extension" */; + buildPhases = ( + 6348D9631C4EAC0B005C978C /* Sources */, + 6348D9641C4EAC0B005C978C /* Frameworks */, + 6348D9651C4EAC0B005C978C /* Resources */, + 634855491C726AF8005FE016 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 634855481C726AF7005FE016 /* PBXTargetDependency */, + ); + name = "WatchSample Extension"; + productName = "WatchSample Extension"; + productReference = 6348D9671C4EAC0B005C978C /* WatchSample Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; + 6355FEC01BFE4FC600E07170 /* ActivityFeed */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6355FED31BFE4FC600E07170 /* Build configuration list for PBXNativeTarget "ActivityFeed" */; + buildPhases = ( + 6355FEBD1BFE4FC600E07170 /* Sources */, + 6355FEBE1BFE4FC600E07170 /* Frameworks */, + 6355FEBF1BFE4FC600E07170 /* Resources */, + 6348D97D1C4EAC0C005C978C /* Embed Watch Content */, + 634855441C726AE9005FE016 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 6348D9741C4EAC0C005C978C /* PBXTargetDependency */, + 634855431C726AE9005FE016 /* PBXTargetDependency */, + ); + name = ActivityFeed; + productName = SDKSample; + productReference = 6355FEC11BFE4FC600E07170 /* ActivityFeed.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6355FEB91BFE4FC600E07170 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = "Apigee Inc."; + TargetAttributes = { + 6348D95A1C4EAC0B005C978C = { + CreatedOnToolsVersion = 7.2; + }; + 6348D9661C4EAC0B005C978C = { + CreatedOnToolsVersion = 7.2; + }; + 6355FEC01BFE4FC600E07170 = { + CreatedOnToolsVersion = 7.1.1; + }; + }; + }; + buildConfigurationList = 6355FEBC1BFE4FC600E07170 /* Build configuration list for PBXProject "ActivityFeed" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6355FEB81BFE4FC600E07170; + productRefGroup = 6355FEC21BFE4FC600E07170 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 634855291C726AD3005FE016 /* Products */; + ProjectRef = 634855281C726AD3005FE016 /* UsergridSDK.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 6355FEC01BFE4FC600E07170 /* ActivityFeed */, + 6348D95A1C4EAC0B005C978C /* WatchSample */, + 6348D9661C4EAC0B005C978C /* WatchSample Extension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 634855331C726AD3005FE016 /* UsergridSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = UsergridSDK.framework; + remoteRef = 634855321C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 634855351C726AD3005FE016 /* UsergridSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = UsergridSDK.framework; + remoteRef = 634855341C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 634855371C726AD3005FE016 /* UsergridSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = UsergridSDK.framework; + remoteRef = 634855361C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 634855391C726AD3005FE016 /* UsergridSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = UsergridSDK.framework; + remoteRef = 634855381C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6348553B1C726AD3005FE016 /* UsergridSDK_TVOS_Tests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = UsergridSDK_TVOS_Tests.xctest; + remoteRef = 6348553A1C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6348553D1C726AD3005FE016 /* UsergridSDK_OSX_Tests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = UsergridSDK_OSX_Tests.xctest; + remoteRef = 6348553C1C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 6348553F1C726AD3005FE016 /* UsergridSDK_iOS_Tests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = UsergridSDK_iOS_Tests.xctest; + remoteRef = 6348553E1C726AD3005FE016 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 6348D9591C4EAC0B005C978C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6348D9611C4EAC0B005C978C /* Assets.xcassets in Resources */, + 6348D95F1C4EAC0B005C978C /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6348D9651C4EAC0B005C978C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6348D9711C4EAC0C005C978C /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6355FEBF1BFE4FC600E07170 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6355FECF1BFE4FC600E07170 /* LaunchScreen.storyboard in Resources */, + 6355FECC1BFE4FC600E07170 /* Assets.xcassets in Resources */, + 6355FECA1BFE4FC600E07170 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6348D9631C4EAC0B005C978C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6348D9871C4EC1FD005C978C /* UsergridManager.swift in Sources */, + 63CD143E1C505EC500C00076 /* ActivityEntity.swift in Sources */, + 6348D96F1C4EAC0B005C978C /* ExtensionDelegate.swift in Sources */, + 6348D96D1C4EAC0B005C978C /* InterfaceController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6355FEBD1BFE4FC600E07170 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 63E7DD741C518BAD00D84B12 /* LoginViewController.swift in Sources */, + 63E7DD781C518E0400D84B12 /* MessageViewController.swift in Sources */, + 6348D9861C4EC1FD005C978C /* UsergridManager.swift in Sources */, + 6355FEC71BFE4FC600E07170 /* ViewControllerExtensions.swift in Sources */, + 63E7DD761C518C9000D84B12 /* RegisterViewController.swift in Sources */, + 6355FEC51BFE4FC600E07170 /* AppDelegate.swift in Sources */, + 63E7DD7A1C518F1700D84B12 /* FollowViewController.swift in Sources */, + 63CD143D1C505EC500C00076 /* ActivityEntity.swift in Sources */, + 63C9E5311C05184900C65F81 /* MessageTextView.swift in Sources */, + 63C9E52A1C04F3B900C65F81 /* MessageTableViewCell.swift in Sources */, + 63E7DD7E1C518FDD00D84B12 /* FormTextField.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 634855431C726AE9005FE016 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "UsergridSDK iOS"; + targetProxy = 634855421C726AE9005FE016 /* PBXContainerItemProxy */; + }; + 634855481C726AF7005FE016 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "UsergridSDK watchOS"; + targetProxy = 634855471C726AF7005FE016 /* PBXContainerItemProxy */; + }; + 6348D96A1C4EAC0B005C978C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6348D9661C4EAC0B005C978C /* WatchSample Extension */; + targetProxy = 6348D9691C4EAC0B005C978C /* PBXContainerItemProxy */; + }; + 6348D9741C4EAC0C005C978C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6348D95A1C4EAC0B005C978C /* WatchSample */; + targetProxy = 6348D9731C4EAC0C005C978C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6348D95D1C4EAC0B005C978C /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6348D95E1C4EAC0B005C978C /* Base */, + ); + name = Interface.storyboard; + sourceTree = "<group>"; + }; + 6355FEC81BFE4FC600E07170 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6355FEC91BFE4FC600E07170 /* Base */, + ); + name = Main.storyboard; + sourceTree = "<group>"; + }; + 6355FECD1BFE4FC600E07170 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6355FECE1BFE4FC600E07170 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6348D9761C4EAC0C005C978C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + IBSC_MODULE = WatchSample_Extension; + INFOPLIST_FILE = WatchSample/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.1; + }; + name = Debug; + }; + 6348D9771C4EAC0C005C978C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + IBSC_MODULE = WatchSample_Extension; + INFOPLIST_FILE = WatchSample/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.1; + }; + name = Release; + }; + 6348D9781C4EAC0C005C978C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "WatchSample Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.1; + }; + name = Debug; + }; + 6348D9791C4EAC0C005C978C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "WatchSample Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.1; + }; + name = Release; + }; + 6355FED11BFE4FC600E07170 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 6355FED21BFE4FC600E07170 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6355FED41BFE4FC600E07170 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed; + PRODUCT_NAME = ActivityFeed; + PROVISIONING_PROFILE = ""; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 6355FED51BFE4FC600E07170 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.usergrid.activityfeed; + PRODUCT_NAME = ActivityFeed; + PROVISIONING_PROFILE = ""; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OBJC_BRIDGING_HEADER = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6348D97A1C4EAC0C005C978C /* Build configuration list for PBXNativeTarget "WatchSample Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6348D9781C4EAC0C005C978C /* Debug */, + 6348D9791C4EAC0C005C978C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6348D97C1C4EAC0C005C978C /* Build configuration list for PBXNativeTarget "WatchSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6348D9761C4EAC0C005C978C /* Debug */, + 6348D9771C4EAC0C005C978C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6355FEBC1BFE4FC600E07170 /* Build configuration list for PBXProject "ActivityFeed" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6355FED11BFE4FC600E07170 /* Debug */, + 6355FED21BFE4FC600E07170 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6355FED31BFE4FC600E07170 /* Build configuration list for PBXNativeTarget "ActivityFeed" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6355FED41BFE4FC600E07170 /* Debug */, + 6355FED51BFE4FC600E07170 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6355FEB91BFE4FC600E07170 /* Project object */; +} http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.xcworkspace/contents.xcworkspacedata ---------------------------------------------------------------------- diff --git a/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3603482 --- /dev/null +++ b/Samples/ActivityFeed/ActivityFeed.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:SDKSample.xcodeproj"> + </FileRef> +</Workspace> http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Samples/ActivityFeed/ActivityFeed.xcworkspace/contents.xcworkspacedata ---------------------------------------------------------------------- diff --git a/Samples/ActivityFeed/ActivityFeed.xcworkspace/contents.xcworkspacedata b/Samples/ActivityFeed/ActivityFeed.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1344aa3 --- /dev/null +++ b/Samples/ActivityFeed/ActivityFeed.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:ActivityFeed.xcodeproj"> + </FileRef> +</Workspace> http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Samples/ActivityFeed/ActivityFeed.xcworkspace/xcshareddata/ActivityFeed.xcscmblueprint ---------------------------------------------------------------------- diff --git a/Samples/ActivityFeed/ActivityFeed.xcworkspace/xcshareddata/ActivityFeed.xcscmblueprint b/Samples/ActivityFeed/ActivityFeed.xcworkspace/xcshareddata/ActivityFeed.xcscmblueprint new file mode 100644 index 0000000..cd872fc --- /dev/null +++ b/Samples/ActivityFeed/ActivityFeed.xcworkspace/xcshareddata/ActivityFeed.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E28DB29D4B8B9FB468FB340D2257B16682332D89", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "E28DB29D4B8B9FB468FB340D2257B16682332D89" : 0, + "AD57BFF635DD66DF5DF78257082332592EB51D31" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F8EC72FE-9B21-4617-8470-0D30DC16A66E", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "E28DB29D4B8B9FB468FB340D2257B16682332D89" : "swift\/", + "AD57BFF635DD66DF5DF78257082332592EB51D31" : ".." + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "ActivityFeed", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Samples\/ActivityFeed\/ActivityFeed.xcworkspace", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:RobertWalsh\/usergrid.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "AD57BFF635DD66DF5DF78257082332592EB51D31" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:RobertWalsh\/UsergridSDK.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E28DB29D4B8B9FB468FB340D2257B16682332D89" + } + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/8283a6dd/Samples/ActivityFeed/Podfile ---------------------------------------------------------------------- diff --git a/Samples/ActivityFeed/Podfile b/Samples/ActivityFeed/Podfile new file mode 100644 index 0000000..23d5db6 --- /dev/null +++ b/Samples/ActivityFeed/Podfile @@ -0,0 +1,8 @@ +use_frameworks! +inhibit_all_warnings! + +target 'ActivityFeed' do + platform :ios, '9.0' + pod 'SlackTextViewController' +end +
