Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where if delegate was called without being set caused a #5

Merged
merged 1 commit into from
Oct 29, 2015
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
6 changes: 4 additions & 2 deletions Darkly/LDClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ +(LDClient *)sharedInstance
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedLDClient = [[self alloc] init];
[[NSNotificationCenter defaultCenter] addObserver: self
[[NSNotificationCenter defaultCenter] addObserver: sharedLDClient
selector:@selector(configUpdated)
name: kLDUserUpdatedNotification object: nil];
});
Expand Down Expand Up @@ -179,7 +179,9 @@ - (BOOL)stopClient {

// Notification handler for ClientManager user updated
-(void)configUpdated {
[self.delegate userDidUpdate];
if (self.delegate && [self.delegate respondsToSelector:@selector(userDidUpdate)]) {
[self.delegate userDidUpdate];
}
}

-(void)dealloc {
Expand Down
4 changes: 2 additions & 2 deletions LaunchDarkly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "LaunchDarkly"
s.version = "0.2.0-beta"
s.version = "0.2.1-beta"
s.summary = "iOS SDK for LaunchDarkly"

s.description = <<-DESC
Expand Down Expand Up @@ -74,7 +74,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#

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



Expand Down