| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <title> Reference</title> |
| <link rel="stylesheet" type="text/css" href="css/jazzy.css" /> |
| <link rel="stylesheet" type="text/css" href="css/highlight.css" /> |
| <meta charset='utf-8'> |
| <script src="js/jquery.min.js" defer></script> |
| <script src="js/jazzy.js" defer></script> |
| </head> |
| <body> |
| <a title=" Reference"></a> |
| <header> |
| <div class="content-wrapper"> |
| <p><a href="index.html"> Docs</a> (97% documented)</p> |
| </div> |
| </header> |
| <div class="content-wrapper"> |
| <p id="breadcrumbs"> |
| <a href="index.html"> Reference</a> |
| <img id="carat" src="img/carat.png" /> |
| Reference |
| </p> |
| </div> |
| <div class="content-wrapper"> |
| <nav class="sidebar"> |
| <ul class="nav-groups"> |
| <li class="nav-group-name"> |
| <a href="Classes.html">Classes</a> |
| <ul class="nav-group-tasks"> |
| <li class="nav-group-task"> |
| <a href="Classes/Usergrid.html">Usergrid</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridAppAuth.html">UsergridAppAuth</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridAsset.html">UsergridAsset</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridAuth.html">UsergridAuth</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridClient.html">UsergridClient</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridClientConfig.html">UsergridClientConfig</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridDevice.html">UsergridDevice</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridEntity.html">UsergridEntity</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridFileMetaData.html">UsergridFileMetaData</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridQuery.html">UsergridQuery</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridResponse.html">UsergridResponse</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridUser.html">UsergridUser</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Classes/UsergridUserAuth.html">UsergridUserAuth</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-group-name"> |
| <a href="Enums.html">Enums</a> |
| <ul class="nav-group-tasks"> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridAuthFallback.html">UsergridAuthFallback</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridDeviceProperties.html">UsergridDeviceProperties</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridDirection.html">UsergridDirection</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridEntityProperties.html">UsergridEntityProperties</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridImageContentType.html">UsergridImageContentType</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridQueryOperator.html">UsergridQueryOperator</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridQuerySortOrder.html">UsergridQuerySortOrder</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Enums/UsergridUserProperties.html">UsergridUserProperties</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-group-name"> |
| <a href="Typealiases.html">Typealiases</a> |
| <ul class="nav-group-tasks"> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK30UsergridAppAuthCompletionBlock">UsergridAppAuthCompletionBlock</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK31UsergridAssetDownloadCompletion">UsergridAssetDownloadCompletion</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK28UsergridAssetRequestProgress">UsergridAssetRequestProgress</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK29UsergridAssetUploadCompletion">UsergridAssetUploadCompletion</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK26UsergridResponseCompletion">UsergridResponseCompletion</a> |
| </li> |
| <li class="nav-group-task"> |
| <a href="Typealiases.html#/s:11UsergridSDK31UsergridUserAuthCompletionBlock">UsergridUserAuthCompletionBlock</a> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </nav> |
| <article class="main-content"> |
| <section> |
| <section class="section"> |
| |
| <a href='#usergridsdk' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='usergridsdk'>UsergridSDK</h1> |
| |
| <p><a href="https://travis-ci.org/RobertWalsh/UsergridSDK"><img src="https://travis-ci.org/RobertWalsh/UsergridSDK.svg" alt="Build Status"></a> |
| <a href="http://cocoadocs.org/docsets/UsergridSDK"><img src="https://img.shields.io/cocoapods/p/UsergridSDK.svg?style=flat" alt="Platform"></a> |
| <a href="https://img.shields.io/cocoapods/v/UsergridSDK.svg"><img src="https://img.shields.io/cocoapods/v/UsergridSDK.svg" alt="Cocoapods Compatible"></a></p> |
| |
| <p>Usergrid SDK written in Swift </p> |
| <a href='#requirements' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='requirements'>Requirements</h2> |
| |
| <blockquote> |
| <p><strong>Embedded frameworks require a minimum deployment target of iOS 8.</strong></p> |
| </blockquote> |
| |
| <ul> |
| <li>iOS 8.0+</li> |
| <li>Xcode 7.1+</li> |
| </ul> |
| <a href='#installation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='installation'>Installation</h2> |
| <a href='#cocoapods' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='cocoapods'>CocoaPods</h3> |
| |
| <blockquote> |
| <p><strong>CocoaPods 0.39.0+ is required to build the UsergridSDK library.</strong></p> |
| </blockquote> |
| |
| <p>To integrate the UsergridSDK into your Xcode project using CocoaPods, specify it in your <code>Podfile</code>:</p> |
| <pre class="highlight ruby"><code><span class="n">platform</span> <span class="ss">:ios</span><span class="p">,</span> <span class="s1">'8.0'</span> |
| <span class="n">use_frameworks!</span> |
| |
| <span class="n">pod</span> <span class="s1">'UsergridSDK'</span> |
| </code></pre> |
| |
| <p>Then, run the following command:</p> |
| <pre class="highlight shell"><code><span class="gp">$ </span>pod install |
| </code></pre> |
| <a href='#embedded_framework' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='embedded_framework'>Embedded Framework</h3> |
| |
| <ul> |
| <li>Open up Terminal, <code>cd</code> into your top-level project directory, and run the following command <q>if</q> your project is not initialized as a git repository:</li> |
| </ul> |
| <pre class="highlight shell"><code><span class="gp">$ </span>git init |
| </code></pre> |
| |
| <ul> |
| <li>Add UsergridSDK as a git submodule by running the following command:</li> |
| </ul> |
| <pre class="highlight shell"><code><span class="gp">$ </span>git submodule add https://github.com/RobertWalsh/UsergridSDK.git |
| </code></pre> |
| |
| <ul> |
| <li>Open the new <code>UsergridSDK</code> folder, and drag the <code>UsergridSDK.xcodeproj</code> into the Project Navigator of your application’s Xcode project.</li> |
| </ul> |
| |
| <blockquote> |
| <p>It should appear nested underneath your application’s blue project icon.</p> |
| </blockquote> |
| |
| <ul> |
| <li>Select the <code>UsergridSDK.xcodeproj</code> in the Project Navigator and verify the deployment target matches that of your application target.</li> |
| <li>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 <q>Targets</q> heading in the sidebar.</li> |
| <li>In the tab bar at the top of that window, open the <q>General</q> panel.</li> |
| <li>Click on the <code>+</code> button under the <q>Embedded Binaries</q> section.</li> |
| <li>Select the <code>UsergridSDK.framework</code>.</li> |
| </ul> |
| |
| <blockquote> |
| <p>The <code>UsergridSDK.framework</code> 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.</p> |
| </blockquote> |
| <a href='#documentation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='documentation'>Documentation</h2> |
| |
| <p>The documentation for this library is available <a href="http://cocoadocs.org/docsets/UsergridSDK">here</a>.</p> |
| <a href='#initialization' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='initialization'>Initialization</h2> |
| |
| <p>The <code>Usergrid</code> class acts as a static shared instance manager for the <code>UsergridClient</code> class.</p> |
| |
| <blockquote> |
| <p>While it is possible to create mutliple instances of the <code>UsergridClient</code> class, we recomend using the shared instance where possible.</p> |
| </blockquote> |
| |
| <p>To initialize the shared instance of you will want to call the following code. This code usually goes best in the AppDelegate’s life cycle functions.</p> |
| <pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">UsergridSDK</span> |
| |
| <span class="kd">func</span> <span class="nf">application</span><span class="p">(</span><span class="nv">application</span><span class="p">:</span> <span class="kt">UIApplication</span><span class="p">,</span> <span class="n">didFinishLaunchingWithOptions</span> <span class="nv">launchOptions</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSObject</span><span class="p">:</span> <span class="kt">AnyObject</span><span class="p">]?)</span> <span class="o">-></span> <span class="kt">Bool</span> |
| <span class="kt">Usergrid</span><span class="o">.</span><span class="nf">initSharedInstance</span><span class="p">(</span><span class="nv">orgID</span><span class="p">:</span> <span class="s">"orgID"</span><span class="p">,</span> <span class="nv">appID</span><span class="p">:</span> <span class="s">"appID"</span><span class="p">)</span> |
| <span class="k">return</span> <span class="kc">true</span> |
| <span class="p">}</span> |
| </code></pre> |
| <a href='#communication' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='communication'>Communication</h2> |
| |
| <ul> |
| <li>If you <strong>found a bug</strong>, open an issue.</li> |
| <li>If you <strong>have a feature request</strong>, open an issue.</li> |
| <li>If you <strong>want to contribute</strong>, submit a pull request.</li> |
| </ul> |
| |
| </section> |
| </section> |
| <section id="footer"> |
| <p>© 2015 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2015-12-18)</p> |
| <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.3.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> |
| </section> |
| </article> |
| </div> |
| </body> |
| </div> |
| </html> |