Skip to content

Commit 6173293

Browse files
documentation cleanup, method name refactoring
1 parent 585a6f8 commit 6173293

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Branch-SDK/Branch-SDK/Branch.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -517,31 +517,31 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
517517
#pragma mark - Delayed Initialization
518518

519519
/**
520-
When certain actions are required to complete prior to Branch initialization, call this method passing in dispatch_block_t,
521-
initBlock, which contains the desired initialization of Branch (i.e. any of the initSessionWithLaunchOptions functions) and an int,
522-
waitTime, which inidicates the number of seconds Branch should wait for the user to call invokeDelayedInitialization, after this
523-
time, the initialization block will be invoked automatically.
524-
525-
@param initBlock dispatch_block_t object that contains one of the initSessionWithLaunchOptions functions.
526-
@param waitTime An int inidicating the number of seconds Branch should wait for the user to call
527-
invokeDelayedInitialization before invoke the initBlock itself.
520+
When certain actions are required to complete prior to session initialization, call this method passing in dispatch_block_t,
521+
which contains session initialization, and an int, inidicating the number of seconds Branch should wait for the user
522+
to invoke the delayed Branch session initialization (see invokeDelayedInitialization). After this time, Branch will automatically
523+
invoke the delayed session initialization.
524+
525+
@param initBlock dispatch_block_t object with Branch initialization in it
526+
@param waitTime An int inidicating the number of seconds Branch should wait for the user to
527+
invoke the delayed initialization.
528528
@warning To avoid memory leaks take care to ensure that initBlock object does not capture any resources
529529
that require execution of the block body in order to be released, such as memory allocated with malloc(3)
530530
on which the block body calls free(3).
531531
*/
532-
- (void)dispatchInit:(dispatch_block_t)initBlock After:(int)waitTime;
532+
- (void)dispatchInitSession:(dispatch_block_t)initBlock After:(int)waitTime;
533533

534534
/**
535535
Call this method if delayed initilization is no longer desired.
536536
537537
@warning Does not affect an initialization that is already in progress.
538538
*/
539-
- (void)cancelDelayedInitialization;
539+
- (void)cancelDelayedInitSession;
540540

541541
/**
542542
Used together with dispatchInitAfter, call this method after prerequisite tasks for Branch initialization have completed.
543543
*/
544-
- (void)invokeDelayedInitialization;
544+
- (void)invokeDelayedInitSession;
545545

546546
#pragma mark - Push Notification support
547547

Branch-SDK/Branch-SDK/Branch.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,22 +921,22 @@ - (void)checkAppleSearchAdsAttribution {
921921

922922
#pragma mark - Delayed initialization
923923

924-
- (void) dispatchInit:(dispatch_block_t) initBlock After:(int)waitTime {
924+
- (void) dispatchInitSession:(dispatch_block_t) initBlock After:(int)waitTime {
925925
self.delayedInitBlock = initBlock;
926926
dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(waitTime * NSEC_PER_SEC));
927927
dispatch_after(time, dispatch_get_main_queue(), self.delayedInitBlock);
928928
}
929929

930-
- (void)cancelDelayedInitialization {
930+
- (void)cancelDelayedInitSession {
931931
// does not affect execution of the block object that is already in progress,
932932
// but it does prevent future invocation of the same block
933933
dispatch_block_cancel(self.delayedInitBlock);
934934
NSLog(@"BranchSDK: cancelDelayedInitialization %@", @"success");
935935
}
936936

937-
- (void)invokeDelayedInitialization {
937+
- (void)invokeDelayedInitSession {
938938
self.delayedInitBlock();
939-
[self cancelDelayedInitialization];
939+
[self cancelDelayedInitSession];
940940
NSLog(@"BranchSDK: invokeDelayedInitialization %@", @"success");
941941
}
942942

Branch-TestBed/Branch-TestBed/AppDelegate.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ - (BOOL)application:(UIApplication *)application
5353
}];
5454
NSLog(@"BranchSDK: initBlock has been invoked %@", @"success");
5555
});
56-
[branch dispatchInit:initBlock After:5];
56+
[branch dispatchInitSession:initBlock After:5];
5757

5858
// pretend that something prerequisite task completed in 2 seconds
5959
dispatch_time_t twoSecFromNow = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC));
6060
dispatch_after(twoSecFromNow, dispatch_get_main_queue(), ^{
61-
[branch invokeDelayedInitialization];
61+
[branch invokeDelayedInitSession];
6262
});
6363

6464
// Push notification support (Optional)

0 commit comments

Comments
 (0)