Skip to content

Commit

Permalink
Renames "Passive" profile to "Adaptive". Adds new "Rough" profile whi…
Browse files Browse the repository at this point in the history
…ch will only use significant location updates and region monitoring. Adds method to create a session given an access token.
  • Loading branch information
aaronpk committed Jun 28, 2012
1 parent f0108c4 commit 55746ea
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 106 deletions.
5 changes: 3 additions & 2 deletions GeoloqiSDK/LQSDKVersion.h
Expand Up @@ -5,8 +5,9 @@
// Copyright (c) 2012 Geoloqi, Inc. All rights reserved.
//

static NSString *const LQSDKNameString = @"com.geoloqi.iphone";

static NSString *const LQSDKVersionString = @"12.134";
static NSString *const LQSDKVersionString = @"12.160";

// This build string is automatically updated when the sdk is built! Do not modify.
static NSString *const LQSDKVersionGitVersion = @"df5ae7c4745f0bdf64404733bfc5d1678f701552";
static NSString *const LQSDKVersionGitVersion = @"79b2524207766577f2e84c2ca93a8366b22d9011";
6 changes: 6 additions & 0 deletions GeoloqiSDK/LQSession.h
Expand Up @@ -94,6 +94,12 @@ typedef enum {
extra:(NSDictionary *)extraData
completion:(void (^)(LQSession *session, NSError *error))block;

/**
* Creates an LQSession object given an existing access token that is stored in
* some sort of permanent storage on the phone or an external API.
*/
+ (LQSession *)sessionWithAccessToken:(NSString *)inAccessToken;

//Read this if you need to send the access token off to another api
@property (nonatomic, strong, readonly) NSString *accessToken;
@property (nonatomic, strong, readonly) NSString *userID;
Expand Down
11 changes: 9 additions & 2 deletions GeoloqiSDK/LQTracker.h
Expand Up @@ -26,20 +26,27 @@ typedef enum {
If the network drops out and reconnects, no data is lost.
*/
LQTrackerProfilePassive = 1,
LQTrackerProfileAdaptive = 1,

/*
The highest quality data available.
Data is batched on the device, then submitted to the server later.
If the network drops out and reconnects, no data is lost.
*/
LQTrackerProfileLogging = 2, // --available in v2
LQTrackerProfileLogging = 2,

/*
The highest quality, most real-time data available.
Data is transmitted as soon as possible with low-latency networking.
Old updates may be dropped as they are no longer relevant. (after N minutes)
*/
LQTrackerProfileRealtime = 3, // --available in v2
LQTrackerProfileRealtime = 3,

/*
Only gathers "rough" location data, useful to get city or neighborhood-level accuracy.
Will only use the "significant location" mode available in iOS, and never turn GPS on.
*/
LQTrackerProfileRough = 4,

} LQTrackerProfile;

Expand Down
Binary file modified GeoloqiSDK/libGeoloqi-Debug.a
Binary file not shown.
Binary file modified GeoloqiSDK/libGeoloqi-Release.a
Binary file not shown.
11 changes: 6 additions & 5 deletions TrackerSample/TrackerSample/TrackerSampleViewController.m
Expand Up @@ -98,8 +98,9 @@ - (int)segmentIndexForTrackingProfile:(LQTrackerProfile)profile
{
switch(profile) {
case LQTrackerProfileOff: return 0;
case LQTrackerProfilePassive: return 1;
case LQTrackerProfileRealtime: return 2;
case LQTrackerProfileRough: return 1;
case LQTrackerProfileAdaptive: return 2;
case LQTrackerProfileRealtime: return 3;
case LQTrackerProfileLogging: return 3;
}
}
Expand All @@ -108,9 +109,9 @@ - (LQTrackerProfile)profileForSegmentIndex:(int)index
{
switch(index) {
case 0: return LQTrackerProfileOff;
case 1: return LQTrackerProfilePassive;
case 2: return LQTrackerProfileRealtime;
case 3: return LQTrackerProfileLogging;
case 1: return LQTrackerProfileRough;
case 2: return LQTrackerProfileAdaptive;
case 3: return LQTrackerProfileRealtime;
default: return LQTrackerProfileOff;
}
}
Expand Down
102 changes: 5 additions & 97 deletions TrackerSample/TrackerSample/en.lproj/TrackerSampleViewController.xib
Expand Up @@ -48,7 +48,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{214, 10}, {98, 37}}</string>
<reference key="NSSuperview" ref="836499879"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="646705957"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
Expand Down Expand Up @@ -84,7 +83,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{16, 35}, {55, 20}}</string>
<reference key="NSSuperview" ref="836499879"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="682429326"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
Expand Down Expand Up @@ -116,7 +114,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{77, 35}, {60, 20}}</string>
<reference key="NSSuperview" ref="836499879"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="508605825"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -137,7 +134,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{143, 35}, {61, 20}}</string>
<reference key="NSSuperview" ref="836499879"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="580599594"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -158,7 +154,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 55}, {304, 66}}</string>
<reference key="NSSuperview" ref="836499879"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="284904412"/>
<string key="NSReuseIdentifierKey">_NS:639</string>
<object class="NSColor" key="IBUIBackgroundColor" id="263158299">
Expand Down Expand Up @@ -191,7 +186,6 @@
</array>
<string key="NSFrame">{{0, 92}, {320, 127}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1069313036"/>
<string key="NSReuseIdentifierKey">_NS:196</string>
<object class="NSColor" key="IBUIBackgroundColor">
Expand All @@ -205,7 +199,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 54}, {304, 30}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="836499879"/>
<string key="NSReuseIdentifierKey">_NS:273</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -215,9 +208,9 @@
<int key="IBSelectedSegmentIndex">0</int>
<array key="IBSegmentTitles">
<string>Off</string>
<string>Passive</string>
<string>Rough</string>
<string>Adaptive</string>
<string>Realtime</string>
<string>Logging</string>
</array>
<array class="NSMutableArray" key="IBSegmentWidths">
<real value="0.0"/>
Expand Down Expand Up @@ -249,7 +242,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 21}, {119, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="633452810"/>
<string key="NSReuseIdentifierKey">_NS:328</string>
<bool key="IBUIOpaque">NO</bool>
Expand Down Expand Up @@ -280,7 +272,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 98}, {266, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="907983167"/>
<string key="NSReuseIdentifierKey">_NS:328</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -301,7 +292,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 237}, {266, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="268468793"/>
<string key="NSReuseIdentifierKey">_NS:328</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -322,7 +312,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{194, 230}, {116, 37}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="275119659"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
Expand All @@ -344,7 +334,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 265}, {302, 46}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="987244129"/>
<string key="NSReuseIdentifierKey">_NS:328</string>
<bool key="IBUIOpaque">NO</bool>
Expand Down Expand Up @@ -373,7 +362,6 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{167, 238}, {20, 20}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1051385784"/>
<string key="NSReuseIdentifierKey">_NS:1030</string>
<bool key="IBUIOpaque">NO</bool>
Expand All @@ -387,7 +375,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{8, 319}, {302, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
Expand All @@ -405,7 +393,6 @@
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="163095055"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">10</int>
Expand Down Expand Up @@ -721,86 +708,7 @@ AAgACAAIAAEAAQABAAE</bytes>
<nil key="sourceID"/>
<int key="maxID">51</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">TrackerSampleViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="getLocationButtonWasTapped:">UIButton</string>
<string key="registerForPushWasTapped:">UIButton</string>
<string key="trackingProfileWasTapped:">UISegmentedControl</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="getLocationButtonWasTapped:">
<string key="name">getLocationButtonWasTapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="registerForPushWasTapped:">
<string key="name">registerForPushWasTapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="trackingProfileWasTapped:">
<string key="name">trackingProfileWasTapped:</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="currentLatLngLabel">UILabel</string>
<string key="currentLocationActivityIndicator">UIActivityIndicatorView</string>
<string key="currentLocationField">UILabel</string>
<string key="currentTrackingProfile">UISegmentedControl</string>
<string key="pushNotificationAlerts">UIButton</string>
<string key="pushNotificationBadges">UIButton</string>
<string key="pushNotificationSounds">UIButton</string>
<string key="pushNotificationStatus">UITextView</string>
<string key="registerForPushButton">UIButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="currentLatLngLabel">
<string key="name">currentLatLngLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="currentLocationActivityIndicator">
<string key="name">currentLocationActivityIndicator</string>
<string key="candidateClassName">UIActivityIndicatorView</string>
</object>
<object class="IBToOneOutletInfo" key="currentLocationField">
<string key="name">currentLocationField</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="currentTrackingProfile">
<string key="name">currentTrackingProfile</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="pushNotificationAlerts">
<string key="name">pushNotificationAlerts</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="pushNotificationBadges">
<string key="name">pushNotificationBadges</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="pushNotificationSounds">
<string key="name">pushNotificationSounds</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="pushNotificationStatus">
<string key="name">pushNotificationStatus</string>
<string key="candidateClassName">UITextView</string>
</object>
<object class="IBToOneOutletInfo" key="registerForPushButton">
<string key="name">registerForPushButton</string>
<string key="candidateClassName">UIButton</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/TrackerSampleViewController.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
Expand Down

0 comments on commit 55746ea

Please sign in to comment.