8 Commits

Author SHA1 Message Date
rothacr 2e0121df45 Fix #17: Add logout method for verification in api explorer 2014-05-12 10:07:31 -07:00
rothacr 78c827a982 Fix #16: Properly release auth view controller when signed in 2014-05-12 10:06:57 -07:00
rothacr 02eaa1a616 Use PNG representation for images instead of TIFF 2014-05-05 17:41:06 -07:00
Andy Roth a2d0c3145e Fix broken support for OS X 2014-05-05 15:16:46 -07:00
Andy Roth d804bbdaaf Update framework and docs 2014-04-25 09:28:15 -07:00
Andy Roth 8b8c4fd95a Add meal subType property 2014-04-25 09:27:29 -07:00
Andy Roth 8c75a393ee Fix #14 : Prevent multiple hide calls to the auth view controller 2014-04-25 09:22:17 -07:00
Andy Roth 6ef5e1a0c2 Add refresh token method 2014-04-11 14:15:59 -07:00
103 changed files with 2656 additions and 106 deletions
@@ -344,7 +344,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -312,7 +312,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -227,7 +227,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -613,7 +613,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -491,7 +491,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+2 -2
View File
@@ -433,7 +433,7 @@
<div class="method-subsection method-declaration"><code>+ (UPBodyEvent *)eventWithTitle:(NSString *)<em>title</em> weight:(NSNumber *)<em>weight</em> bodyFat:(NSNumber *)<em>bodyFat</em> leanMass:(NSNumber *)<em>leanMass</em> bmi:(NSNumber *)<em>bmi</em> note:(NSString *)<em>note</em> image:(UIImage *)<em>image</em></code></div>
<div class="method-subsection method-declaration"><code>+ (UPBodyEvent *)eventWithTitle:(NSString *)<em>title</em> weight:(NSNumber *)<em>weight</em> bodyFat:(NSNumber *)<em>bodyFat</em> leanMass:(NSNumber *)<em>leanMass</em> bmi:(NSNumber *)<em>bmi</em> note:(NSString *)<em>note</em> image:(UPImage *)<em>image</em></code></div>
@@ -711,7 +711,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -415,7 +415,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -382,7 +382,7 @@
<div class="method-subsection method-declaration"><code>+ (UPCardiacEvent *)eventWithTitle:(NSString *)<em>title</em> heartRate:(NSNumber *)<em>heartRate</em> systolicPressure:(NSNumber *)<em>systolicPressure</em> diastolicPressure:(NSNumber *)<em>diastolicPressure</em> note:(NSString *)<em>note</em> image:(UIImage *)<em>image</em></code></div>
<div class="method-subsection method-declaration"><code>+ (UPCardiacEvent *)eventWithTitle:(NSString *)<em>title</em> heartRate:(NSNumber *)<em>heartRate</em> systolicPressure:(NSNumber *)<em>systolicPressure</em> diastolicPressure:(NSNumber *)<em>diastolicPressure</em> note:(NSString *)<em>note</em> image:(UPImage *)<em>image</em></code></div>
@@ -640,7 +640,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -415,7 +415,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -313,7 +313,7 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UIImage *image</code></div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UPImage *image</code></div>
@@ -485,7 +485,7 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection method-declaration"><code>+ (UPGenericEvent *)eventWithTitle:(NSString *)<em>title</em> verb:(NSString *)<em>verb</em> attributes:(NSDictionary *)<em>attributes</em> note:(NSString *)<em>note</em> image:(UIImage *)<em>image</em></code></div>
<div class="method-subsection method-declaration"><code>+ (UPGenericEvent *)eventWithTitle:(NSString *)<em>title</em> verb:(NSString *)<em>verb</em> attributes:(NSDictionary *)<em>attributes</em> note:(NSString *)<em>note</em> image:(UPImage *)<em>image</em></code></div>
@@ -743,7 +743,7 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -400,7 +400,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+53 -2
View File
@@ -59,6 +59,8 @@
<option value="//api/name/placeName">&nbsp;&nbsp;&nbsp;&nbsp;placeName</option>
<option value="//api/name/subType">&nbsp;&nbsp;&nbsp;&nbsp;subType</option>
@@ -123,6 +125,8 @@
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/placeName">placeName</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/subType">subType</a></span></li>
</ul></li>
@@ -270,6 +274,12 @@
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/subType">&nbsp;&nbsp;subType</a></code>
</span>
<span class="task-item-suffix">property</span>
</li>
</ul>
@@ -485,7 +495,7 @@
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UIImage *photo</code></div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UPImage *photo</code></div>
@@ -711,6 +721,47 @@
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPMealAPI.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/subType" title="subType"></a>
<h3 class="subsubtitle method-title">subType</h3>
<div class="method-subsection brief-description">
<p>The sub type of the meal.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) UPMealSubType subType</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The sub type of the meal.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPMealAPI.h</code><br />
@@ -987,7 +1038,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -484,7 +484,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -794,7 +794,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -1149,7 +1149,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -442,7 +442,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -415,7 +415,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -771,7 +771,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -491,7 +491,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -588,7 +588,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+215 -1
View File
@@ -63,6 +63,8 @@
<option value="//api/name/endCurrentSession">&nbsp;&nbsp;&nbsp;&nbsp;- endCurrentSession</option>
<option value="//api/name/refreshAccessTokenWithClientID:clientSecret:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- refreshAccessTokenWithClientID:clientSecret:completion:</option>
<option value="//api/name/sendRequest:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- sendRequest:completion:</option>
<option value="//api/name/startSessionWithClientID:clientSecret:authScope:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- startSessionWithClientID:clientSecret:authScope:completion:</option>
@@ -71,6 +73,10 @@
<option value="//api/name/startSessionWithClientID:clientSecret:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- startSessionWithClientID:clientSecret:completion:</option>
<option value="//api/name/startSessionWithClientID:clientSecret:webView:authScope:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- startSessionWithClientID:clientSecret:webView:authScope:completion:</option>
<option value="//api/name/startSessionWithClientID:clientSecret:webView:completion:">&nbsp;&nbsp;&nbsp;&nbsp;- startSessionWithClientID:clientSecret:webView:completion:</option>
<option value="//api/name/validateSessionWithCompletion:">&nbsp;&nbsp;&nbsp;&nbsp;- validateSessionWithCompletion:</option>
@@ -123,6 +129,8 @@
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/endCurrentSession">endCurrentSession</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/refreshAccessTokenWithClientID:clientSecret:completion:">refreshAccessTokenWithClientID:clientSecret:completion:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sendRequest:completion:">sendRequest:completion:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startSessionWithClientID:clientSecret:authScope:completion:">startSessionWithClientID:clientSecret:authScope:completion:</a></span></li>
@@ -131,6 +139,10 @@
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startSessionWithClientID:clientSecret:completion:">startSessionWithClientID:clientSecret:completion:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startSessionWithClientID:clientSecret:webView:authScope:completion:">startSessionWithClientID:clientSecret:webView:authScope:completion:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startSessionWithClientID:clientSecret:webView:completion:">startSessionWithClientID:clientSecret:webView:completion:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/validateSessionWithCompletion:">validateSessionWithCompletion:</a></span></li>
</ul></li>
@@ -228,6 +240,24 @@
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/refreshAccessTokenWithClientID:clientSecret:completion:">&ndash;&nbsp;refreshAccessTokenWithClientID:clientSecret:completion:</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/startSessionWithClientID:clientSecret:webView:completion:">&ndash;&nbsp;startSessionWithClientID:clientSecret:webView:completion:</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/startSessionWithClientID:clientSecret:webView:authScope:completion:">&ndash;&nbsp;startSessionWithClientID:clientSecret:webView:authScope:completion:</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/startSessionWithClientID:clientSecret:completion:">&ndash;&nbsp;startSessionWithClientID:clientSecret:completion:</a></code>
@@ -566,6 +596,47 @@
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPPlatform.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/refreshAccessTokenWithClientID:clientSecret:completion:" title="refreshAccessTokenWithClientID:clientSecret:completion:"></a>
<h3 class="subsubtitle method-title">refreshAccessTokenWithClientID:clientSecret:completion:</h3>
<div class="method-subsection brief-description">
<p>Refreshes the current access token.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)refreshAccessTokenWithClientID:(NSString *)<em>clientID</em> clientSecret:(NSString *)<em>clientSecret</em> completion:(UPPlatformSessionCompletion)<em>completion</em></code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Refreshes the current access token.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPPlatform.h</code><br />
@@ -826,6 +897,149 @@
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPPlatform.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/startSessionWithClientID:clientSecret:webView:authScope:completion:" title="startSessionWithClientID:clientSecret:webView:authScope:completion:"></a>
<h3 class="subsubtitle method-title">startSessionWithClientID:clientSecret:webView:authScope:completion:</h3>
<div class="method-subsection brief-description">
<p>Starts a user&rsquo;s session.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)startSessionWithClientID:(NSString *)<em>clientID</em> clientSecret:(NSString *)<em>clientSecret</em> webView:(WebView *)<em>webView</em> authScope:(UPPlatformAuthScope)<em>authScope</em> completion:(UPPlatformSessionCompletion)<em>completion</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>clientID</em></dt>
<dd><p>The client ID provided during application signup.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>clientSecret</em></dt>
<dd><p>The client secret provided during application signup.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>webView</em></dt>
<dd><p>An existing WebView to perform authentication. Will create a new window with a single WebView if nil.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>authScope</em></dt>
<dd><p>Options to request specific auth scopes during authentication. Defaults to UPPlatformAuthScopeBasicRead.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completion</em></dt>
<dd><p>The session completion block.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Starts a user&rsquo;s session.</p>
<p>This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
An existing WebView can be provided, or one will be created in a new window if nil is provided.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPPlatform.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/startSessionWithClientID:clientSecret:webView:completion:" title="startSessionWithClientID:clientSecret:webView:completion:"></a>
<h3 class="subsubtitle method-title">startSessionWithClientID:clientSecret:webView:completion:</h3>
<div class="method-subsection brief-description">
<p>Starts a user&rsquo;s session.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)startSessionWithClientID:(NSString *)<em>clientID</em> clientSecret:(NSString *)<em>clientSecret</em> webView:(WebView *)<em>webView</em> completion:(UPPlatformSessionCompletion)<em>completion</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>clientID</em></dt>
<dd><p>The client ID provided during application signup.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>clientSecret</em></dt>
<dd><p>The client secret provided during application signup.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>webView</em></dt>
<dd><p>An existing WebView to perform authentication. Will create a new window with a single WebView if nil.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completion</em></dt>
<dd><p>The session completion block.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Starts a user&rsquo;s session.</p>
<p>This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
An existing WebView can be provided, or one will be created in a new window if nil is provided.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPPlatform.h</code><br />
@@ -902,7 +1116,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -332,7 +332,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -957,7 +957,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -610,7 +610,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -384,7 +384,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -1456,7 +1456,7 @@ Trends are useful to measure data over time, such as in a graph.</p>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+2 -2
View File
@@ -359,7 +359,7 @@
<div class="method-subsection method-declaration"><code>+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)<em>endpoint</em> params:(NSDictionary *)<em>params</em> image:(UIImage *)<em>image</em></code></div>
<div class="method-subsection method-declaration"><code>+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)<em>endpoint</em> params:(NSDictionary *)<em>params</em> image:(UPImage *)<em>image</em></code></div>
@@ -425,7 +425,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -360,7 +360,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -639,7 +639,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -413,7 +413,7 @@ These can be used to map the user&rsquo;s friends with other users registered wi
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -894,7 +894,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -537,7 +537,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+2 -2
View File
@@ -271,7 +271,7 @@
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UIImage *image</code></div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) UPImage *image</code></div>
@@ -717,7 +717,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -1
View File
@@ -623,7 +623,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -199,7 +199,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -199,7 +199,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -218,7 +218,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -0,0 +1,283 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UPMealSubType Constants Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.2 (build 961)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">UPPlatformSDK </a></h1>
<a id="developerHome" href="../index.html">Jawbone</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">UPMealSubType Constants Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="UPMealSubType Constants Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">UPMealSubType Constants Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">UPMealAPI.h</td>
</tr>
</tbody></table></div>
<h3 class="subsubtitle method-title">UPMealSubType</h3>
<div class="section section-overview">
<p>The available sub types of a meal.</p>
</div>
<div class="section">
<!-- display enum values -->
<h4 class="method-subtitle">Definition</h4>
<code>typedef NS_ENUM(NSUInteger, UPMealSubType ) {<br/>
&nbsp;&nbsp; <a href="">UPMealSubTypeBreakfast</a> = 1,<br/>
&nbsp;&nbsp; <a href="">UPMealSubTypeLunch</a> = 2,<br/>
&nbsp;&nbsp; <a href="">UPMealSubTypeDinner</a> = 3,<br/>
};</code>
</div>
<div class="section section-methods">
<h4 class="method-subtitle">Constants</h4>
<dl class="termdef">
<dt><a name="" title="UPMealSubTypeBreakfast"></a><code>UPMealSubTypeBreakfast</code></dt>
<dd>
<p>The available sub types of a meal.</p>
<p>
Declared In <code class="declared-in-ref">UPMealAPI.h</code>.
</p>
</dd>
<dt><a name="" title="UPMealSubTypeLunch"></a><code>UPMealSubTypeLunch</code></dt>
<dd>
<p>The available sub types of a meal.</p>
<p>
Declared In <code class="declared-in-ref">UPMealAPI.h</code>.
</p>
</dd>
<dt><a name="" title="UPMealSubTypeDinner"></a><code>UPMealSubTypeDinner</code></dt>
<dd>
<p>The available sub types of a meal.</p>
<p>
Declared In <code class="declared-in-ref">UPMealAPI.h</code>.
</p>
</dd>
</dl>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UPMealAPI.h</code><br />
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>
+1 -1
View File
@@ -275,7 +275,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -496,7 +496,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -161,7 +161,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -199,7 +199,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -161,7 +161,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -218,7 +218,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -655,7 +655,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -258,7 +258,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+3 -1
View File
@@ -151,6 +151,8 @@
<li><a href="Constants/UPMealItemServingType.html">UPMealItemServingType</a></li>
<li><a href="Constants/UPMealSubType.html">UPMealSubType</a></li>
<li><a href="Constants/UPMoodType.html">UPMoodType</a></li>
<li><a href="Constants/UPPlatformAuthScope.html">UPPlatformAuthScope</a></li>
@@ -184,7 +186,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+3 -1
View File
@@ -129,6 +129,8 @@
<li><a href="Constants/UPMealItemServingType.html">UPMealItemServingType</a></li>
<li><a href="Constants/UPMealSubType.html">UPMealSubType</a></li>
<li><a href="Constants/UPMoodType.html">UPMoodType</a></li>
<li><a href="Constants/UPPlatformAuthScope.html">UPPlatformAuthScope</a></li>
@@ -162,7 +164,7 @@
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-04-01)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-05-05)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="9U0-49-noU">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13D45a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="9U0-49-noU">
<dependencies>
<deployment defaultVersion="1792" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
@@ -485,6 +485,40 @@
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="T2U-FB-h2R">
<rect key="frame" x="0.0" y="284" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="T2U-FB-h2R" id="26X-SV-M1h">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Refresh Access Token" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="i8q-HG-sb1">
<rect key="frame" x="10" y="9" width="293" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="1KI-pw-Xcd">
<rect key="frame" x="0.0" y="328" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1KI-pw-Xcd" id="eTu-f1-dPZ">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Logout" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b04-Sl-284">
<rect key="frame" x="10" y="9" width="293" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
@@ -53,6 +53,22 @@
}];
}
- (void)refreshToken
{
NSString *clientID = @"3ZYR1YjGd3Q";
NSString *clientSecret = @"4dd5b10b3a3a16dbf3082c86d5faff09e11a682b";
[[UPPlatform sharedPlatform] refreshAccessTokenWithClientID:clientID clientSecret:clientSecret completion:^(UPSession *session, NSError *error) {
[self showResults:session];
}];
}
- (void)logout
{
[[UPPlatform sharedPlatform] endCurrentSession];
[self.navigationController popToRootViewControllerAnimated:YES];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.row)
@@ -76,6 +92,14 @@
case 4:
[self getSettings];
break;
case 5:
[self refreshToken];
break;
case 6:
[self logout];
break;
default:
break;
@@ -0,0 +1,580 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1FB7F661191823E500777CAD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FB7F660191823E500777CAD /* Cocoa.framework */; };
1FB7F66B191823E500777CAD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1FB7F669191823E500777CAD /* InfoPlist.strings */; };
1FB7F66D191823E500777CAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB7F66C191823E500777CAD /* main.m */; };
1FB7F671191823E500777CAD /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 1FB7F66F191823E500777CAD /* Credits.rtf */; };
1FB7F674191823E500777CAD /* JBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB7F673191823E500777CAD /* JBAppDelegate.m */; };
1FB7F677191823E500777CAD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1FB7F675191823E500777CAD /* MainMenu.xib */; };
1FB7F679191823E500777CAD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1FB7F678191823E500777CAD /* Images.xcassets */; };
1FB7F680191823E500777CAD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FB7F67F191823E500777CAD /* XCTest.framework */; };
1FB7F681191823E500777CAD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FB7F660191823E500777CAD /* Cocoa.framework */; };
1FB7F689191823E500777CAD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1FB7F687191823E500777CAD /* InfoPlist.strings */; };
1FB7F68B191823E500777CAD /* Sample_OSXTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB7F68A191823E500777CAD /* Sample_OSXTests.m */; };
1FB7F6A31918240500777CAD /* libUPPlatformSDK-OSX.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FB7F69E191823EF00777CAD /* libUPPlatformSDK-OSX.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
1FB7F682191823E500777CAD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1FB7F655191823E500777CAD /* Project object */;
proxyType = 1;
remoteGlobalIDString = 1FB7F65C191823E500777CAD;
remoteInfo = "Sample-OSX";
};
1FB7F69B191823EF00777CAD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = E3E46C0017173670009CCA56;
remoteInfo = UPPlatformSDK;
};
1FB7F69D191823EF00777CAD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 48FA5F891768CA7900025723;
remoteInfo = "UPPlatformSDK-OSX";
};
1FB7F69F191823EF00777CAD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1FE2964118D24AD80047F094;
remoteInfo = UPPlatform;
};
1FB7F6A1191823FB00777CAD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 48FA5F881768CA7900025723;
remoteInfo = "UPPlatformSDK-OSX";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1FB7F65D191823E500777CAD /* Sample-OSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sample-OSX.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1FB7F660191823E500777CAD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
1FB7F663191823E500777CAD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
1FB7F664191823E500777CAD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
1FB7F665191823E500777CAD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1FB7F668191823E500777CAD /* Sample-OSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Sample-OSX-Info.plist"; sourceTree = "<group>"; };
1FB7F66A191823E500777CAD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1FB7F66C191823E500777CAD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
1FB7F66E191823E500777CAD /* Sample-OSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Sample-OSX-Prefix.pch"; sourceTree = "<group>"; };
1FB7F670191823E500777CAD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
1FB7F672191823E500777CAD /* JBAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JBAppDelegate.h; sourceTree = "<group>"; };
1FB7F673191823E500777CAD /* JBAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JBAppDelegate.m; sourceTree = "<group>"; };
1FB7F676191823E500777CAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
1FB7F678191823E500777CAD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
1FB7F67E191823E500777CAD /* Sample-OSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Sample-OSXTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
1FB7F67F191823E500777CAD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
1FB7F686191823E500777CAD /* Sample-OSXTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Sample-OSXTests-Info.plist"; sourceTree = "<group>"; };
1FB7F688191823E500777CAD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1FB7F68A191823E500777CAD /* Sample_OSXTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Sample_OSXTests.m; sourceTree = "<group>"; };
1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = UPPlatformSDK.xcodeproj; path = ../../UPPlatformSDK/UPPlatformSDK.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1FB7F65A191823E500777CAD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F6A31918240500777CAD /* libUPPlatformSDK-OSX.a in Frameworks */,
1FB7F661191823E500777CAD /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1FB7F67B191823E500777CAD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F681191823E500777CAD /* Cocoa.framework in Frameworks */,
1FB7F680191823E500777CAD /* XCTest.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1FB7F654191823E500777CAD = {
isa = PBXGroup;
children = (
1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */,
1FB7F666191823E500777CAD /* Sample-OSX */,
1FB7F684191823E500777CAD /* Sample-OSXTests */,
1FB7F65F191823E500777CAD /* Frameworks */,
1FB7F65E191823E500777CAD /* Products */,
);
sourceTree = "<group>";
};
1FB7F65E191823E500777CAD /* Products */ = {
isa = PBXGroup;
children = (
1FB7F65D191823E500777CAD /* Sample-OSX.app */,
1FB7F67E191823E500777CAD /* Sample-OSXTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
1FB7F65F191823E500777CAD /* Frameworks */ = {
isa = PBXGroup;
children = (
1FB7F660191823E500777CAD /* Cocoa.framework */,
1FB7F67F191823E500777CAD /* XCTest.framework */,
1FB7F662191823E500777CAD /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
1FB7F662191823E500777CAD /* Other Frameworks */ = {
isa = PBXGroup;
children = (
1FB7F663191823E500777CAD /* AppKit.framework */,
1FB7F664191823E500777CAD /* CoreData.framework */,
1FB7F665191823E500777CAD /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
1FB7F666191823E500777CAD /* Sample-OSX */ = {
isa = PBXGroup;
children = (
1FB7F672191823E500777CAD /* JBAppDelegate.h */,
1FB7F673191823E500777CAD /* JBAppDelegate.m */,
1FB7F675191823E500777CAD /* MainMenu.xib */,
1FB7F678191823E500777CAD /* Images.xcassets */,
1FB7F667191823E500777CAD /* Supporting Files */,
);
path = "Sample-OSX";
sourceTree = "<group>";
};
1FB7F667191823E500777CAD /* Supporting Files */ = {
isa = PBXGroup;
children = (
1FB7F668191823E500777CAD /* Sample-OSX-Info.plist */,
1FB7F669191823E500777CAD /* InfoPlist.strings */,
1FB7F66C191823E500777CAD /* main.m */,
1FB7F66E191823E500777CAD /* Sample-OSX-Prefix.pch */,
1FB7F66F191823E500777CAD /* Credits.rtf */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
1FB7F684191823E500777CAD /* Sample-OSXTests */ = {
isa = PBXGroup;
children = (
1FB7F68A191823E500777CAD /* Sample_OSXTests.m */,
1FB7F685191823E500777CAD /* Supporting Files */,
);
path = "Sample-OSXTests";
sourceTree = "<group>";
};
1FB7F685191823E500777CAD /* Supporting Files */ = {
isa = PBXGroup;
children = (
1FB7F686191823E500777CAD /* Sample-OSXTests-Info.plist */,
1FB7F687191823E500777CAD /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
1FB7F695191823EF00777CAD /* Products */ = {
isa = PBXGroup;
children = (
1FB7F69C191823EF00777CAD /* libUPPlatformSDK.a */,
1FB7F69E191823EF00777CAD /* libUPPlatformSDK-OSX.a */,
1FB7F6A0191823EF00777CAD /* libUPPlatform.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1FB7F65C191823E500777CAD /* Sample-OSX */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1FB7F68E191823E500777CAD /* Build configuration list for PBXNativeTarget "Sample-OSX" */;
buildPhases = (
1FB7F659191823E500777CAD /* Sources */,
1FB7F65A191823E500777CAD /* Frameworks */,
1FB7F65B191823E500777CAD /* Resources */,
);
buildRules = (
);
dependencies = (
1FB7F6A2191823FB00777CAD /* PBXTargetDependency */,
);
name = "Sample-OSX";
productName = "Sample-OSX";
productReference = 1FB7F65D191823E500777CAD /* Sample-OSX.app */;
productType = "com.apple.product-type.application";
};
1FB7F67D191823E500777CAD /* Sample-OSXTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1FB7F691191823E500777CAD /* Build configuration list for PBXNativeTarget "Sample-OSXTests" */;
buildPhases = (
1FB7F67A191823E500777CAD /* Sources */,
1FB7F67B191823E500777CAD /* Frameworks */,
1FB7F67C191823E500777CAD /* Resources */,
);
buildRules = (
);
dependencies = (
1FB7F683191823E500777CAD /* PBXTargetDependency */,
);
name = "Sample-OSXTests";
productName = "Sample-OSXTests";
productReference = 1FB7F67E191823E500777CAD /* Sample-OSXTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
1FB7F655191823E500777CAD /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = JB;
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = Jawbone;
TargetAttributes = {
1FB7F67D191823E500777CAD = {
TestTargetID = 1FB7F65C191823E500777CAD;
};
};
};
buildConfigurationList = 1FB7F658191823E500777CAD /* Build configuration list for PBXProject "Sample-OSX" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 1FB7F654191823E500777CAD;
productRefGroup = 1FB7F65E191823E500777CAD /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 1FB7F695191823EF00777CAD /* Products */;
ProjectRef = 1FB7F694191823EF00777CAD /* UPPlatformSDK.xcodeproj */;
},
);
projectRoot = "";
targets = (
1FB7F65C191823E500777CAD /* Sample-OSX */,
1FB7F67D191823E500777CAD /* Sample-OSXTests */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
1FB7F69C191823EF00777CAD /* libUPPlatformSDK.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libUPPlatformSDK.a;
remoteRef = 1FB7F69B191823EF00777CAD /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1FB7F69E191823EF00777CAD /* libUPPlatformSDK-OSX.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libUPPlatformSDK-OSX.a";
remoteRef = 1FB7F69D191823EF00777CAD /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1FB7F6A0191823EF00777CAD /* libUPPlatform.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libUPPlatform.a;
remoteRef = 1FB7F69F191823EF00777CAD /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
1FB7F65B191823E500777CAD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F66B191823E500777CAD /* InfoPlist.strings in Resources */,
1FB7F679191823E500777CAD /* Images.xcassets in Resources */,
1FB7F671191823E500777CAD /* Credits.rtf in Resources */,
1FB7F677191823E500777CAD /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1FB7F67C191823E500777CAD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F689191823E500777CAD /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
1FB7F659191823E500777CAD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F674191823E500777CAD /* JBAppDelegate.m in Sources */,
1FB7F66D191823E500777CAD /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1FB7F67A191823E500777CAD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F68B191823E500777CAD /* Sample_OSXTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
1FB7F683191823E500777CAD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1FB7F65C191823E500777CAD /* Sample-OSX */;
targetProxy = 1FB7F682191823E500777CAD /* PBXContainerItemProxy */;
};
1FB7F6A2191823FB00777CAD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "UPPlatformSDK-OSX";
targetProxy = 1FB7F6A1191823FB00777CAD /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
1FB7F669191823E500777CAD /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
1FB7F66A191823E500777CAD /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
1FB7F66F191823E500777CAD /* Credits.rtf */ = {
isa = PBXVariantGroup;
children = (
1FB7F670191823E500777CAD /* en */,
);
name = Credits.rtf;
sourceTree = "<group>";
};
1FB7F675191823E500777CAD /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
1FB7F676191823E500777CAD /* Base */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
1FB7F687191823E500777CAD /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
1FB7F688191823E500777CAD /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1FB7F68C191823E500777CAD /* 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__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
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;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
1FB7F68D191823E500777CAD /* 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__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = 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;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = macosx;
};
name = Release;
};
1FB7F68F191823E500777CAD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sample-OSX/Sample-OSX-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
../../UPPlatformSDK/UPPlatformSDK,
);
INFOPLIST_FILE = "Sample-OSX/Sample-OSX-Info.plist";
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
1FB7F690191823E500777CAD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sample-OSX/Sample-OSX-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
../../UPPlatformSDK/UPPlatformSDK,
);
INFOPLIST_FILE = "Sample-OSX/Sample-OSX-Info.plist";
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
1FB7F692191823E500777CAD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Sample-OSX.app/Contents/MacOS/Sample-OSX";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sample-OSX/Sample-OSX-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "Sample-OSXTests/Sample-OSXTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Debug;
};
1FB7F693191823E500777CAD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Sample-OSX.app/Contents/MacOS/Sample-OSX";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sample-OSX/Sample-OSX-Prefix.pch";
INFOPLIST_FILE = "Sample-OSXTests/Sample-OSXTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1FB7F658191823E500777CAD /* Build configuration list for PBXProject "Sample-OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1FB7F68C191823E500777CAD /* Debug */,
1FB7F68D191823E500777CAD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1FB7F68E191823E500777CAD /* Build configuration list for PBXNativeTarget "Sample-OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1FB7F68F191823E500777CAD /* Debug */,
1FB7F690191823E500777CAD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1FB7F691191823E500777CAD /* Build configuration list for PBXNativeTarget "Sample-OSXTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1FB7F692191823E500777CAD /* Debug */,
1FB7F693191823E500777CAD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1FB7F655191823E500777CAD /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Sample-OSX.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,728 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C1021" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="Voe-Tx-rLC" customClass="JBAppDelegate">
<connections>
<outlet property="authButton" destination="StA-R0-pQm" id="Rzu-Ss-FnG"/>
<outlet property="infoLabel" destination="C2s-qU-btg" id="SLf-tn-Apo"/>
<outlet property="logoutButton" destination="mpR-96-xsf" id="TlX-1D-5Ry"/>
<outlet property="postButton" destination="0d7-ju-VHI" id="0jI-0C-Min"/>
<outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
</connections>
</customObject>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="Sample-OSX" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Sample-OSX" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About Sample-OSX" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide Sample-OSX" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit Sample-OSX" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="dMs-cI-mzQ">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="File" id="bib-Uj-vzu">
<items>
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
<connections>
<action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
</connections>
</menuItem>
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
<connections>
<action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="tXI-mr-wws">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
<items>
<menuItem title="Clear Menu" id="vNY-rz-j42">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
<connections>
<action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
</connections>
</menuItem>
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
<connections>
<action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
<connections>
<action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" id="KaW-ft-85H">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
<connections>
<action selector="print:" target="-1" id="qaZ-4w-aoO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="5QF-Oa-p0T">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
<items>
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
<connections>
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
<connections>
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
<connections>
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
<connections>
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
<connections>
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
</connections>
</menuItem>
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
</connections>
</menuItem>
<menuItem title="Delete" id="pa3-QI-u2k">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
<connections>
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
<menuItem title="Find" id="4EN-yA-p0u">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Find" id="1b7-l0-nxx">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
<connections>
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
</connections>
</menuItem>
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
<connections>
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
</connections>
</menuItem>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
<connections>
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
</connections>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
<connections>
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
</connections>
</menuItem>
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
<connections>
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
<items>
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
<connections>
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
</connections>
</menuItem>
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
<connections>
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
</connections>
</menuItem>
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="9ic-FL-obx">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
<items>
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
</connections>
</menuItem>
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
</connections>
</menuItem>
<menuItem title="Smart Links" id="cwL-P1-jid">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
</connections>
</menuItem>
<menuItem title="Data Detectors" id="tRr-pd-1PS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
</connections>
</menuItem>
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Transformations" id="2oI-Rn-ZJC">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
<items>
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
</connections>
</menuItem>
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
</connections>
</menuItem>
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="xrE-MZ-jX0">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
<items>
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="jxT-CU-nIS">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
<items>
<menuItem title="Font" id="Gi5-1S-RQB">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
<connections>
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
</connections>
</menuItem>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
</connections>
</menuItem>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
</connections>
</menuItem>
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
<connections>
<action selector="underline:" target="-1" id="FYS-2b-JAY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
</connections>
</menuItem>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
<menuItem title="Kern" id="jBQ-r6-VK2">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
<items>
<menuItem title="Use Default" id="GUa-eO-cwY">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
</connections>
</menuItem>
<menuItem title="Use None" id="cDB-IK-hbR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="46P-cB-AYj">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="ogc-rX-tC1">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligatures" id="o6e-r0-MWq">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
<items>
<menuItem title="Use Default" id="agt-UL-0e3">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
</connections>
</menuItem>
<menuItem title="Use None" id="J7y-lM-qPV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
</connections>
</menuItem>
<menuItem title="Use All" id="xQD-1f-W4t">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="OaQ-X3-Vso">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
<items>
<menuItem title="Use Default" id="3Om-Ey-2VK">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="Rqc-34-cIF">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="I0S-gh-46l">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
</connections>
</menuItem>
<menuItem title="Raise" id="2h7-ER-AoG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
</connections>
</menuItem>
<menuItem title="Lower" id="1tx-W0-xDw">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
<connections>
<action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="Fal-I4-PZk">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="d9c-me-L2H">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
<connections>
<action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
<connections>
<action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
</connections>
</menuItem>
<menuItem title="Justify" id="J5U-5w-g23">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
<connections>
<action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
<menuItem title="Writing Direction" id="H1b-Si-o9J">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
<items>
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="YGs-j5-SAR">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
</connections>
</menuItem>
<menuItem id="Lbh-J2-qVU">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
</connections>
</menuItem>
<menuItem id="jFq-tB-4Kx">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="Nop-cj-93Q">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
</connections>
</menuItem>
<menuItem id="BgM-ve-c93">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
</connections>
</menuItem>
<menuItem id="RB4-Sm-HuC">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
<menuItem title="Show Ruler" id="vLm-3I-IUL">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="H8h-7b-M4v">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="View" id="HyV-fh-RgO">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="wpr-3q-Mcd">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="Sample-OSX Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<window title="Sample-OSX" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="271" height="142"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/>
<view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="271" height="142"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="StA-R0-pQm">
<rect key="frame" x="45" y="104" width="180" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Authenticate" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="vPA-zI-gJq">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="authenticate:" target="Voe-Tx-rLC" id="nEb-k7-TEg"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0d7-ju-VHI">
<rect key="frame" x="45" y="39" width="180" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Post Generic Event" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="3DK-n3-Z0b">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="postGenericEvent:" target="Voe-Tx-rLC" id="8To-xf-QxT"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mpR-96-xsf">
<rect key="frame" x="45" y="4" width="180" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Logout" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Tg3-kc-KKO">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="logout:" target="Voe-Tx-rLC" id="U2E-Nh-IgC"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="C2s-qU-btg">
<rect key="frame" x="5" y="75" width="260" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Not Authenticated." id="MZk-K1-zZu">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
</window>
</objects>
</document>
@@ -0,0 +1,58 @@
{
"images" : [
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,17 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "os-x-mavericks-logo.png"
},
{
"idiom" : "universal",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

@@ -0,0 +1,15 @@
//
// JBAppDelegate.h
// Sample-OSX
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface JBAppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@end
@@ -0,0 +1,91 @@
//
// JBAppDelegate.m
// Sample-OSX
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#import "JBAppDelegate.h"
#import "UP.h"
NSString *const kAPIExplorerID = @"3ZYR1YjGd3Q";
NSString *const kAPIExplorerSecret = @"4dd5b10b3a3a16dbf3082c86d5faff09e11a682b";
@interface JBAppDelegate ()
@property (nonatomic, weak) IBOutlet NSButton *authButton;
@property (nonatomic, weak) IBOutlet NSButton *postButton;
@property (nonatomic, weak) IBOutlet NSButton *logoutButton;
@property (nonatomic, weak) IBOutlet NSTextField *infoLabel;
@property (nonatomic, strong) UPPlatform *platform;
- (IBAction)authenticate:(id)sender;
- (IBAction)postGenericEvent:(id)sender;
@end
@implementation JBAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[[UPPlatform sharedPlatform] validateSessionWithCompletion:^(UPSession *session, NSError *error) {
if (session != nil)
{
[self enablePosting];
}
}];
}
- (IBAction)authenticate:(id)sender
{
[[UPPlatform sharedPlatform] startSessionWithClientID:kAPIExplorerID clientSecret:kAPIExplorerSecret webView:nil authScope:UPPlatformAuthScopeAll completion:^(UPSession *session, NSError *error) {
if (session != nil)
{
[UPUserAPI getCurrentUserWithCompletion:^(UPUser *user, UPURLResponse *response, NSError *error) {
[UPPlatform sharedPlatform].currentSession.currentUser = user;
[self enablePosting];
}];
}
}];
}
- (IBAction)logout:(id)sender
{
[[UPPlatform sharedPlatform] endCurrentSession];
[self.authButton setEnabled:YES];
[self.postButton setEnabled:NO];
[self.logoutButton setEnabled:NO];
[self.infoLabel setStringValue:@"Not Authenticated."];
}
- (IBAction)postGenericEvent:(id)sender
{
[self.postButton setEnabled:NO];
NSImage *logo = [NSImage imageNamed:@"logo"];
UPGenericEvent *event = [UPGenericEvent eventWithTitle:@"OS X Time" verb:@"posted" attributes:nil note:@"Just testing the OS X SDK." image:logo];
[UPGenericEventAPI postGenericEvent:event completion:^(UPGenericEvent *event, UPURLResponse *response, NSError *error) {
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Event was posted successfully!"];
[alert addButtonWithTitle:@"OK"];
[alert runModal];
[self.postButton setEnabled:YES];
}];
}
- (void)enablePosting
{
UPSession *session = [UPPlatform sharedPlatform].currentSession;
NSString *message = [NSString stringWithFormat:@"Signed in as %@ %@.", session.currentUser.firstName, session.currentUser.lastName];
[self.authButton setEnabled:NO];
[self.postButton setEnabled:YES];
[self.logoutButton setEnabled:YES];
[self.infoLabel setStringValue:message];
}
@end
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.jawbone.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Jawbone. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
@@ -0,0 +1,9 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
@@ -0,0 +1,29 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\
\b Human Interface Design:
\b0 \
Some other people\
\
\b Testing:
\b0 \
Hopefully not nobody\
\
\b Documentation:
\b0 \
Whoever\
\
\b With special thanks to:
\b0 \
Mom\
}
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */
+14
View File
@@ -0,0 +1,14 @@
//
// main.m
// Sample-OSX
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#import <Cocoa/Cocoa.h>
int main(int argc, const char * argv[])
{
return NSApplicationMain(argc, argv);
}
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.jawbone.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
@@ -0,0 +1,34 @@
//
// Sample_OSXTests.m
// Sample-OSXTests
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#import <XCTest/XCTest.h>
@interface Sample_OSXTests : XCTestCase
@end
@implementation Sample_OSXTests
- (void)setUp
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample
{
XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
}
@end
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */
Binary file not shown.
@@ -20,3 +20,4 @@
#import "UPSleepAPI.h"
#import "UPMealAPI.h"
#import "UPBandEventAPI.h"
#import "UPDefines.h"
@@ -5,7 +5,9 @@
// Created by Andy Roth on 4/6/13.
// Copyright (c) 2013 Jawbone. All rights reserved.
//
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#import "UPDefines.h"
#if !UP_TARGET_OSX
#import <UIKit/UIKit.h>
#import "UPPlatform.h"
@@ -14,7 +14,7 @@
typedef void(^UPBaseEventAPICompletion)(id result, UPURLResponse *response, NSError *error);
typedef void(^UPBaseEventAPIArrayCompletion)(NSArray *results, UPURLResponse *response, NSError *error);
typedef void(^UPBaseEventAPIImageCompletion)(UIImage *image);
typedef void(^UPBaseEventAPIImageCompletion)(UPImage *image);
/**
* The base event API provides a common interface for event management.
@@ -66,7 +66,7 @@ typedef void(^UPBodyEventAPICompletion)(UPBodyEvent *event, UPURLResponse *respo
* @param note Notes associated with the event.
* @param image Image to include in the event.
*/
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UIImage *)image;
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UPImage *)image;
/**
* Create a new body event with supplied parameters for the currently authenticated user.
@@ -67,7 +67,7 @@ typedef void(^UPCardiacEventAPICompletion)(UPCardiacEvent *event, UPURLResponse
* @param diastolicPressure Diastolic pressure.
* @param image Associated image.
*/
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UIImage *)image;
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UPImage *)image;
/**
* Create a new cardiac event with supplied parameters for the currently authenticated user.
@@ -0,0 +1,20 @@
//
// UPDefines.h
// UPPlatformSDK
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#ifndef UPPlatformSDK_UPDefines_h
#define UPPlatformSDK_UPDefines_h
#define UP_TARGET_OSX (!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#if UP_TARGET_OSX
#define UPImage NSImage
#else
#define UPImage UIImage
#endif
#endif
@@ -64,7 +64,7 @@ typedef void(^UPGenericEventAPICompletion)(UPGenericEvent *event, UPURLResponse
* @param note Description of the event.
* @param image Image to include in the event.
*/
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UIImage *)image;
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UPImage *)image;
/**
* Create a new generic event with supplied parameters for the currently authenticated user.
@@ -100,6 +100,6 @@ typedef void(^UPGenericEventAPICompletion)(UPGenericEvent *event, UPURLResponse
/**
* Event image.
*/
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) UPImage *image;
@end
@@ -62,6 +62,16 @@ typedef void(^UPMealAPICompletion)(UPMeal *meal, UPURLResponse *response, NSErro
@end
/**
* The available sub types of a meal.
*/
typedef NS_ENUM(NSUInteger, UPMealSubType)
{
UPMealSubTypeBreakfast = 1,
UPMealSubTypeLunch = 2,
UPMealSubTypeDinner = 3
};
/**
* Represents a single meal, consisting of multiple meal items.
*/
@@ -130,13 +140,18 @@ typedef void(^UPMealAPICompletion)(UPMeal *meal, UPURLResponse *response, NSErro
/**
* The photo for the meal.
*/
@property (nonatomic, strong) UIImage *photo;
@property (nonatomic, strong) UPImage *photo;
/**
* The photo URL for the meal.
*/
@property (nonatomic, strong) NSString *photoURL;
/**
* The sub type of the meal.
*/
@property (nonatomic, assign) UPMealSubType subType;
@end
/**
@@ -8,6 +8,12 @@
#import <Foundation/Foundation.h>
#import "UPDefines.h"
#if UP_TARGET_OSX
#import <WebKit/WebKit.h>
#endif
extern NSString * const kUPPlatformDefaultRedirectURI;
@class UPSession, UPURLRequest, UPURLResponse;
@@ -100,9 +106,38 @@ typedef void(^UPPlatformRequestCompletion)(UPURLRequest *request, UPURLResponse
*/
- (void)validateSessionWithCompletion:(UPPlatformSessionCompletion)completion;
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
/**
* Refreshes the current access token.
*/
- (void)refreshAccessTokenWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret completion:(UPPlatformSessionCompletion)completion;
#if UP_TARGET_OSX
/**
* Starts a user's session.
*
* This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
* An existing WebView can be provided, or one will be created in a new window if nil is provided.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param webView An existing WebView to perform authentication. Will create a new window with a single WebView if nil.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret webView:(WebView *)webView completion:(UPPlatformSessionCompletion)completion;
/**
* Starts a user's session.
*
* This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
* An existing WebView can be provided, or one will be created in a new window if nil is provided.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param webView An existing WebView to perform authentication. Will create a new window with a single WebView if nil.
* @param authScope Options to request specific auth scopes during authentication. Defaults to UPPlatformAuthScopeBasicRead.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret webView:(WebView *)webView authScope:(UPPlatformAuthScope)authScope completion:(UPPlatformSessionCompletion)completion;
#else
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
#import "UPDefines.h"
/**
* The base URLRequest object that contains the necessary headers for OAuth.
*/
@@ -44,6 +46,6 @@
* @param params A dictionary of paramters to send with the request.
* @param image An image to post along with the params.
*/
+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)endpoint params:(NSDictionary *)params image:(UIImage *)image;
+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)endpoint params:(NSDictionary *)params image:(UPImage *)image;
@end
@@ -171,6 +171,6 @@ typedef NS_ENUM(NSUInteger, UPWorkoutIntensity)
/**
* The workout's image.
*/
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) UPImage *image;
@end
Binary file not shown.
@@ -30,6 +30,11 @@
1F7F026A18EA057400F5C39C /* UPBandEventAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F7F026318EA053C00F5C39C /* UPBandEventAPI.h */; };
1F7F026B18EA057D00F5C39C /* UPBandEventAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F7F026418EA053C00F5C39C /* UPBandEventAPI.m */; };
1F971807177B4D470030C2DA /* UPPlatformSDK-OS-X-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 1F971806177B4D470030C2DA /* UPPlatformSDK-OS-X-Prefix.pch */; };
1FB7F6A51918246F00777CAD /* UPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB7F6A41918246F00777CAD /* UPDefines.h */; };
1FB7F6A61918246F00777CAD /* UPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB7F6A41918246F00777CAD /* UPDefines.h */; };
1FB7F6A71918246F00777CAD /* UPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB7F6A41918246F00777CAD /* UPDefines.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FB7F6A81918247900777CAD /* UP.h in Headers */ = {isa = PBXBuildFile; fileRef = BF7FB2FC183918D000F6A596 /* UP.h */; };
1FB7F6AA1918287D00777CAD /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FB7F6A91918287D00777CAD /* WebKit.framework */; };
1FE2961718D24AD80047F094 /* UPCardiacEventAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7FB2921837EAAE00F6A596 /* UPCardiacEventAPI.m */; };
1FE2961818D24AD80047F094 /* NSDate+UPPlatform.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7FB2451837EA3F00F6A596 /* NSDate+UPPlatform.m */; };
1FE2961918D24AD80047F094 /* UPSleepAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7FB27D1837EA8F00F6A596 /* UPSleepAPI.m */; };
@@ -173,6 +178,8 @@
1F7F026318EA053C00F5C39C /* UPBandEventAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UPBandEventAPI.h; path = UPPlatformSDK/UPBandEventAPI.h; sourceTree = SOURCE_ROOT; };
1F7F026418EA053C00F5C39C /* UPBandEventAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UPBandEventAPI.m; path = UPPlatformSDK/UPBandEventAPI.m; sourceTree = SOURCE_ROOT; };
1F971806177B4D470030C2DA /* UPPlatformSDK-OS-X-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UPPlatformSDK-OS-X-Prefix.pch"; sourceTree = "<group>"; };
1FB7F6A41918246F00777CAD /* UPDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UPDefines.h; path = UPPlatformSDK/UPDefines.h; sourceTree = SOURCE_ROOT; };
1FB7F6A91918287D00777CAD /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; };
1FE2964118D24AD80047F094 /* libUPPlatform.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libUPPlatform.a; sourceTree = BUILT_PRODUCTS_DIR; };
48FA5F891768CA7900025723 /* libUPPlatformSDK-OSX.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libUPPlatformSDK-OSX.a"; sourceTree = BUILT_PRODUCTS_DIR; };
48FA5F8A1768CA7900025723 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
@@ -234,6 +241,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F6AA1918287D00777CAD /* WebKit.framework in Frameworks */,
48FA5F8B1768CA7900025723 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -270,6 +278,7 @@
BF7FB2681837EA6C00F6A596 /* UPURLRequest.m */,
BF7FB26E1837EA7200F6A596 /* UPURLResponse.h */,
BF7FB26F1837EA7200F6A596 /* UPURLResponse.m */,
1FB7F6A41918246F00777CAD /* UPDefines.h */,
);
name = Core;
sourceTree = "<group>";
@@ -345,6 +354,7 @@
E3E46C0217173670009CCA56 /* Frameworks */ = {
isa = PBXGroup;
children = (
1FB7F6A91918287D00777CAD /* WebKit.framework */,
E3E46C0317173670009CCA56 /* Foundation.framework */,
48FA5F8A1768CA7900025723 /* Cocoa.framework */,
48FA5F9B1768CA7900025723 /* XCTest.framework */,
@@ -407,6 +417,7 @@
1FE2963918D24AD80047F094 /* UPWorkoutAPI.h in Headers */,
1FE2963A18D24AD80047F094 /* UPBaseEventAPI.h in Headers */,
1FE2963B18D24AD80047F094 /* UPSleepAPI.h in Headers */,
1FB7F6A71918246F00777CAD /* UPDefines.h in Headers */,
1FE2968D18D24EDA0047F094 /* UPCardiacEventAPI.h in Headers */,
1FE2963218D24AD80047F094 /* NSDictionary+UPPlatform.h in Headers */,
1FE2963C18D24AD80047F094 /* NSDate+UPPlatform.h in Headers */,
@@ -420,6 +431,8 @@
files = (
BF7FB2631837EA6300F6A596 /* UPSession.h in Headers */,
1F7F026A18EA057400F5C39C /* UPBandEventAPI.h in Headers */,
1FB7F6A61918246F00777CAD /* UPDefines.h in Headers */,
1FB7F6A81918247900777CAD /* UP.h in Headers */,
1F971807177B4D470030C2DA /* UPPlatformSDK-OS-X-Prefix.pch in Headers */,
BF7FB2B71837EAF400F6A596 /* UPUserAPI.h in Headers */,
BF7FB2B01837EAEC00F6A596 /* UPMoodAPI.h in Headers */,
@@ -442,6 +455,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
1FB7F6A51918246F00777CAD /* UPDefines.h in Headers */,
BF7FB29A1837EABA00F6A596 /* UPBodyEventAPI.h in Headers */,
BF7FB2691837EA6C00F6A596 /* UPURLRequest.h in Headers */,
BF7FB28C1837EAA600F6A596 /* UPMoveAPI.h in Headers */,
+1
View File
@@ -20,3 +20,4 @@
#import "UPSleepAPI.h"
#import "UPMealAPI.h"
#import "UPBandEventAPI.h"
#import "UPDefines.h"
@@ -5,7 +5,9 @@
// Created by Andy Roth on 4/6/13.
// Copyright (c) 2013 Jawbone. All rights reserved.
//
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#import "UPDefines.h"
#if !UP_TARGET_OSX
#import <UIKit/UIKit.h>
#import "UPPlatform.h"
@@ -5,7 +5,9 @@
// Created by Andy Roth on 4/6/13.
// Copyright (c) 2013 Jawbone. All rights reserved.
//
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#import "UPDefines.h"
#if !UP_TARGET_OSX
#import "UPAuthViewController.h"
@@ -13,13 +15,14 @@
@property (nonatomic, weak) id<UPAuthViewControllerDelegate> delegate;
@property (nonatomic, strong) UIViewController *contentViewController;
@property (nonatomic, strong) UIViewController *rootViewController;
@property (nonatomic, strong) UIWebView *webView;
@property (nonatomic, strong) NSURL *authURL;
@property (nonatomic, strong) NSString *redirectURIScheme;
@property (nonatomic, assign) BOOL isHiding;
@end
@implementation UPAuthViewController
@@ -86,6 +89,9 @@
- (void)hideWithCompletion:(void(^)())completion
{
if (self.isHiding) return;
self.isHiding = YES;
[self.rootViewController dismissViewControllerAnimated:YES completion:^{
if (completion) completion();
}];
@@ -127,6 +133,7 @@
[self hideWithCompletion:nil];
[self.delegate authViewController:self didCompleteWithAuthCode:code];
return NO;
}
+1 -1
View File
@@ -14,7 +14,7 @@
typedef void(^UPBaseEventAPICompletion)(id result, UPURLResponse *response, NSError *error);
typedef void(^UPBaseEventAPIArrayCompletion)(NSArray *results, UPURLResponse *response, NSError *error);
typedef void(^UPBaseEventAPIImageCompletion)(UIImage *image);
typedef void(^UPBaseEventAPIImageCompletion)(UPImage *image);
/**
* The base event API provides a common interface for event management.
+2 -2
View File
@@ -38,7 +38,7 @@
+ (void)updateEvent:(UPBaseEvent *)event completion:(UPBaseEventAPICompletion)completion
{
NSDictionary *params = [event encodeToDictionary];
UIImage *image = [event respondsToSelector:@selector(image)] ? [event performSelector:@selector(image)] : nil;
UPImage *image = [event respondsToSelector:@selector(image)] ? [event performSelector:@selector(image)] : nil;
if (image == nil && [event respondsToSelector:@selector(photo)]) image = [event performSelector:@selector(photo)];
UPURLRequest *request = [UPURLRequest postRequestWithEndpoint:[NSString stringWithFormat:@"nudge/api/%@/%@/%@/partialUpdate", [UPPlatform currentPlatformVersion], event.apiType, event.xid] params:params image:image];
@@ -55,7 +55,7 @@
+ (void)postEvent:(UPBaseEvent *)event completion:(UPBaseEventAPICompletion)completion
{
NSDictionary *params = [event encodeToDictionary];
UIImage *image = [event respondsToSelector:@selector(image)] ? [event performSelector:@selector(image)] : nil;
UPImage *image = [event respondsToSelector:@selector(image)] ? [event performSelector:@selector(image)] : nil;
if (image == nil && [event respondsToSelector:@selector(photo)]) image = [event performSelector:@selector(photo)];
UPURLRequest *request = [UPURLRequest postRequestWithEndpoint:[NSString stringWithFormat:@"nudge/api/%@/users/@me/%@", [UPPlatform currentPlatformVersion], event.apiType] params:params image:image];
+1 -1
View File
@@ -66,7 +66,7 @@ typedef void(^UPBodyEventAPICompletion)(UPBodyEvent *event, UPURLResponse *respo
* @param note Notes associated with the event.
* @param image Image to include in the event.
*/
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UIImage *)image;
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UPImage *)image;
/**
* Create a new body event with supplied parameters for the currently authenticated user.
+1 -1
View File
@@ -46,7 +46,7 @@ static NSString *kBodyEventType = @"body_events";
@implementation UPBodyEvent
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UIImage *)image
+ (UPBodyEvent *)eventWithTitle:(NSString *)title weight:(NSNumber *)weight bodyFat:(NSNumber *)bodyFat leanMass:(NSNumber *)leanMass bmi:(NSNumber *)bmi note:(NSString *)note image:(UPImage *)image
{
UPBodyEvent *event = [[UPBodyEvent alloc] init];
@@ -67,7 +67,7 @@ typedef void(^UPCardiacEventAPICompletion)(UPCardiacEvent *event, UPURLResponse
* @param diastolicPressure Diastolic pressure.
* @param image Associated image.
*/
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UIImage *)image;
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UPImage *)image;
/**
* Create a new cardiac event with supplied parameters for the currently authenticated user.
@@ -46,7 +46,7 @@ static NSString *kCardiacEventType = @"cardiac_events";
@implementation UPCardiacEvent
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UIImage *)image
+ (UPCardiacEvent *)eventWithTitle:(NSString *)title heartRate:(NSNumber *)heartRate systolicPressure:(NSNumber *)systolicPressure diastolicPressure:(NSNumber *)diastolicPressure note:(NSString *)note image:(UPImage *)image
{
UPCardiacEvent *event = [[UPCardiacEvent alloc] init];
+20
View File
@@ -0,0 +1,20 @@
//
// UPDefines.h
// UPPlatformSDK
//
// Created by Andy Roth on 5/5/14.
// Copyright (c) 2014 Jawbone. All rights reserved.
//
#ifndef UPPlatformSDK_UPDefines_h
#define UPPlatformSDK_UPDefines_h
#define UP_TARGET_OSX (!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#if UP_TARGET_OSX
#define UPImage NSImage
#else
#define UPImage UIImage
#endif
#endif
@@ -64,7 +64,7 @@ typedef void(^UPGenericEventAPICompletion)(UPGenericEvent *event, UPURLResponse
* @param note Description of the event.
* @param image Image to include in the event.
*/
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UIImage *)image;
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UPImage *)image;
/**
* Create a new generic event with supplied parameters for the currently authenticated user.
@@ -100,6 +100,6 @@ typedef void(^UPGenericEventAPICompletion)(UPGenericEvent *event, UPURLResponse
/**
* Event image.
*/
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) UPImage *image;
@end
@@ -50,7 +50,7 @@ static NSString *kGenericEventType = @"generic_events";
@implementation UPGenericEvent
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UIImage *)image
+ (UPGenericEvent *)eventWithTitle:(NSString *)title verb:(NSString *)verb attributes:(NSDictionary *)attributes note:(NSString *)note image:(UPImage *)image
{
UPGenericEvent *event = [[UPGenericEvent alloc] init];
+16 -1
View File
@@ -62,6 +62,16 @@ typedef void(^UPMealAPICompletion)(UPMeal *meal, UPURLResponse *response, NSErro
@end
/**
* The available sub types of a meal.
*/
typedef NS_ENUM(NSUInteger, UPMealSubType)
{
UPMealSubTypeBreakfast = 1,
UPMealSubTypeLunch = 2,
UPMealSubTypeDinner = 3
};
/**
* Represents a single meal, consisting of multiple meal items.
*/
@@ -130,13 +140,18 @@ typedef void(^UPMealAPICompletion)(UPMeal *meal, UPURLResponse *response, NSErro
/**
* The photo for the meal.
*/
@property (nonatomic, strong) UIImage *photo;
@property (nonatomic, strong) UPImage *photo;
/**
* The photo URL for the meal.
*/
@property (nonatomic, strong) NSString *photoURL;
/**
* The sub type of the meal.
*/
@property (nonatomic, assign) UPMealSubType subType;
@end
/**
+3 -1
View File
@@ -130,6 +130,7 @@ static NSString *kMealType = @"meals";
self.foodCount = [details numberForKey:@"num_foods"];
self.drinkCount = [details numberForKey:@"num_drinks"];
self.title = [dictionary stringForKey:@"note"];
self.subType = [[dictionary numberForKey:@"sub_type"] integerValue];
if ([dictionary stringForKey:@"image"].length > 0) self.photoURL = [NSString stringWithFormat:@"%@%@", [UPPlatform basePlatformURL], [dictionary stringForKey:@"image"]];
UPMealNutritionInfo *nutrition = [[UPMealNutritionInfo alloc] init];
@@ -162,6 +163,7 @@ static NSString *kMealType = @"meals";
if (self.placeLongitude != nil) [dict setObject:self.self.placeLongitude forKey:@"place_lon"];
if (self.placeAccuracy != nil) [dict setObject:self.placeAccuracy forKey:@"place_acc"];
if (self.photoURL != nil) [dict setObject:self.photoURL forKey:@"image_url"];
if (self.subType != 0) [dict setObject:@(self.subType) forKey:@"sub_type"];
if (self.items.count > 0)
{
@@ -180,7 +182,7 @@ static NSString *kMealType = @"meals";
- (NSString *)description
{
return [NSString stringWithFormat:@"UPMeal: { xid: %@, title: %@, date: %@, placeName: %@, placeLatitude: %@, placeLongitude: %@, placeAccuracy: %@, foodCount: %@, drinkCount: %@, photoURL: %@, overallNutritionInfo: %@, items: %@ }", self.xid, self.title, self.date, self.placeName, self.placeLatitude, self.placeLongitude, self.placeAccuracy, self.foodCount, self.drinkCount, self.photoURL, self.overallNutritionInfo, self.items];
return [NSString stringWithFormat:@"UPMeal: { xid: %@, title: %@, date: %@, placeName: %@, placeLatitude: %@, placeLongitude: %@, placeAccuracy: %@, foodCount: %@, drinkCount: %@, photoURL: %@, subType: %@, overallNutritionInfo: %@, items: %@ }", self.xid, self.title, self.date, self.placeName, self.placeLatitude, self.placeLongitude, self.placeAccuracy, self.foodCount, self.drinkCount, self.photoURL, @(self.subType), self.overallNutritionInfo, self.items];
}
@end
+1 -1
View File
@@ -81,7 +81,7 @@ static NSString *kMoveType = @"moves";
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:move.graphImageURL]];
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
#if UP_TARGET_OSX
NSImage *image = [[NSImage alloc] initWithData:imageData];
#else
UIImage *image = [UIImage imageWithData:imageData];
+36 -1
View File
@@ -8,6 +8,12 @@
#import <Foundation/Foundation.h>
#import "UPDefines.h"
#if UP_TARGET_OSX
#import <WebKit/WebKit.h>
#endif
extern NSString * const kUPPlatformDefaultRedirectURI;
@class UPSession, UPURLRequest, UPURLResponse;
@@ -100,9 +106,38 @@ typedef void(^UPPlatformRequestCompletion)(UPURLRequest *request, UPURLResponse
*/
- (void)validateSessionWithCompletion:(UPPlatformSessionCompletion)completion;
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
/**
* Refreshes the current access token.
*/
- (void)refreshAccessTokenWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret completion:(UPPlatformSessionCompletion)completion;
#if UP_TARGET_OSX
/**
* Starts a user's session.
*
* This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
* An existing WebView can be provided, or one will be created in a new window if nil is provided.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param webView An existing WebView to perform authentication. Will create a new window with a single WebView if nil.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret webView:(WebView *)webView completion:(UPPlatformSessionCompletion)completion;
/**
* Starts a user's session.
*
* This will present a WebView to perform the OAuth authentication flow, taking care of getting access token for HTTP requests.
* An existing WebView can be provided, or one will be created in a new window if nil is provided.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param webView An existing WebView to perform authentication. Will create a new window with a single WebView if nil.
* @param authScope Options to request specific auth scopes during authentication. Defaults to UPPlatformAuthScopeBasicRead.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret webView:(WebView *)webView authScope:(UPPlatformAuthScope)authScope completion:(UPPlatformSessionCompletion)completion;
#else
+130 -16
View File
@@ -17,6 +17,7 @@
NSString * const kUPPlatformDefaultRedirectURI = @"up-platform://redirect";
NSString * const kUPKeychainAccountKey = @"com.jawbone.up";
NSString * const kUPKeychainTokenServiceKey = @"com.jawbone.up.api_token";
NSString * const kUPKeychainRefreshTokenServiceKey = @"com.jawbone.up.refresh_token";
#pragma mark - Keychain
@@ -29,7 +30,7 @@ NSString * const kUPKeychainTokenServiceKey = @"com.jawbone.up.api_token
#pragma mark - Platform
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#if !UP_TARGET_OSX
@interface UPPlatform () <UPAuthViewControllerDelegate>
#else
@interface UPPlatform () <NSWindowDelegate>
@@ -43,7 +44,7 @@ NSString * const kUPKeychainTokenServiceKey = @"com.jawbone.up.api_token
@property (nonatomic, copy) UPPlatformSessionCompletion sessionCompletion;
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#if !UP_TARGET_OSX
@property (nonatomic, strong) UPAuthViewController *authViewController;
#else
@property (nonatomic, strong) NSWindow *authWindow;
@@ -104,6 +105,16 @@ static UPPlatform *_instance = nil;
[UPKeychain setKeychainItem:token forServiceKey:kUPKeychainTokenServiceKey];
}
- (NSString *)refreshToken
{
return [UPKeychain keychainItemForService:kUPKeychainRefreshTokenServiceKey];
}
- (void)setRefreshToken:(NSString *)token
{
[UPKeychain setKeychainItem:token forServiceKey:kUPKeychainRefreshTokenServiceKey];
}
- (void)validateSessionWithCompletion:(UPPlatformSessionCompletion)completion
{
if (self.currentSession == nil)
@@ -118,14 +129,62 @@ static UPPlatform *_instance = nil;
{
[self endCurrentSession];
}
else if (user != nil)
{
self.currentSession.currentUser = user;
}
self.currentSession.currentUser = user;
if (completion) completion(self.currentSession, error);
}];
}
}
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
- (void)refreshAccessTokenWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret completion:(UPPlatformSessionCompletion)completion
{
NSString *refreshToken = [self refreshToken];
if (refreshToken == nil)
{
NSError *error = [NSError errorWithDomain:@"com.jawbone.up" code:0 userInfo:@{ NSLocalizedDescriptionKey : @"No refresh token found. Cannot refresh the current access token." }];
if (completion) completion(nil, error);
return;
}
NSDictionary *params = @{ @"grant_type" : @"refresh_token", @"refresh_token" : refreshToken, @"client_id" : clientID, @"client_secret" : clientSecret };
NSString *refreshURLString = [NSString stringWithFormat:@"%@/auth/oauth2/token", [UPPlatform basePlatformURL]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:refreshURLString]];
request.HTTPMethod = @"post";
NSMutableArray *paramStrings = [NSMutableArray array];
for (NSString *key in params.allKeys)
{
[paramStrings addObject:[NSString stringWithFormat:@"%@=%@", key, params[key]]];
}
NSString *fullParamString = [paramStrings componentsJoinedByString:@";"];
request.HTTPBody = [fullParamString dataUsingEncoding:NSUTF8StringEncoding];
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
if (error == nil && data.length)
{
NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSString *authToken = responseJSON[@"access_token"];
NSString *refreshToken = responseJSON[@"refresh_token"];
[self setExistingAuthToken:authToken];
[self setRefreshToken:refreshToken];
self.currentSession = [[UPSession alloc] initWithToken:authToken];
completion(self.currentSession, nil);
}
else
{
completion(nil, error);
}
}];
}
#if UP_TARGET_OSX
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret webView:(WebView *)webView completion:(UPPlatformSessionCompletion)completion
{
@@ -165,6 +224,7 @@ static UPPlatform *_instance = nil;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:authURLString]];
request.HTTPShouldHandleCookies = NO;
[webView setFrameLoadDelegate:self];
[webView setPolicyDelegate:self];
[webView.mainFrame loadRequest:request];
}
@@ -190,8 +250,11 @@ static UPPlatform *_instance = nil;
{
NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSString *authToken = responseJSON[@"access_token"];
NSString *refreshToken = responseJSON[@"refresh_token"];
[self setExistingAuthToken:authToken];
[self setRefreshToken:refreshToken];
self.currentSession = [[UPSession alloc] initWithToken:authToken];
self.sessionCompletion(self.currentSession, nil);
}
@@ -203,10 +266,26 @@ static UPPlatform *_instance = nil;
}
}
- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request
frame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener
{
if ([request.URL.scheme isEqualToString:@"up-platform"])
{
[listener ignore];
}
else
{
[listener use];
}
}
- (BOOL)windowShouldClose:(id)sender
{
self.authWindow = nil;
self.sessionCompletion(nil, [NSError errorWithDomain:@"com.jawbone.up" code:0 userInfo:@{ NSLocalizedDescriptionKey : @"Authentication canceled by user." }]);
return YES;
}
@@ -247,7 +326,9 @@ static UPPlatform *_instance = nil;
- (void)endCurrentSession
{
[UPKeychain setKeychainItem:nil forServiceKey:kUPKeychainTokenServiceKey];
[UPKeychain setKeychainItem:@"" forServiceKey:kUPKeychainTokenServiceKey];
[UPKeychain setKeychainItem:@"" forServiceKey:kUPKeychainRefreshTokenServiceKey];
self.currentSession = nil;
}
@@ -279,7 +360,7 @@ static UPPlatform *_instance = nil;
#pragma mark - Auth View Controller Delegate
#if !(!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR)
#if !UP_TARGET_OSX
- (void)authViewController:(UPAuthViewController *)viewController didCompleteWithAuthCode:(NSString *)code
{
@@ -291,8 +372,11 @@ static UPPlatform *_instance = nil;
{
NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSString *authToken = responseJSON[@"access_token"];
NSString *refreshToken = responseJSON[@"refresh_token"];
[self setExistingAuthToken:authToken];
[self setRefreshToken:refreshToken];
self.currentSession = [[UPSession alloc] initWithToken:authToken];
self.sessionCompletion(self.currentSession, nil);
}
@@ -300,6 +384,8 @@ static UPPlatform *_instance = nil;
{
self.sessionCompletion(nil, error);
}
self.authViewController = nil;
}];
}
@@ -383,20 +469,40 @@ static UPPlatform *_instance = nil;
+ (NSString *)keychainItemForService:(NSString *)serviceKey
{
return [self keychainItemForService:serviceKey returnNilIfEmpty:YES];
}
+ (NSString *)keychainItemForService:(NSString *)serviceKey returnNilIfEmpty:(BOOL)returnNilIfEmpty
{
id account = kUPKeychainAccountKey;
id service = serviceKey;
#if !UP_TARGET_OSX
account = [account dataUsingEncoding:NSUTF8StringEncoding];
service = [service dataUsingEncoding:NSUTF8StringEncoding];
#endif
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
dictionary[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;
dictionary[(__bridge id)kSecAttrAccount] = [kUPKeychainAccountKey dataUsingEncoding:NSUTF8StringEncoding];
dictionary[(__bridge id)kSecAttrService] = [serviceKey dataUsingEncoding:NSUTF8StringEncoding];
dictionary[(__bridge id)kSecAttrAccount] = account;
dictionary[(__bridge id)kSecAttrService] = service;
dictionary[(__bridge id)kSecMatchLimit] = (__bridge id)kSecMatchLimitOne;
dictionary[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue;
CFDataRef cfResult = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)dictionary, (CFTypeRef *)&cfResult);
NSData *result = (__bridge_transfer NSData *)cfResult;
CFTypeRef cfResult = NULL;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)dictionary, &cfResult);
if (status == errSecSuccess && result != nil)
if (status == errSecSuccess && cfResult != NULL)
{
return [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding];
NSData *result = (__bridge_transfer NSData *)cfResult;
NSString *resultString = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding];
if (returnNilIfEmpty)
{
return resultString.length > 0 ? resultString : nil;
}
return resultString;
}
return nil;
@@ -404,13 +510,21 @@ static UPPlatform *_instance = nil;
+ (void)setKeychainItem:(NSString *)item forServiceKey:(NSString *)serviceKey
{
id account = kUPKeychainAccountKey;
id service = serviceKey;
#if !UP_TARGET_OSX
account = [account dataUsingEncoding:NSUTF8StringEncoding];
service = [service dataUsingEncoding:NSUTF8StringEncoding];
#endif
NSMutableDictionary *existingItemDictionary = [NSMutableDictionary dictionary];
existingItemDictionary[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;
existingItemDictionary[(__bridge id)kSecAttrAccount] = [kUPKeychainAccountKey dataUsingEncoding:NSUTF8StringEncoding];
existingItemDictionary[(__bridge id)kSecAttrService] = [serviceKey dataUsingEncoding:NSUTF8StringEncoding];
existingItemDictionary[(__bridge id)kSecAttrAccount] = account;
existingItemDictionary[(__bridge id)kSecAttrService] = service;
NSString *oldItem = [self keychainItemForService:serviceKey];
NSString *oldItem = [self keychainItemForService:serviceKey returnNilIfEmpty:NO];
if (item == nil)
{
if (oldItem != nil)
+5
View File
@@ -27,4 +27,9 @@
return self;
}
- (NSString *)description
{
return [NSString stringWithFormat:@"UPSession: { authenticationToken: %@ }", self.authenticationToken];
}
@end
+1 -1
View File
@@ -94,7 +94,7 @@ static NSString *kSleepType = @"sleeps";
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:sleep.graphImageURL]];
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
#if UP_TARGET_OSX
NSImage *image = [[NSImage alloc] initWithData:imageData];
#else
UIImage *image = [UIImage imageWithData:imageData];
+3 -1
View File
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
#import "UPDefines.h"
/**
* The base URLRequest object that contains the necessary headers for OAuth.
*/
@@ -44,6 +46,6 @@
* @param params A dictionary of paramters to send with the request.
* @param image An image to post along with the params.
*/
+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)endpoint params:(NSDictionary *)params image:(UIImage *)image;
+ (UPURLRequest *)postRequestWithEndpoint:(NSString *)endpoint params:(NSDictionary *)params image:(UPImage *)image;
@end

Some files were not shown because too many files have changed in this diff Show More