Skip to content

Commit

Permalink
Update to version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
damoclarke committed Aug 3, 2016
1 parent 44b5efb commit 2f23347
Show file tree
Hide file tree
Showing 42 changed files with 2,373 additions and 632 deletions.
13 changes: 6 additions & 7 deletions BlueCatsSDK.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BlueCatsSDK'
s.version = '0.6.7'
s.version = '2.0.0'
s.license = {
:type => 'Commercial',
:text => <<-LICENSE
Expand All @@ -14,15 +14,14 @@ Pod::Spec.new do |s|
s.summary = 'BlueCatsSDK for micro-location.'
s.homepage = 'http://www.bluecats.com'
s.authors = { 'BlueCats' => 'theteam@bluecats.com' }
s.source = { :git => 'https://github.com/bluecats/bluecats-ios-sdk.git', :tag => '0.6.7' }
s.source = { :git => 'https://github.com/bluecats/bluecats-ios-sdk.git', :tag => '2.0.0' }
s.platform = :ios, '7.0'
s.source_files = 'Headers/*.h'
s.preserve_paths = 'libBlueCatsSDK.a'
s.library = 'BlueCatsSDK'

s.public_header_files = 'Headers/*.h'
s.source_files = ['Headers/*.h']
s.vendored_libraries = 'libBlueCatsSDK.a'
s.requires_arc = true
s.ios.deployment_target = '7.0'
s.frameworks = 'SystemConfiguration', 'CoreBluetooth', 'MobileCoreServices', 'CoreGraphics', 'CoreLocation', 'AdSupport', 'CoreData'

s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/BlueCatsSDK/"' }
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/BlueCatsSDK/"', 'OTHER_LDFLAGS' => '$(inherited) "-ObjC"'}
end
41 changes: 40 additions & 1 deletion Headers/BCAddress.h 100644 → 100755
Expand Up @@ -9,29 +9,68 @@
#import "BCJSONModel.h"
@class CLLocation;

///The `BCAddress` class defines an object that represents a physical address.
@interface BCAddress : BCJSONModel <NSCopying>

///@name Address Properties

///The resource ID.
@property (nonatomic, copy) NSString *addressID;
///Line one of the street address.
@property (nonatomic, copy) NSString *streetLine1;
///Line two of the street address.
@property (nonatomic, copy) NSString *streetLine2;
///The name of the City.
@property (nonatomic, copy) NSString *cityName;
///State abbreviation.
@property (nonatomic, copy) NSString *stateAbbrev;
///Postal code.
@property (nonatomic, copy) NSString *postalCode;
///Country name.
@property (nonatomic, copy) NSString *countryName;
///The latitude of the address.
@property (nonatomic, copy) NSNumber *latitude;
///The longitude of the address.
@property (nonatomic, copy) NSNumber *longitude;
///`BOOL` option to use coordinates rather than address. `YES` lat-log is used; `NO` address is used.
@property (nonatomic, assign) BOOL useLatLong;

///@name Creating an Address
/**
* Returns a address object defined by the specified parameters.
*
* @param streetLine1 Line one of the street address.
* @param streetLine2 Line two of the street address.
* @param cityName Address city.
* @param stateAbbrev State abbreviation.
* @param postalCode Postal code.
* @param countryName Name of the country.
*
* @return A `BCAddress` object created from specified address information.
*/
+ (BCAddress *)addressWithStreetLine1:(NSString *)streetLine1
streetLine2:(NSString *)streetLine2
cityName:(NSString *)cityName
stateAbbrev:(NSString *)stateAbbrev
postalCode:(NSString *)postalCode
andCountryName:(NSString *)countryName;

/**
* Returns a address object defined by the specified coordinates.
*
* @param latitude Latitude.
* @param longitude Longitude.
*
* @return A `BCAddress` object with the provided latitude, longitude and useLatLong set to `YES`.
*/
+ (BCAddress *)addressWithLatitude:(NSNumber *)latitude
andLongitude:(NSNumber *)longitude;

///@name Getting a CoreLocation Object
/**
* Returns a `CoreLocation` object representing the address.
*
* @return `CoreLocation` object representing the address.
*/
- (CLLocation *)location;

@end
34 changes: 11 additions & 23 deletions Headers/BCApp.h 100644 → 100755
Expand Up @@ -7,38 +7,26 @@
//

#import "BCJSONModel.h"
#import "BCBeaconDataSource.h"

@class BCPlatformType;

@interface BCApp : BCJSONModel<BCBeaconDataSource>
///The `BCApp` class defines an object that represents a mobile application.
@interface BCApp : BCJSONModel

///@name App Properties

///The resource ID.
@property (nonatomic, copy) NSString *appID;
///The team ID of the team containing the app.
@property (nonatomic, copy) NSString *teamID;
///The name of the app.
@property (nonatomic, copy) NSString *name;
///The iTunes URL of the app if provided.
@property (nonatomic, copy) NSString *iTunesURL;
///
@property (nonatomic, copy) NSString *packageName;
///The app platform type.
@property (nonatomic, strong) BCPlatformType *platformType;
///The app icon URL.
@property (nonatomic, copy) NSString *appIconURL;

- (void)copyApiPropertiesFromApp:(BCApp *)app;

#pragma mark - BCBeaconDataSource

- (NSDate *)cachedBeaconsAt;
- (NSArray *)cachedBeacons;
- (BOOL)hasBeaconsCacheExpired;

- (NSDate *)cachedSitesAt;
- (NSArray *)cachedSites;
- (BOOL)hasSitesCacheExpired;

- (void)getBeaconsWithSuccess:(void (^)(NSArray *))success
failure:(void (^)(NSError *))failure
preferCached:(BOOL)preferCached;

- (void)getSitesWithSuccess:(void (^)(NSArray *))success
failure:(void (^)(NSError *))failure
preferCached:(BOOL)preferCached;

@end
174 changes: 174 additions & 0 deletions Headers/BCBeacon+Analytics.h
@@ -0,0 +1,174 @@
//
// BCBeacon+Analytics.h
// BlueCatsSDK
//
// Created by Cody Singleton on 11/15/15.
// Copyright © 2015 BlueCats. All rights reserved.
//

#import "BCBeacon.h"

@interface BCBeacon (Analytics)

//@name Analytics Methods
/**
* Issues an asynchronous request to get the number of visits to the beacon for the current day with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsTodayWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon for the previous day with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsYesterdayWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon for the current week with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsThisWeekWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon for the previous week with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/- (void)numberOfVisitsLastWeekWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon for the current month with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsThisMonthWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon for the previous month with success and failure blocks.
*
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsLastMonthWithSuccess:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon since the specified date with success and failure blocks.
*
* @param date The date from which to determine the number of beacon visits.
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsSinceDate:(NSDate *)date
success:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon until the specified date with success and failure blocks.
*
* @param date The date up until which to determine the number of beacon visits.
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsUntilDate:(NSDate *)date
success:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;
/**
* Issues an asynchronous request to get the number of visits to the beacon between the specified dates with success and failure blocks.
*
* @param startDate The initial date from which to determine the number of beacon visits.
* @param endDate The final date from which to determine the number of beacon visits.
* @param success The block object to be executed when the request operation finishes successfully.
*
* The block has no return value and takes one argument:
*
* `visitCount` | The number of visits.
*
* @param failure The block object to be executed when the task finishes unsuccessfully.
*
* The block has no return value and takes one argument:
*
* `error` | The error.
*/
- (void)numberOfVisitsFromDate:(NSDate *)startDate untilDate:(NSDate *)endDate
success:(void (^)(NSUInteger visitCount))success
failure:(void (^)(NSError *error))failure;

@end
16 changes: 16 additions & 0 deletions Headers/BCBeacon+Capabilities.h
@@ -0,0 +1,16 @@
//
// BCBeacon+Capabilities.h
// BlueCatsSDK
//
// Created by Cody Singleton on 4/13/15.
// Copyright (c) 2015 BlueCats. All rights reserved.
//

#import "BCBeacon.h"

@interface BCBeacon (Capabilities)

- (BOOL)isTargetSpeedEditable;
- (BOOL)supportsTemperatureData;

@end

0 comments on commit 2f23347

Please sign in to comment.