19 Commits

Author SHA1 Message Date
Andrew Marin 80ba32587b Update UPPlatform project and framework
* Fix ambiguity with 'delegate' property of UPAuthViewController so it does not clash with UINavigationController's 'delegate'

* Update project settings to Xcode recommendations

* Generate updated Framework
2016-02-24 17:12:49 -08:00
andrew-marin 14152201e1 Merge pull request #38 from hlung/master
Fix -dismissViewControllerAnimated:
2015-12-15 12:35:15 -08:00
Hlung 66011533ab Fix -dismissViewControllerAnimated: should not be called on self.rootViewController 2015-12-11 18:42:37 +07:00
Andrew Marin 4a944b772e - Add sleepDuration and eatUnsaturatedFat properties to UPTrend
- Format fix for method signatures
- Update UPPlatform.framework
2015-05-07 11:53:30 -07:00
andrew-marin 12c328cfc6 Merge pull request #26 from xinsight/add-viewcontroller-param
add presenting view controller parameter
2015-04-30 17:23:33 -07:00
andrew-marin 0537858c47 Merge pull request #28 from xinsight/fix-auth-navbar-ios7
use barTintColor if available
2015-04-30 17:12:43 -07:00
andrew-marin 11d34fb41f Merge pull request #27 from xinsight/fix-no-network
avoid exception: skip parse of nil data
2015-04-30 17:09:05 -07:00
Jay Moore 38f852adea use barTintColor if available 2014-09-10 15:47:29 -04:00
Jay Moore 5bc70dd48f avoid exception: skip parse of nil data 2014-09-10 15:00:28 -04:00
Jay Moore 459ea6d7a6 add presenting view controller parameter 2014-09-10 08:18:50 -04:00
rothacr d28f0ddfdd Update podspec 2014-06-13 15:56:31 -07:00
rothacr 221c8e51d1 Rebuild framework and docs 2014-06-13 15:53:21 -07:00
rothacr ba75a19029 Fix #19: Get logged in user when starting new sessions 2014-06-13 15:52:49 -07:00
rothacr 6adefd8d4a Add latest podspec 2014-05-20 09:59:44 -07:00
rothacr fff87ce621 Fix framework build target 2014-05-19 14:06:48 -07:00
rothacr f8d1f305d5 Add subtype param to meal items 2014-05-19 13:55:03 -07:00
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
69 changed files with 583 additions and 149 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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -563,10 +563,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -579,11 +575,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -613,7 +604,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -661,10 +661,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -677,11 +673,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -711,7 +702,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -590,10 +590,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -606,11 +602,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -640,7 +631,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -693,10 +693,6 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -709,11 +705,6 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -743,7 +734,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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -988,10 +988,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -1004,11 +1000,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -1038,7 +1029,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+52 -1
View File
@@ -55,6 +55,8 @@
<option value="//api/name/servingType">&nbsp;&nbsp;&nbsp;&nbsp;servingType</option>
<option value="//api/name/subType">&nbsp;&nbsp;&nbsp;&nbsp;subType</option>
@@ -111,6 +113,8 @@
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/servingType">servingType</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/subType">subType</a></span></li>
</ul></li>
@@ -227,6 +231,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><li>
<span class="tooltip">
<code><a href="#//api/name/category">&nbsp;&nbsp;category</a></code>
@@ -592,6 +602,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 item (food or drink).</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) UPMealItemSubType subType</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The sub type of the meal item (food or drink).</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 />
@@ -794,7 +845,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -392,10 +392,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -408,11 +404,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -442,7 +433,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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
@@ -1116,7 +1116,7 @@ An existing WebView can be provided, or one will be created in a new window if n
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -907,10 +907,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -923,11 +919,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -957,7 +948,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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
@@ -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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
+1 -10
View File
@@ -667,10 +667,6 @@
<div class="method-subsection brief-description">
<p>Encodes an object to a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
@@ -683,11 +679,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Encodes an object to a JSON dictionary.</p>
</div>
@@ -717,7 +708,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
@@ -0,0 +1,264 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UPMealItemSubType 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">UPMealItemSubType 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="UPMealItemSubType 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">UPMealItemSubType 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">UPMealItemSubType</h3>
<div class="section section-overview">
<p>The available sub types of a meal item.</p>
</div>
<div class="section">
<!-- display enum values -->
<h4 class="method-subtitle">Definition</h4>
<code>typedef NS_ENUM(NSUInteger, UPMealItemSubType ) {<br/>
&nbsp;&nbsp; <a href="">UPMealItemSubTypeDrink</a> = 1,<br/>
&nbsp;&nbsp; <a href="">UPMealItemSubTypeFood</a> = 2,<br/>
};</code>
</div>
<div class="section section-methods">
<h4 class="method-subtitle">Constants</h4>
<dl class="termdef">
<dt><a name="" title="UPMealItemSubTypeDrink"></a><code>UPMealItemSubTypeDrink</code></dt>
<dd>
<p>The available sub types of a meal item.</p>
<p>
Declared In <code class="declared-in-ref">UPMealAPI.h</code>.
</p>
</dd>
<dt><a name="" title="UPMealItemSubTypeFood"></a><code>UPMealItemSubTypeFood</code></dt>
<dd>
<p>The available sub types of a meal item.</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-06-13)</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>
@@ -180,7 +180,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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
@@ -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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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-05-05)</span><br />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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/UPMealItemSubType.html">UPMealItemSubType</a></li>
<li><a href="Constants/UPMealSubType.html">UPMealSubType</a></li>
<li><a href="Constants/UPMoodType.html">UPMoodType</a></li>
@@ -186,7 +188,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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/UPMealItemSubType.html">UPMealItemSubType</a></li>
<li><a href="Constants/UPMealSubType.html">UPMealSubType</a></li>
<li><a href="Constants/UPMoodType.html">UPMoodType</a></li>
@@ -164,7 +166,7 @@
<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 />
<p><span class="copyright">&copy; 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</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="5056" 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"/>
@@ -502,6 +502,23 @@
</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>
@@ -63,6 +63,12 @@
}];
}
- (void)logout
{
[[UPPlatform sharedPlatform] endCurrentSession];
[self.navigationController popToRootViewControllerAnimated:YES];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.row)
@@ -90,6 +96,10 @@
case 5:
[self refreshToken];
break;
case 6:
[self logout];
break;
default:
break;
@@ -10,8 +10,8 @@
#import "UP.h"
NSString *const kAPIExplorerID = @"3ZYR1YjGd3Q";
NSString *const kAPIExplorerSecret = @"4dd5b10b3a3a16dbf3082c86d5faff09e11a682b";
NSString *const kAPIExplorerID = @"pHekFTFd7qA";
NSString *const kAPIExplorerSecret = @"93ff020364207ebe820c4215c8f3a694b1b4ff63";
@interface JBLandingViewController ()
@@ -37,6 +37,7 @@ NSString *const kAPIExplorerSecret = @"4dd5b10b3a3a16dbf3082c86d5faff09e11a682b"
if (session != nil)
{
NSLog(@"Continued session for %@ %@", session.currentUser.firstName, session.currentUser.lastName);
[self performSegueWithIdentifier:@"LoggedIn" sender:nil];
}
}];
@@ -55,6 +56,7 @@ NSString *const kAPIExplorerSecret = @"4dd5b10b3a3a16dbf3082c86d5faff09e11a682b"
if (session != nil)
{
NSLog(@"Started session for %@ %@", session.currentUser.firstName, session.currentUser.lastName);
[self performSegueWithIdentifier:@"LoggedIn" sender:nil];
}
else
Binary file not shown.
@@ -25,7 +25,7 @@
@interface UPAuthViewController : UINavigationController
- (id)initWithURL:(NSURL *)url delegate:(id<UPAuthViewControllerDelegate>)delegate;
- (void)show;
- (void)presentWithViewController:(UIViewController *)presentingViewController;
@end
#endif
@@ -269,6 +269,15 @@ typedef NS_ENUM(NSUInteger, UPMealItemFoodType)
UPMealItemFoodTypePersonal = 4
};
/**
* The available sub types of a meal item.
*/
typedef NS_ENUM(NSUInteger, UPMealItemSubType)
{
UPMealItemSubTypeDrink = 1,
UPMealItemSubTypeFood = 2
};
/**
* A single item making up a portion of a meal.
*/
@@ -317,6 +326,11 @@ typedef NS_ENUM(NSUInteger, UPMealItemFoodType)
*/
@property (nonatomic, assign) UPMealItemFoodType foodType;
/**
* The sub type of the meal item (food or drink).
*/
@property (nonatomic, assign) UPMealItemSubType subType;
/**
* The category of the meal item.
*/
@@ -178,6 +178,20 @@ typedef void(^UPPlatformRequestCompletion)(UPURLRequest *request, UPURLResponse
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI completion:(UPPlatformSessionCompletion)completion;
/**
* Starts a user's session.
*
* This will present a UIWebView to perform the OAuth authentication flow, taking care of getting the access token for HTTP requests.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param authScope Options to request specific auth scopes during authentication. Defaults to UPPlatformAuthScopeBasicRead.
* @param redirectURI An alternate redirect URI used during authentication. This is not common.
* @param presentingViewController View controller to present authentication view controller. Uses the window root view controller if nil.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI presentingViewController:(UIViewController *)presentingViewController completion:(UPPlatformSessionCompletion)completion;
#endif
/**
@@ -269,6 +269,11 @@ typedef NS_ENUM(NSUInteger, UPUserGender)
*/
@property (nonatomic, strong) NSNumber *sleepTimeAwake;
/**
* Total number of seconds of sleep during the sleep period
*/
@property (nonatomic, strong) NSNumber *sleepDuration;
/**
* The user's protein eaten.
*/
@@ -284,6 +289,11 @@ typedef NS_ENUM(NSUInteger, UPUserGender)
*/
@property (nonatomic, strong) NSNumber *eatSaturatedFat;
/**
* The user's unsaturated fat eaten.
*/
@property (nonatomic, strong) NSNumber *eatUnsaturatedFat;
/**
* The user's calories eaten.
*/
Binary file not shown.
+17
View File
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = "UPPlatformSDK"
s.version = "1.1.5"
s.summary = "Jawbone's UP Platform SDK."
s.homepage = "https://github.com/Jawbone/UPPlatform_iOS_SDK"
s.license = { :type => 'Apache', :file => 'LICENSE' }
s.author = { "Andy Roth" => "aroth@jawbone.com" }
s.source = {
:git => "https://github.com/Jawbone/UPPlatform_iOS_SDK.git",
:tag => "v1.1.5"
}
s.platform = :ios, '7.0'
s.source_files = 'UPPlatformSDK/UPPlatformSDK/*.{h,m}'
s.requires_arc = true
end
@@ -541,7 +541,7 @@
E3E46BF817173670009CCA56 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = Jawbone;
};
buildConfigurationList = E3E46BFB17173670009CCA56 /* Build configuration list for PBXProject "UPPlatformSDK" */;
@@ -703,6 +703,7 @@
DSTROOT = /tmp/UPPlatformSDK.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "UPPlatformSDK/UPPlatformSDK-Prefix.pch";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-ObjC";
PRIVATE_HEADERS_FOLDER_PATH = Private;
PRODUCT_NAME = UPPlatform;
@@ -732,7 +733,9 @@
1FE2964518D24C100047F094 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "arm64 armv7 armv7s i386";
};
name = Debug;
};
@@ -740,6 +743,7 @@
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "arm64 armv7 armv7s i386";
};
name = Release;
};
@@ -750,6 +754,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SYSTEM_APPS_DIR)/Xcode5-DP.app/Contents/Developer/Library/Frameworks",
@@ -778,6 +783,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -810,6 +816,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -25,7 +25,7 @@
@interface UPAuthViewController : UINavigationController
- (id)initWithURL:(NSURL *)url delegate:(id<UPAuthViewControllerDelegate>)delegate;
- (void)show;
- (void)presentWithViewController:(UIViewController *)presentingViewController;
@end
#endif
@@ -13,9 +13,8 @@
@interface UPAuthViewController () <UIWebViewDelegate>
@property (nonatomic, weak) id<UPAuthViewControllerDelegate> delegate;
@property (nonatomic, weak) id<UPAuthViewControllerDelegate> authDelegate;
@property (nonatomic, strong) UIViewController *contentViewController;
@property (nonatomic, strong) UIViewController *rootViewController;
@property (nonatomic, strong) UIWebView *webView;
@property (nonatomic, strong) NSURL *authURL;
@@ -36,7 +35,7 @@
if (self)
{
self.authURL = url;
self.delegate = delegate;
self.authDelegate = delegate;
// Setup the auth view
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
@@ -52,8 +51,13 @@
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationBar.tintColor = [UIColor darkGrayColor];
UIColor *barColor = [UIColor darkGrayColor];
if ([self.navigationBar respondsToSelector:@selector(setBarTintColor:)]) {
self.navigationBar.barTintColor = barColor;
} else {
self.navigationBar.tintColor = barColor;
}
self.navigationBar.translucent = NO;
[self pushViewController:[[UIViewController alloc] init] animated:NO];
@@ -81,9 +85,13 @@
self.webView.backgroundColor = [UIColor whiteColor];
}
- (void)show
- (void)presentWithViewController:(UIViewController *)presentingViewController;
{
[self.rootViewController presentViewController:self animated:YES completion:^{
if (presentingViewController == nil) {
presentingViewController = self.rootViewController;
}
[presentingViewController presentViewController:self animated:YES completion:^{
[self.webView loadRequest:[NSURLRequest requestWithURL:self.authURL]];
}];
}
@@ -92,7 +100,8 @@
{
if (self.isHiding) return;
self.isHiding = YES;
[self.rootViewController dismissViewControllerAnimated:YES completion:^{
[self dismissViewControllerAnimated:YES completion:^{
if (completion) completion();
}];
}
@@ -100,7 +109,7 @@
- (void)cancel
{
[self hideWithCompletion:^{
[self.delegate authViewControllerDidCancel:self];
[self.authDelegate authViewControllerDidCancel:self];
}];
}
@@ -132,7 +141,7 @@
NSString *code = [query stringByReplacingOccurrencesOfString:@"code=" withString:@""];
[self hideWithCompletion:nil];
[self.delegate authViewController:self didCompleteWithAuthCode:code];
[self.authDelegate authViewController:self didCompleteWithAuthCode:code];
return NO;
}
@@ -143,7 +152,7 @@
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
[self hideWithCompletion:nil];
[self.delegate authViewController:self didFailWithError:error];
[self.authDelegate authViewController:self didFailWithError:error];
}
@end
+14
View File
@@ -269,6 +269,15 @@ typedef NS_ENUM(NSUInteger, UPMealItemFoodType)
UPMealItemFoodTypePersonal = 4
};
/**
* The available sub types of a meal item.
*/
typedef NS_ENUM(NSUInteger, UPMealItemSubType)
{
UPMealItemSubTypeDrink = 1,
UPMealItemSubTypeFood = 2
};
/**
* A single item making up a portion of a meal.
*/
@@ -317,6 +326,11 @@ typedef NS_ENUM(NSUInteger, UPMealItemFoodType)
*/
@property (nonatomic, assign) UPMealItemFoodType foodType;
/**
* The sub type of the meal item (food or drink).
*/
@property (nonatomic, assign) UPMealItemSubType subType;
/**
* The category of the meal item.
*/
+4 -2
View File
@@ -266,7 +266,8 @@ static NSString *kMealType = @"meals";
self.amount = [dictionary numberForKey:@"amount"];
self.measurementUnits = [dictionary stringForKey:@"measurement"];
self.servingType = [self servingTypeFromString:[dictionary stringForKey:@"type"]];
self.foodType = [[dictionary numberForKey:@"sub_type"] intValue];
self.foodType = [[dictionary numberForKey:@"food_type"] intValue];
self.subType = [[dictionary numberForKey:@"sub_type"] intValue];
self.category = [dictionary stringForKey:@"category"];
UPMealNutritionInfo *nutrition = [[UPMealNutritionInfo alloc] init];
@@ -284,6 +285,7 @@ static NSString *kMealType = @"meals";
if (self.measurementUnits != nil) [dictionary setObject:self.measurementUnits forKey:@"measurement"];
if (self.servingType != 0) [dictionary setObject:@(self.servingType) forKey:@"type"];
if (self.foodType != 0) [dictionary setObject:@(self.foodType) forKey:@"food_type"];
if (self.subType != 0) [dictionary setObject:@(self.subType) forKey:@"sub_type"];
if (self.category != nil) [dictionary setObject:self.category forKey:@"category"];
if (self.nutritionInfo != nil) [dictionary addEntriesFromDictionary:[self.nutritionInfo encodeToDictionary]];
@@ -302,7 +304,7 @@ static NSString *kMealType = @"meals";
- (NSString *)description
{
return [NSString stringWithFormat:@"UPMealItem: { name: %@, itemDescription: %@, amount: %@, measurementUnits: %@, servingType: %d, foodType: %d, category: %@, nutritionInfo: %@ }", self.name, self.itemDescription, self.amount, self.measurementUnits, (int)self.servingType, (int)self.foodType, self.category, self.nutritionInfo ];
return [NSString stringWithFormat:@"UPMealItem: { name: %@, itemDescription: %@, amount: %@, measurementUnits: %@, servingType: %d, foodType: %d, subType: %d, category: %@, nutritionInfo: %@ }", self.name, self.itemDescription, self.amount, self.measurementUnits, (int)self.servingType, (int)self.foodType, (int)self.subType, self.category, self.nutritionInfo ];
}
@end
+14
View File
@@ -178,6 +178,20 @@ typedef void(^UPPlatformRequestCompletion)(UPURLRequest *request, UPURLResponse
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI completion:(UPPlatformSessionCompletion)completion;
/**
* Starts a user's session.
*
* This will present a UIWebView to perform the OAuth authentication flow, taking care of getting the access token for HTTP requests.
*
* @param clientID The client ID provided during application signup.
* @param clientSecret The client secret provided during application signup.
* @param authScope Options to request specific auth scopes during authentication. Defaults to UPPlatformAuthScopeBasicRead.
* @param redirectURI An alternate redirect URI used during authentication. This is not common.
* @param presentingViewController View controller to present authentication view controller. Uses the window root view controller if nil.
* @param completion The session completion block.
*/
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI presentingViewController:(UIViewController *)presentingViewController completion:(UPPlatformSessionCompletion)completion;
#endif
/**
+48 -9
View File
@@ -302,6 +302,11 @@ decisionListener:(id<WebPolicyDecisionListener>)listener
}
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI completion:(UPPlatformSessionCompletion)completion
{
[self startSessionWithClientID:clientID clientSecret:clientSecret authScope:authScope redirectURI:redirectURI presentingViewController:nil completion:completion];
}
- (void)startSessionWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret authScope:(UPPlatformAuthScope)authScope redirectURI:(NSString *)redirectURI presentingViewController:(UIViewController *)presentingViewController completion:(UPPlatformSessionCompletion)completion
{
self.sessionCompletion = completion;
self.clientID = clientID;
@@ -311,7 +316,16 @@ decisionListener:(id<WebPolicyDecisionListener>)listener
if (token != nil)
{
self.currentSession = [[UPSession alloc] initWithToken:token];
self.sessionCompletion(self.currentSession, nil);
[UPUserAPI getCurrentUserWithCompletion:^(UPUser *user, UPURLResponse *response, NSError *error) {
if (user != nil)
{
self.currentSession.currentUser = user;
}
self.sessionCompletion(self.currentSession, nil);
}];
return;
}
@@ -319,7 +333,7 @@ decisionListener:(id<WebPolicyDecisionListener>)listener
NSMutableString *authURLString = [NSMutableString stringWithFormat:@"%@/auth/oauth2/auth?response_type=code&client_id=%@&scope=%@&redirect_uri=%@", [UPPlatform basePlatformURL], self.clientID, [self stringFromAuthScope:authScope], redirectURI];
self.authViewController = [[UPAuthViewController alloc] initWithURL:[NSURL URLWithString:authURLString] delegate:self];
[self.authViewController show];
[self.authViewController presentWithViewController:presentingViewController];
}
#endif
@@ -371,19 +385,39 @@ decisionListener:(id<WebPolicyDecisionListener>)listener
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];
self.sessionCompletion(self.currentSession, nil);
NSString *jsonError = responseJSON[@"error"];
if (jsonError.length == 0)
{
NSString *authToken = responseJSON[@"access_token"];
NSString *refreshToken = responseJSON[@"refresh_token"];
[self setExistingAuthToken:authToken];
[self setRefreshToken:refreshToken];
self.currentSession = [[UPSession alloc] initWithToken:authToken];
[UPUserAPI getCurrentUserWithCompletion:^(UPUser *user, UPURLResponse *response, NSError *error) {
if (user != nil)
{
self.currentSession.currentUser = user;
}
self.sessionCompletion(self.currentSession, nil);
}];
}
else
{
NSString *errorDescription = responseJSON[@"error_description"];
self.sessionCompletion(nil, [NSError errorWithDomain:@"com.jawbone.up" code:0 userInfo:@{ NSLocalizedDescriptionKey : errorDescription }]);
}
}
else
{
self.sessionCompletion(nil, error);
}
self.authViewController = nil;
}];
}
@@ -418,6 +452,11 @@ decisionListener:(id<WebPolicyDecisionListener>)listener
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *urlResponse, NSData *data, NSError *error) {
if (data == nil) { // no network
completion(request, nil, error);
return;
}
NSDictionary *jsonResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
if (self.enableNetworkLogging)
+3 -1
View File
@@ -71,7 +71,9 @@ NSString const *APIMultipartBoundary = @"t5abJf886c95bfexhOzryaoq2xuedO34ru8osiq
NSData *imageData = nil;
#if UP_TARGET_OSX
imageData = image.TIFFRepresentation;
CGImageRef cgImage = [image CGImageForProposedRect:NULL context:nil hints:nil];
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithCGImage:cgImage];
imageData = [bitmap representationUsingType:NSPNGFileType properties:nil];
#else
imageData = UIImageJPEGRepresentation(image, 1.0f);
#endif
+10
View File
@@ -269,6 +269,11 @@ typedef NS_ENUM(NSUInteger, UPUserGender)
*/
@property (nonatomic, strong) NSNumber *sleepTimeAwake;
/**
* Total number of seconds of sleep during the sleep period
*/
@property (nonatomic, strong) NSNumber *sleepDuration;
/**
* The user's protein eaten.
*/
@@ -284,6 +289,11 @@ typedef NS_ENUM(NSUInteger, UPUserGender)
*/
@property (nonatomic, strong) NSNumber *eatSaturatedFat;
/**
* The user's unsaturated fat eaten.
*/
@property (nonatomic, strong) NSNumber *eatUnsaturatedFat;
/**
* The user's calories eaten.
*/
+6
View File
@@ -247,9 +247,11 @@
self.sleepAwake = [values numberForKey:@"s_awake"];
self.sleepTimeAsleep = [values numberForKey:@"s_asleep_time"];
self.sleepTimeAwake = [values numberForKey:@"s_awake_time"];
self.sleepDuration = [values numberForKey:@"s_duration"];
self.eatProtein = [values numberForKey:@"e_protein"];
self.eatCalcium = [values numberForKey:@"e_calcium"];
self.eatSaturatedFat = [values numberForKey:@"e_sat_fat"];
self.eatUnsaturatedFat = [values numberForKey:@"e_unsat_fat"];
self.eatCalories = [values numberForKey:@"e_calories"];
self.eatSodium = [values numberForKey:@"e_sodium"];
self.eatSugar = [values numberForKey:@"e_sugar"];
@@ -279,9 +281,11 @@
"sleepAwake: %@, " \
"sleepTimeAsleep: %@, " \
"sleepTimeAwake: %@, " \
"sleepDuration: %@, " \
"eatProtein: %@, " \
"eatCalcium: %@, " \
"eatSaturatedFat: %@, " \
"eatUnSaturatedFat: %@, " \
"eatCalories: %@, " \
"eatSodium: %@, " \
"eatSugar: %@, " \
@@ -303,9 +307,11 @@
self.sleepAwake,
self.sleepTimeAsleep,
self.sleepTimeAwake,
self.sleepDuration,
self.eatProtein,
self.eatCalcium,
self.eatSaturatedFat,
self.eatUnsaturatedFat,
self.eatCalories,
self.eatSodium,
self.eatSugar,