14 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
63 changed files with 195 additions and 333 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-19)</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 -19
View File
@@ -239,10 +239,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -255,11 +251,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -280,10 +271,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -296,11 +283,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -330,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-19)</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-19)</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 -28
View File
@@ -499,10 +499,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -515,11 +511,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -540,10 +531,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -556,11 +543,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -581,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>
@@ -597,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>
@@ -631,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-19)</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-19)</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 -28
View File
@@ -597,10 +597,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -613,11 +609,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -638,10 +629,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -654,11 +641,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -679,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>
@@ -695,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>
@@ -729,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-19)</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-19)</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 -28
View File
@@ -526,10 +526,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -542,11 +538,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -567,10 +558,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -583,11 +570,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -608,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>
@@ -624,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>
@@ -658,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-19)</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-19)</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 -28
View File
@@ -629,10 +629,6 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -645,11 +641,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>The API type of the event, used by the events API.</p>
</div>
@@ -670,10 +661,6 @@ This can be used for generic messaging, or events that are specific to 3rd party
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -686,11 +673,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>Decodes an object from a JSON dictionary.</p>
</div>
@@ -711,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>
@@ -727,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>
@@ -761,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-19)</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-19)</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 -28
View File
@@ -924,10 +924,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -940,11 +936,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -965,10 +956,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -981,11 +968,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -1006,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>
@@ -1022,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>
@@ -1056,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-19)</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-19)</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
@@ -845,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-19)</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-19)</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 -28
View File
@@ -328,10 +328,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -344,11 +340,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -369,10 +360,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -385,11 +372,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -410,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>
@@ -426,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>
@@ -460,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-19)</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-19)</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 -19
View File
@@ -698,10 +698,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -714,11 +710,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -739,10 +730,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -755,11 +742,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -789,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-19)</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-19)</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-19)</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-19)</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-19)</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 -28
View File
@@ -843,10 +843,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -859,11 +855,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -884,10 +875,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -900,11 +887,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -925,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>
@@ -941,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>
@@ -975,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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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 -28
View File
@@ -603,10 +603,6 @@
<div class="method-subsection brief-description">
<p>The API type of the event, used by the events API.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
@@ -619,11 +615,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The API type of the event, used by the events API.</p>
</div>
@@ -644,10 +635,6 @@
<div class="method-subsection brief-description">
<p>Decodes an object from a JSON dictionary.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
@@ -660,11 +647,6 @@
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Decodes an object from a JSON dictionary.</p>
</div>
@@ -685,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>
@@ -701,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>
@@ -735,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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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>
@@ -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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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-19)</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
@@ -188,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-19)</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
@@ -166,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-19)</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>
@@ -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
@@ -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" */;
@@ -733,10 +733,6 @@
1FE2964518D24C100047F094 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
i386,
);
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "arm64 armv7 armv7s i386";
@@ -746,10 +742,6 @@
1FE2964618D24C100047F094 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
i386,
);
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "arm64 armv7 armv7s i386";
};
@@ -762,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",
@@ -790,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 = (
@@ -822,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,7 +13,7 @@
@interface UPAuthViewController () <UIWebViewDelegate>
@property (nonatomic, weak) id<UPAuthViewControllerDelegate> delegate;
@property (nonatomic, weak) id<UPAuthViewControllerDelegate> authDelegate;
@property (nonatomic, strong) UIViewController *rootViewController;
@property (nonatomic, strong) UIWebView *webView;
@@ -35,7 +35,7 @@
if (self)
{
self.authURL = url;
self.delegate = delegate;
self.authDelegate = delegate;
// Setup the auth view
UIWindow *keyWindow = [UIApplication sharedApplication].delegate.window;
@@ -51,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];
@@ -80,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 +101,7 @@
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
@@ -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
/**
+46 -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,14 +385,32 @@ 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
{
@@ -420,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)
+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,