Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the LaunchDarkly iOS SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [2.12.1] - 2018-04-23
### Changed
- Clears selected warnings in CocoaPods project

## [2.12.0] - 2018-04-22
### Added
- `LDClient` `isOnline` readonly property that reports the online/offline status.
Expand Down
10 changes: 10 additions & 0 deletions Darkly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -1599,6 +1600,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -1638,6 +1640,7 @@
baseConfigurationReference = 2746B66055EC9588A1F04353 /* Pods-Darkly_iOS.debug.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1667,6 +1670,7 @@
baseConfigurationReference = 83FE9DD643D01669FB16BBEF /* Pods-Darkly_iOS.release.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1717,6 +1721,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7587BE78E11BC6EC851CA413 /* Pods-Darkly_osx.debug.xcconfig */;
buildSettings = {
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -1744,6 +1749,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 155D5D329F638FA4835A6755 /* Pods-Darkly_osx.release.xcconfig */;
buildSettings = {
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -1772,6 +1778,7 @@
baseConfigurationReference = 0C82F20E3E0A448F90071050 /* Pods-Darkly_watchOS.debug.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1799,6 +1806,7 @@
baseConfigurationReference = 9EBBFAE744BB0BB1176E84CC /* Pods-Darkly_watchOS.release.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1826,6 +1834,7 @@
baseConfigurationReference = B3DE78A634B8278DBB7534C9 /* Pods-Darkly_tvOS.debug.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1853,6 +1862,7 @@
baseConfigurationReference = 44E14CDC307AB772C30E92E6 /* Pods-Darkly_tvOS.release.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down
2 changes: 1 addition & 1 deletion Darkly/DarklyConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#import "DarklyConstants.h"

NSString * const kClientVersion = @"2.12.0";
NSString * const kClientVersion = @"2.12.1";
NSString * const kBaseUrl = @"https://app.launchdarkly.com";
NSString * const kEventsUrl = @"https://mobile.launchdarkly.com";
NSString * const kStreamUrl = @"https://clientstream.launchdarkly.com";
Expand Down
12 changes: 6 additions & 6 deletions Darkly/LDDataManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ -(void) createCustomEvent: (NSString *)eventKey withCustomValuesDictionary: (NSD

-(void)addEventDictionary:(NSDictionary*)eventDictionary {
dispatch_async(eventsQueue, ^{
if (!_eventsArray) {
_eventsArray = [[NSMutableArray alloc] init];
if (!self.eventsArray) {
self.eventsArray = [[NSMutableArray alloc] init];
}
if(![self isAtEventCapacity:_eventsArray]) {
[_eventsArray addObject:eventDictionary];
if(![self isAtEventCapacity:self.eventsArray]) {
[self.eventsArray addObject:eventDictionary];
}
else {
DEBUG_LOG(@"Events have surpassed capacity. Discarding event %@", eventDictionary[@"key"]);
Expand All @@ -189,8 +189,8 @@ -(BOOL)isAtEventCapacity:(NSArray *)currentArray {
-(void) deleteProcessedEvents: (NSArray *) processedJsonArray {
// Loop through processedEvents
dispatch_async(eventsQueue, ^{
NSInteger count = MIN([processedJsonArray count], [_eventsArray count]);
[_eventsArray removeObjectsInRange:NSMakeRange(0, count)];
NSInteger count = MIN([processedJsonArray count], [self.eventsArray count]);
[self.eventsArray removeObjectsInRange:NSMakeRange(0, count)];
});
}

Expand Down
2 changes: 1 addition & 1 deletion Darkly/LDRequestManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ -(void)performEventRequest:(NSArray *)eventDictionaries {
dispatch_semaphore_signal(semaphore);
dispatch_async(dispatch_get_main_queue(), ^{
BOOL processedEvents = !error;
[delegate processedEvents:processedEvents jsonEventArray:eventDictionaries];
[self.delegate processedEvents:processedEvents jsonEventArray:eventDictionaries];
});
}];

Expand Down
10 changes: 5 additions & 5 deletions DarklyTests/LDClientManagerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ - (void)testSyncWithServerForEventsWhenEventsExist {

[clientManager syncWithServerForEvents];

OCMVerify([requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
OCMVerify([self.requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
}];
}

Expand All @@ -281,13 +281,13 @@ - (void)testSyncWithServerForEventsNotProcessedWhenOffline {
[dataManagerMock allEventDictionaries:^(NSArray *array) {
OCMStub(array).andReturn(testData);

[[requestManagerMock reject] performEventRequest:[OCMArg isEqual:testData]];
[[self.requestManagerMock reject] performEventRequest:[OCMArg isEqual:testData]];

LDClientManager *clientManager = [LDClientManager sharedInstance];
[clientManager setOnline:NO];
[clientManager syncWithServerForEvents];

[requestManagerMock verify];
[self.requestManagerMock verify];
}];
}

Expand Down Expand Up @@ -545,7 +545,7 @@ - (void)testFlushEventsWhenOnline {

[clientManager flushEvents];

OCMVerify([requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
OCMVerify([self.requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
}];
}

Expand All @@ -559,7 +559,7 @@ - (void)testFlushEventsWhenOffline {

[clientManager flushEvents];

OCMReject([requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
OCMReject([self.requestManagerMock performEventRequest:[OCMArg isEqual:testData]]);
}];
}

Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# A sample Gemfile
source "https://rubygems.org"

gem 'cocoapods', '= 1.0.0'
gem 'cocoapods', '~>1.4.0'
59 changes: 32 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
CFPropertyList (2.3.6)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
atomos (0.1.2)
claide (1.0.2)
cocoapods (1.0.0)
activesupport (>= 4.0.2)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.0.0)
cocoapods-deintegrate (>= 1.0.0, < 2.0)
cocoapods-downloader (>= 1.0.0, < 2.0)
cocoapods (1.4.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.4.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.0.0, < 2.0)
colored (~> 1.2)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 0.3.0)
molinillo (~> 0.4.5)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.4)
nap (~> 1.0)
xcodeproj (>= 1.0.0, < 2.0)
cocoapods-core (1.0.0)
activesupport (>= 4.0.2)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.4, < 2.0)
cocoapods-core (1.4.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
Expand All @@ -39,33 +42,35 @@ GEM
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
concurrent-ruby (1.0.5)
escape (0.0.4)
fourflusher (0.3.2)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
i18n (0.9.0)
gh_inspector (1.0.3)
i18n (0.9.3)
concurrent-ruby (~> 1.0)
minitest (5.10.3)
molinillo (0.4.5)
nanaimo (0.2.3)
molinillo (0.6.5)
nanaimo (0.2.5)
nap (1.1.0)
netrc (0.11.0)
ruby-macho (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.4)
thread_safe (~> 0.1)
xcodeproj (1.5.3)
CFPropertyList (~> 2.3.3)
xcodeproj (1.5.7)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
nanaimo (~> 0.2.4)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.0.0)
cocoapods (~> 1.4.0)

BUNDLED WITH
1.16.0
1.16.1
6 changes: 4 additions & 2 deletions LaunchDarkly.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "LaunchDarkly"
s.version = "2.12.0"
s.version = "2.12.1"
s.summary = "iOS SDK for LaunchDarkly"

s.description = <<-DESC
Expand All @@ -23,12 +23,14 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = "9.0"
s.osx.deployment_target = '10.10'

s.source = { :git => "https://github.com/launchdarkly/ios-client.git", :tag => "2.12.0" }
s.source = { :git => "https://github.com/launchdarkly/ios-client.git", :tag => "2.12.1" }

s.source_files = "Darkly/*.{h,m}"

s.requires_arc = true

s.xcconfig = { 'CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS' => 'NO' }

s.subspec 'Core' do |eventSource|
eventSource.dependency 'DarklyEventSource', '~>3.2.3'
end
Expand Down
Loading