Skip to content

Commit

Permalink
fix warnings, add comments for isAuthenticated etc
Browse files Browse the repository at this point in the history
  • Loading branch information
idokleinman committed Apr 7, 2016
1 parent ba767ae commit 3401f7d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Example/Spark-SDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/* Begin PBXBuildFile section */
505D19071B58330F002CF2B7 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 505D19061B58330F002CF2B7 /* Tests.m */; };
5061151C1C20C22E00E468B1 /* CHANGELOG.md in Sources */ = {isa = PBXBuildFile; fileRef = 5061151B1C20C22E00E468B1 /* CHANGELOG.md */; };
506976E01B0BF96C0057355B /* Spark-SDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 506976DF1B0BF96C0057355B /* Spark-SDK.h */; };
506976E31B0BF97C0057355B /* SparkCloud.h in Headers */ = {isa = PBXBuildFile; fileRef = 506976E11B0BF97C0057355B /* SparkCloud.h */; };
506976E41B0BF97C0057355B /* SparkDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 506976E21B0BF97C0057355B /* SparkDevice.h */; };
Expand Down Expand Up @@ -384,7 +383,6 @@
6003F59E195388D20070C39A /* SparkAppDelegate.m in Sources */,
6003F5A7195388D20070C39A /* SparkViewController.m in Sources */,
6003F59A195388D20070C39A /* main.m in Sources */,
5061151C1C20C22E00E468B1 /* CHANGELOG.md in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/Helpers/KeychainItemWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ - (id)initWithIdentifier: (NSString *)identifier accessGroup:(NSString *) access

CFMutableDictionaryRef outDictionary = NULL;

if (!SecItemCopyMatching((__bridge CFDictionaryRef)tempQuery, (CFTypeRef *)&outDictionary) == noErr)
if (!(SecItemCopyMatching((__bridge CFDictionaryRef)tempQuery, (CFTypeRef *)&outDictionary) == noErr))
{
// Stick these default values into keychain item if nothing found.
[self resetKeychainItem];
Expand Down
14 changes: 13 additions & 1 deletion Pod/Classes/SDK/SparkCloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,27 @@ extern NSString *const kSparkAPIBaseURL;
* Currently logged in user name, nil if no valid session
*/
@property (nonatomic, strong, nullable, readonly) NSString* loggedInUsername;
@property (nonatomic, readonly) BOOL isLoggedIn DEPRECATED_ATTRIBUTE;
/**
* Currently logged in via app - deprecated
*/
@property (nonatomic, readonly) BOOL isLoggedIn __deprecated_msg("Use isAuthenticated instead");
/**
* Currently authenticated (does a access token exist?)
*/
@property (nonatomic, readonly) BOOL isAuthenticated;

/**
* Current session access token string, nil if not logged in
*/
@property (nonatomic, strong, nullable, readonly) NSString *accessToken;

/**
* OAuthClientId unique for your app, use 'particle' for development or generate your OAuth creds for production apps (https://docs.particle.io/reference/api/#create-an-oauth-client)
*/
@property (nonatomic, null_resettable, strong) NSString *OAuthClientId;
/**
* OAuthClientSecret unique for your app, use 'particle' for development or generate your OAuth creds for production apps (https://docs.particle.io/reference/api/#create-an-oauth-client)
*/
@property (nonatomic, null_resettable, strong) NSString *OAuthClientSecret;

/**
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/SDK/SparkSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ @interface SparkSession()

@property (nonatomic, strong) NSDate *expiryDate;
@property (nonatomic, strong) NSTimer *expiryTimer;
@property (nonatomic, strong, readwrite) NSString *accessToken;
@property (nonatomic, strong, nullable, readwrite) NSString *accessToken;
@property (nonatomic, nullable, strong, readwrite) NSString *refreshToken;
@property (nonatomic, strong, nullable, readwrite) NSString *username;

Expand Down

0 comments on commit 3401f7d

Please sign in to comment.