diff --git a/Darkly/LDClient.m b/Darkly/LDClient.m index 3832cc33..565245c8 100644 --- a/Darkly/LDClient.m +++ b/Darkly/LDClient.m @@ -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]; }); @@ -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 { diff --git a/LaunchDarkly.podspec b/LaunchDarkly.podspec index 65a547c8..6a0801fc 100644 --- a/LaunchDarkly.podspec +++ b/LaunchDarkly.podspec @@ -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 @@ -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" }