diff --git a/Analytics/Classes/Internal/SEGBluetooth.h b/Analytics/Classes/Internal/SEGBluetooth.h deleted file mode 100644 index dc8891d4a..000000000 --- a/Analytics/Classes/Internal/SEGBluetooth.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - - -@interface SEGBluetooth : NSObject - -- (BOOL)hasKnownState; -- (BOOL)isEnabled; - -@end diff --git a/Analytics/Classes/Internal/SEGBluetooth.m b/Analytics/Classes/Internal/SEGBluetooth.m deleted file mode 100644 index 034e9f78a..000000000 --- a/Analytics/Classes/Internal/SEGBluetooth.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "SEGBluetooth.h" -#import - - -@interface SEGBluetooth () - -@property (nonatomic, strong) CBCentralManager *manager; -@property (nonatomic, strong) dispatch_queue_t queue; - -@end - - -@implementation SEGBluetooth - -- (id)init -{ - if (self = [super init]) { - _queue = dispatch_queue_create("io.segment.bluetooth.queue", NULL); - _manager = [[CBCentralManager alloc] initWithDelegate:self - queue:_queue - options:@{ CBCentralManagerOptionShowPowerAlertKey : @NO }]; - } - return self; -} - -- (BOOL)hasKnownState -{ - return _manager && (_manager.state != CBCentralManagerStateUnknown); -} - -- (BOOL)isEnabled -{ - return _manager.state == CBCentralManagerStatePoweredOn; -} - -- (void)centralManagerDidUpdateState:(id)central {} -@end diff --git a/Analytics/Classes/Internal/SEGSegmentIntegration.m b/Analytics/Classes/Internal/SEGSegmentIntegration.m index 2ee5c64d3..b3ff4c01c 100644 --- a/Analytics/Classes/Internal/SEGSegmentIntegration.m +++ b/Analytics/Classes/Internal/SEGSegmentIntegration.m @@ -4,7 +4,6 @@ #import "SEGAnalytics.h" #import "SEGAnalyticsUtils.h" #import "SEGSegmentIntegration.h" -#import "SEGBluetooth.h" #import "SEGReachability.h" #import "SEGLocation.h" #import "SEGHTTPClient.h" @@ -65,7 +64,6 @@ @interface SEGSegmentIntegration () @property (nonatomic, strong) NSDictionary *cachedStaticContext; @property (nonatomic, strong) NSURLSessionUploadTask *batchRequest; @property (nonatomic, assign) UIBackgroundTaskIdentifier flushTaskID; -@property (nonatomic, strong) SEGBluetooth *bluetooth; @property (nonatomic, strong) SEGReachability *reachability; @property (nonatomic, strong) SEGLocation *location; @property (nonatomic, strong) NSTimer *flushTimer; @@ -99,9 +97,6 @@ - (id)initWithAnalytics:(SEGAnalytics *)analytics self.httpClient = analytics.httpClient; self.apiURL = [NSURL URLWithString:@"https://api.segment.io/v1/import"]; self.userId = [self getUserId]; - if (self.configuration.shouldUseBluetooth) { - self.bluetooth = [[SEGBluetooth alloc] init]; - } self.reachability = [SEGReachability reachabilityWithHostname:@"google.com"]; [self.reachability startNotifier]; self.cachedStaticContext = [self staticContext]; @@ -238,9 +233,6 @@ - (NSDictionary *)liveContext context[@"network"] = ({ NSMutableDictionary *network = [[NSMutableDictionary alloc] init]; - if (self.bluetooth && self.bluetooth.hasKnownState) - network[@"bluetooth"] = @(self.bluetooth.isEnabled); - if (self.reachability.isReachable) { network[@"wifi"] = @(self.reachability.isReachableViaWiFi); network[@"cellular"] = @(self.reachability.isReachableViaWWAN); diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index d39b2ef93..172bd95fd 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -34,7 +34,6 @@ 1312A7D381C51428CF481E33E3D37901 /* EXPMatchers+beGreaterThan.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3730436AC4ABC10EF92B5B7C812A29 /* EXPMatchers+beGreaterThan.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 131532787AD40BE1F35DF288D2E6FFD7 /* EXPMatchers+beInTheRangeOf.h in Headers */ = {isa = PBXBuildFile; fileRef = F0A6E7712EE7079CCB700403D0302CED /* EXPMatchers+beInTheRangeOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13D86F035E8027D8C1D6747A90384D90 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76EB4CD09AE6155F0067DA38D97869E3 /* ExampleGroup.swift */; }; - 1506857073C82B36917FBB4F9CF01068 /* SEGBluetooth.m in Sources */ = {isa = PBXBuildFile; fileRef = D829E368118B61FFA584C01DF74C0B67 /* SEGBluetooth.m */; }; 15A7217C749314E8423F3C36A99BAF7A /* LSHTTPStubURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 114CF0E3D2F6B9F63D0D69A29C2151A9 /* LSHTTPStubURLProtocol.h */; settings = {ATTRIBUTES = (Project, ); }; }; 1605F8488EA2281B38AAFED554B9DD9C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F68984A71C488CFBF3D3D9AF14B9722A /* Foundation.framework */; }; 16325200AF77954D55A5F9F56A6433F5 /* LSRegexMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = E1FFB2553B1635BF0923307D5FF83B35 /* LSRegexMatcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; @@ -317,7 +316,6 @@ FD2D4497BC41412128C2D87C1BDE7398 /* EXPMatchers+beginWith.h in Headers */ = {isa = PBXBuildFile; fileRef = 053393948F3161A51B8A6378D073114B /* EXPMatchers+beginWith.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE8E34356D24F6759A8B010ED2F5707B /* EXPMatchers+raiseWithReason.m in Sources */ = {isa = PBXBuildFile; fileRef = 93B82198EDE1CF667457807112592E22 /* EXPMatchers+raiseWithReason.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; FF0366DFC597745127A6D92AB83F0D60 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92F002E417B53C1BA0E8EF0ED35CCD2D /* BeIdenticalTo.swift */; }; - FFE7215A5741457A29C202637D96182E /* SEGBluetooth.h in Headers */ = {isa = PBXBuildFile; fileRef = C91FB89B7A8EC27E012D80F6791CD14E /* SEGBluetooth.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -655,13 +653,11 @@ C8A0D75C33BE150DA62CD8DB1B2E4941 /* SEGAnalytics.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = SEGAnalytics.m; sourceTree = ""; }; C8C4618A13416C3249A9E1991FE5F5B8 /* Specta-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Specta-umbrella.h"; sourceTree = ""; }; C8D4FAFBB2941D65FFD1D889DC556C12 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - C91FB89B7A8EC27E012D80F6791CD14E /* SEGBluetooth.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = SEGBluetooth.h; sourceTree = ""; }; C95FC0E1E5C1F4056F6D19ED03108E9F /* UIViewController+SEGScreen.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SEGScreen.m"; sourceTree = ""; }; CAC3C34C25AFBD15E66DAAD6AAC10332 /* SEGSegmentIntegrationFactory.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = SEGSegmentIntegrationFactory.m; sourceTree = ""; }; D411383BA4C19E8F7F0A6DD1DD96070A /* EXPMatchers+beGreaterThanOrEqualTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beGreaterThanOrEqualTo.m"; path = "Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m"; sourceTree = ""; }; D567475377AEB18BA2C066BC79A3B8CA /* SPTGlobalBeforeAfterEach.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SPTGlobalBeforeAfterEach.h; path = Specta/Specta/SPTGlobalBeforeAfterEach.h; sourceTree = ""; }; D58CFF72C9AC39E1705408655E912787 /* ExpectaObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ExpectaObject.h; path = Expecta/ExpectaObject.h; sourceTree = ""; }; - D829E368118B61FFA584C01DF74C0B67 /* SEGBluetooth.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = SEGBluetooth.m; sourceTree = ""; }; D8F53ED18C86031D791E7F5800323117 /* SPTCallSite.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SPTCallSite.h; path = Specta/Specta/SPTCallSite.h; sourceTree = ""; }; D9B88F78DCC30320B400A7DD656E337E /* Pods-Analytics_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Analytics_Example.release.xcconfig"; sourceTree = ""; }; D9C3F42CF3A06C1E082C7CCC116DE867 /* Pods-Analytics_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Analytics_Example.debug.xcconfig"; sourceTree = ""; }; @@ -873,8 +869,6 @@ F6483E5A4C32F0B2EF01B13781DDF053 /* NSData+SEGGZIP.m */, 2877CEC45417EE0FA8C0860CDB81E406 /* SEGAnalyticsUtils.h */, E9685D775719CFF07A71008E3254E248 /* SEGAnalyticsUtils.m */, - C91FB89B7A8EC27E012D80F6791CD14E /* SEGBluetooth.h */, - D829E368118B61FFA584C01DF74C0B67 /* SEGBluetooth.m */, E3FEC101C287C9FF2F6A85EA5E5FE737 /* SEGFileStorage.h */, 6FEE332359D52339B0C29B2B7BA6DE1D /* SEGFileStorage.m */, 18B74443611FA38FDF357B94FE71B117 /* SEGHTTPClient.h */, @@ -1394,7 +1388,6 @@ 122C9B689949F35D5A262CC83DB61B74 /* SEGAliasPayload.h in Headers */, DB6D2821AB7CBFD6172F5B056B433817 /* SEGAnalytics.h in Headers */, 2474E0A98C87052E42D94530502284FC /* SEGAnalyticsUtils.h in Headers */, - FFE7215A5741457A29C202637D96182E /* SEGBluetooth.h in Headers */, 2CF2E077B4AF5A7FAB68FC48CEBB67B3 /* SEGCrypto.h in Headers */, 809B6E1B7AE17AA0960F34C7E7B6FA7F /* SEGFileStorage.h in Headers */, F959A6CF53615062E807298586D58C7E /* SEGGroupPayload.h in Headers */, @@ -1931,7 +1924,6 @@ 7D6EF993DC800FDF67D48A896A8091A9 /* SEGAliasPayload.m in Sources */, F999210356B9A16D84AEB43DB9DD2028 /* SEGAnalytics.m in Sources */, 83CCFCC61E294245A1DA67AA7F7A9B11 /* SEGAnalyticsUtils.m in Sources */, - 1506857073C82B36917FBB4F9CF01068 /* SEGBluetooth.m in Sources */, D34DC675E0E0E4B7A9E935F9CBD48C00 /* SEGFileStorage.m in Sources */, A6231D0599B690684E18F181DCC91AC5 /* SEGGroupPayload.m in Sources */, B2C7BAB65FBB9443F4020111459B534B /* SEGHTTPClient.m in Sources */, diff --git a/Example/Pods/Target Support Files/Analytics/Analytics-umbrella.h b/Example/Pods/Target Support Files/Analytics/Analytics-umbrella.h index 30114ab22..2c4376461 100644 --- a/Example/Pods/Target Support Files/Analytics/Analytics-umbrella.h +++ b/Example/Pods/Target Support Files/Analytics/Analytics-umbrella.h @@ -12,7 +12,6 @@ #import "SEGTrackPayload.h" #import "NSData+SEGGZIP.h" #import "SEGAnalyticsUtils.h" -#import "SEGBluetooth.h" #import "SEGFileStorage.h" #import "SEGHTTPClient.h" #import "SEGLocation.h"