Skip to content

Commit d6547d0

Browse files
author
Edward Smith
committed
Merge branch 'staging' of ssh://github.com/BranchMetrics/ios-branch-deep-linking into QA
2 parents 876a0c6 + b6847c7 commit d6547d0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Branch-SDK/Branch-SDK/BranchContentDiscoveryManifest.m

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,21 @@
66
// Copyright © 2016 Branch Metrics. All rights reserved.
77
//
88

9+
910
#import <Foundation/Foundation.h>
1011
#import "BranchContentDiscoveryManifest.h"
1112
#import "BNCPreferenceHelper.h"
1213
#import "BranchContentPathProperties.h"
1314
#import <UIKit/UIKit.h>
1415
#import "BranchConstants.h"
1516

16-
@interface BranchContentDiscoveryManifest ()
1717

18+
@interface BranchContentDiscoveryManifest ()
1819
@property (nonatomic, strong) NSString *manifestVersion;
19-
2020
@end
2121

22-
@implementation BranchContentDiscoveryManifest
23-
2422

25-
static BranchContentDiscoveryManifest *contentDiscoveryManifest;
23+
@implementation BranchContentDiscoveryManifest
2624

2725
- (instancetype)init {
2826
self = [super init];
@@ -38,14 +36,15 @@ - (instancetype)init {
3836
}
3937

4038
+ (BranchContentDiscoveryManifest *)getInstance {
41-
if (!contentDiscoveryManifest) {
42-
contentDiscoveryManifest = [[BranchContentDiscoveryManifest alloc] init];
39+
@synchronized (self) {
40+
static BranchContentDiscoveryManifest *contentDiscoveryManifest = nil;
41+
if (!contentDiscoveryManifest) {
42+
contentDiscoveryManifest = [[BranchContentDiscoveryManifest alloc] init];
43+
}
44+
return contentDiscoveryManifest;
4345
}
44-
return contentDiscoveryManifest;
4546
}
4647

47-
48-
4948
- (void)onBranchInitialised:(NSDictionary *)branchInitDict withUrl:(NSString *)referredUrl {
5049
_referredLink = referredUrl;
5150
if ([branchInitDict objectForKey:BRANCH_CONTENT_DISCOVER_KEY]) {

0 commit comments

Comments
 (0)