-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reload static context data when the app returns from background. (#856)
* Respond to changes regarding advertising ID. * Removed unnecessary context. * Remove extraneous NSNull handling causing tests to fail. * Added weakify/strongify macros. * Removed extraneous NSNull checking. * Put locking around static context access.
- Loading branch information
Showing
4 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// SEGMacros.h | ||
// Analytics | ||
// | ||
// Created by Brandon Sneed on 12/20/19. | ||
// Copyright © 2019 Segment. All rights reserved. | ||
// | ||
|
||
#ifndef SEGMacros_h | ||
#define SEGMacros_h | ||
|
||
#define __deprecated__(s) __attribute__((deprecated(s))) | ||
|
||
#define weakify(var) __weak typeof(var) __weak_##var = var; | ||
|
||
#define strongify(var) \ | ||
_Pragma("clang diagnostic push") \ | ||
_Pragma("clang diagnostic ignored \"-Wshadow\"") \ | ||
__strong typeof(var) var = __weak_##var; \ | ||
_Pragma("clang diagnostic pop") | ||
|
||
#endif /* SEGMacros_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters