From 96120d37d099f9609176b44d60de61da82ba0f16 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Fri, 10 Jun 2016 19:53:20 -0700 Subject: [PATCH] Use accessToken across the module --- .gitignore | 1 + iphone/Classes/TiAccountkitModule.m | 16 ++++++---------- .../UserInterfaceState.xcuserstate | Bin 20192 -> 0 bytes 3 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 iphone/ti.accountkit.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/.gitignore b/.gitignore index 737eb13..d813ecd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ iphone/build +/iphone/ti.accountkit.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/iphone/Classes/TiAccountkitModule.m b/iphone/Classes/TiAccountkitModule.m index bc8d5b7..7be5656 100644 --- a/iphone/Classes/TiAccountkitModule.m +++ b/iphone/Classes/TiAccountkitModule.m @@ -133,13 +133,7 @@ - (void)cancelLogin:(id)unused - (void)currentAccessToken { - return @{ - @"accountID": [[accountKit currentAccessToken] accountID], - @"applicationID": [[accountKit currentAccessToken] applicationID], - @"lastRefresh": [[accountKit currentAccessToken] lastRefresh], - @"tokenRefreshInterval": NUMDOUBLE([[accountKit currentAccessToken] tokenRefreshInterval]), - @"tokenString": [[accountKit currentAccessToken] tokenString], - }; + return [self dictionaryFromAccessToken:[accountKit currentAccessToken]]; } - (NSString*)graphVersion @@ -193,9 +187,11 @@ - (void)viewController:(UIViewController *)viewController did - (NSDictionary*)dictionaryFromAccessToken:(id)accessToken { return @{ - @"accountID": [accessToken accountID], - @"applicationID": [accessToken applicationID], - @"lastRefresh": [accessToken lastRefresh], + @"accountID": [accessToken accountID], + @"applicationID": [accessToken applicationID], + @"lastRefresh": [accessToken lastRefresh], + @"tokenRefreshInterval": NUMDOUBLE([accessToken tokenRefreshInterval]), + @"tokenString": [accessToken tokenString] }; } diff --git a/iphone/ti.accountkit.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate b/iphone/ti.accountkit.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 66d9ebcc647c82b2d74c0c81f2c755ac62c2da8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20192 zcmdsf33!vm*8j{q?;D^%NlR(dY)wc@TiT}C+t4;m$}WpQq3o2j4JFVvB}su&z&mVZ2W|rTaIWy&BM?uuiu25WJ5tiy>o z3HQLsI0dKUY;4E9a1PGJdDwyT@gO`H55Yt6I6NLtz!R|-Ps7u31+K(Z*oW)zTs#lY z$9Lhy_-?!eKa5x6NAN2AINpRe<1Kg(-i!C){rCm^B7Oak--eZ5Qb%>OcWE%sF?&t!)TcdM$cq21}2xuV;oFAGl&_?3}MDHsb%Icb<85>4(3kgL1sDg5VL|=$E;^IFdLbj%r0g(^EC4;bBuY8InKPv zoM1j=K4Ly*&M@bgFPJZx^UPI(2qp|6ge4r2kana!=|Cb#N79MJk~ktG@kC3~NIJ$phpe zvVyE4kCJ-QKsJz#WDD6!c918@G4dRFp1eR_BrlPd$t&bla)x|DJ|&-#v*dGfj(kDB zBwvy9+# zhwaba#13JHvXj_ib~5W`OW0DjjGe|#XJ@c}b}l=QozLFFQg$JGH+w(3f_<2Mj9tra zVz;w<*uCsN_9*)-dyIXReU1GG`ziYwdzSs2J;#2*e#w5to@c*ie_;RM+H)PaE?hS* zmW$&QTmq-#61g5+I+wv2IV;zTb8rP*KW;ELge&Ama+A1XZZhZQJlrg9Hdo8d;p(`# z+&peRcMG?eyPI3W-NP;8R&uMk25tklk=w#;<+gE8a=W>wxo5d!+;iOX+zZ?Z?j(1L zdy6~Gy~};Xea3yweZzgr{lxvu{lfjhU6l|?2T6paizH4Wlf+B3lI{}SsKlz8ii(q{ z1ByT$Q76;|MUNg@sGshs4UB`&Mu{#;EUj<{0u87$ilhuB4M>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