diff --git a/CHANGELOG.md b/CHANGELOG.md index bb8c9189..c1eee103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,76 @@ # CHANGELOG Questions? [Contact us](https://support.branch.io/support/tickets/new) +## [v2.6.0](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.6.0) (2017-05-25) + +- **Completed Changes** + - docs: update run for ionic3 ([62537](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/62537d04de93d510ef1b18cb740aee9a4ca31266)) + - docs: added indention to currencies ([549a0](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/549a042568f3635b61dbd385f6282ca70dd78e51)) + - Merge pull request #328 from BranchMetrics/fix-cordovaadded commerce events ([720cc](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/720cc2605544f209cba533d31daeca01aeb59c9e)) + +- **Closed Issues** + - Branch.io init returning 400 bad request ([#330](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/330)) + - Instead of opening application directly, Branch.io takes me to the App Store ([#327](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/327)) + - Multiple Dex Exception on latest build branch-cordova-sdk 2.5.16 ([#326](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/326)) + +## [v2.5.17](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.17) (2017-05-10) + +- **Completed Changes** + - docs: relocated commerce properties to new section ([572a8](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/572a8893e23a5abcd94f3ed0108d47c2b6361e2e)) + - fix: correctly commerce currency on iOS to match Android ([47ade](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/47adeea8427f0dd87162f89b5b9ad90b2b65abc2)) + - feat: added commerce events to android ([2639f](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/2639ffc62d19652be0a981c5109e0d9ca134d83a)) + - style: fixed padding ([4a4c3](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/4a4c38cee2aa4873621df2729557572aa36ac66d)) + - fix: update android sdk to 2.8.0 ([dfc14](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/dfc149ff7a0747969e363d394474d83b87f995c6)) + - docs: minor spelling and version changes ([8d309](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/8d3096b457e7bc35f6b56c8d0341e78725dd07d3)) + - chore: updated npm version to 2.6.0 ([707a0](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/707a05c927d52675d9d880ebef177dcb2669caec)) + - feat: added commerce events to iOS ([faa3f](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/faa3fb094348548d076b54cd2be91c7949f06de0)) + - style: tabs to spaces ([545ae](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/545ae679fc8752efc0cd71386ea8a8ddf4967a78)) + - fix: updated openURL to latest syntax ([bc7c2](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/bc7c25d46fa3fe388ebcb1c2bb673dfaf42213b3)) + - chore: updated npm version to 2.5.18 ([7b54a](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/7b54a9db8a522c1e16fa1146a2666adc16b0c95e)) + - fix: android-prefix now required for custom domains ([d4417](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/d4417ac77de04ee5c560618d8957c3c96e6981e8)) + - docs: fixed data flow for contributing ([5661e](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/5661e0ac71109a3213c8570517c1757124554674)) + - docs: added data flow to contributing ([d14bf](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/d14bfd45f6df7cbcbe520c5f4cddf75a8d40189a)) + - docs: toc grammar update ([c5db7](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/c5db7ddf79dfe64631ce8328374791ddcc1ffc82)) + - Merge pull request #325 from BranchMetrics/fix-cordova-7fix: added support for cordova 7.0.0 ([14256](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/14256589c44376533a9d3e706557e2d78d1c5c54)) + +- **Closed Issues** + - Branch.initSession bugged ([#324](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/324)) + - Error with cordova 7.0.0 ([#323](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/323)) + - Query Parameter getting stripped off ([#322](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/322)) + +## [v2.5.16](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.16) (2017-04-18) + +- **Completed Changes** + - fix: cleaned up cordova 7.0.0 fix ([6f1a2](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/6f1a2a5b032f8d6a32f0417f56ff218b5ec793b2)) + - fix: added support for cordova 7.0.0 ([862f1](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/862f14e510ccccd2f44372ed4d5fc9ed29e88b89)) + - fix: removed es6-promise-plugin dependency ([de7cc](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/de7cc9db43712d0a9e00d648c0f620f5cc87df51)) + - chore: updated npm version to 2.5.17 ([0312d](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/0312dca92c4fd0c8543c31b5bd52ae843f16e856)) + - fix: updated plist dependency to 2.1.0 ([1f8b8](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/1f8b81e7b4f1413ae4f211ee327af6c5b23ef924)) + - docs: added error for incorrect minimum android version ([2a848](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/2a8483c92d575bf231fa1f0d544fd23a71673391)) + - docs: made building testbed more understandable ([df568](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/df5689c148a81c14be99ba929f1b65ac3e52d4e5)) + - docs: added methods to test each function ([80ca7](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/80ca7594eb73e30c6b1318204b9018b9c19b3522)) + - Merge pull request #318 from BranchMetrics/fix-release-schemefix: able to have release schemes and archive in ios ([96db6](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/96db6caac4095f161e7c659debb6e881d9c05faf)) + +- **Closed Issues** + - Init Error ([#321](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/321)) + - Missing : Commerce event tracking ([#320](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/320)) + - custom url schema support ([#319](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/319)) + ## [v2.5.15](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.15) (2017-04-17) - **Completed Changes** + - Merge remote-tracking branch 'origin/fix-release-scheme' into fix-release-scheme ([6e669](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/6e66953d9a0eb4d8b91d4ab9659cdc57f050ee5d)) + - chore: updated Android to 2.6.1 ([c4b8a](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/c4b8a68fd6c4665f3ca5f636d2ff5c01b6813a7b)) + - chore: updated iOS to 0.14.12 ([85557](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/855576d8e459c5583cee9d90521222bbb7e22348)) + - chore: updated npm version to 2.5.16 ([a6eb1](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/a6eb1c58425fefd0c8255c89be27ed5df3239aca)) + - chore: corrected merge conflict with master ([e9570](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/e957041baa20237061549ff221005185c0ef3f2f)) + - chore: updated changelog ([ef917](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/ef917d21c5cf4fb8e6d85b9b8daf49d4e0d6d3c0)) + - fix: able to have release schemes and archive in ios ([14912](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/149128f2685b57c7e6b0fe0806c9040ead7ecd78)) + - chore: updated Android to 2.6.1 ([c0c66](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/c0c66dee28a848e47b5ba5f729eb210f5595b3a8)) + - chore: updated iOS to 0.14.12 ([66ee9](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/66ee9dc0746ed80fb09e8620ce743bffe5662583)) + - chore: updated npm version to 2.5.16 ([df39b](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/df39b9ad36791d1cf276eb9e651bfbb986f6517a)) + - chore: updated changelog ([2743b](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/2743b69aaac973720b50abce2f038935d1f1c89e)) + - fix: able to have release schemes and archive in ios ([82300](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/823003cc3b28a8b9b2090e609952e57e552eea44)) - Merge pull request #317 from BranchMetrics/fix-bundle-idFix bundle id ([89cf3](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/89cf3d7cd90992c2eef1e0cfdcbf18ce0f5a5fb2)) - **Closed Issues** @@ -66,7 +133,6 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - **Closed Issues** - Twitter Share does not show preview ([#305](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/305)) - - Deep link is received twice in iOS in Ionic 2 ([#304](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/304)) ## [v2.5.11](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.11) (2017-03-21) @@ -91,7 +157,7 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - Merge pull request #301 from BranchMetrics/added-changelogfeat: added changelog script ([99fc7](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/99fc717dc1f4c6f2fe2f50fcfe158a8447bc13a0)) - **Closed Issues** - - Provide better API error descriptions ([#295](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/295)) + - This plugin invalidates cordova's Entitlements-Debug.plist and Entitlements-Release.plist ([#299](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/299)) ## [v2.5.9](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.9) (2017-03-09) @@ -107,7 +173,7 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - Merge pull request #300 from BranchMetrics/fix-intent-overrideFix intent override ([4ddf0](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/4ddf036d49a3ab5296aa6efdf3bf5aa54019bdc5)) - **Closed Issues** - - Update plugin.xml id to be consistent with npm ([#290](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/290)) + - Provide better API error descriptions ([#295](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/295)) ## [v2.5.8](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.8) (2017-03-08) @@ -120,7 +186,7 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - Merge pull request #298 from BranchMetrics/native-sdk-install-scriptNative sdk install script ([be3bc](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/be3bc5fef1403979c478eef63aa3bd48bd6e8fa0)) - **Closed Issues** - - publish to npm?? ([#289](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/289)) + - Update plugin.xml id to be consistent with npm ([#290](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/290)) ## [v2.5.7](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.7) (2017-03-08) @@ -134,7 +200,7 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - Merge pull request #297 from BranchMetrics/update-ios-and-android-sdksupdate ios and android sdks ([a3b21](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/a3b2143952df42d4b7d2a69e3b7f2710b1a98bf0)) - **Closed Issues** - - BNCServerInterface.processServerResponse has log but initSession isn't fired on iOS ([#288](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/288)) + - publish to npm?? ([#289](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/289)) ## [v2.5.6](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.6) (2017-03-07) @@ -153,6 +219,7 @@ Questions? [Contact us](https://support.branch.io/support/tickets/new) - Merge pull request #296 from BranchMetrics/fix--continual-improvementsFix: continual improvements ([060e2](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/commit/060e2ab43465ef10a8381a2e71674c5d3aaf1740)) - **Closed Issues** + - BNCServerInterface.processServerResponse has log but initSession isn't fired on iOS ([#288](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/288)) - I can't show image when share moments with WeChat ([#287](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/287)) ## [v2.5.5](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/releases/tag/v2.5.5) (2017-03-07) diff --git a/src/ios/dependencies/Branch-SDK/BNCConfig.m b/src/ios/dependencies/Branch-SDK/BNCConfig.m index 63b0ce45..d4fefc2f 100644 --- a/src/ios/dependencies/Branch-SDK/BNCConfig.m +++ b/src/ios/dependencies/Branch-SDK/BNCConfig.m @@ -11,4 +11,4 @@ NSString * const BNC_API_BASE_URL = @"https://api.branch.io"; NSString * const BNC_API_VERSION = @"v1"; NSString * const BNC_LINK_URL = @"https://bnc.lt"; -NSString * const BNC_SDK_VERSION = @"0.14.12"; +NSString * const BNC_SDK_VERSION = @"0.15.3"; diff --git a/src/ios/dependencies/Branch-SDK/BNCLog.h b/src/ios/dependencies/Branch-SDK/BNCLog.h index 83ae1346..399df6a7 100644 --- a/src/ios/dependencies/Branch-SDK/BNCLog.h +++ b/src/ios/dependencies/Branch-SDK/BNCLog.h @@ -119,11 +119,11 @@ extern void BNCLogSetFlushFunction(BNCLogFlushFunctionPtr _Nullable flushFunctio extern BNCLogFlushFunctionPtr _Nullable BNCLogFlushFunction(); -#pragma mark - BNCLogMessageInternal +#pragma mark - BNCLogWriteMessage -/// The main logging function used in the logging defines. -extern void BNCLogMessageInternal( +/// The main logging function used in the variadic logging defines. +extern void BNCLogWriteMessageFormat( BNCLogLevel logLevel, const char *_Nullable sourceFileName, int sourceLineNumber, @@ -131,6 +131,14 @@ extern void BNCLogMessageInternal( ... ); +/// Swift-friendly wrapper for BNCLogWriteMessageFormat +extern void BNCLogWriteMessage( + BNCLogLevel logLevel, + NSString *_Nonnull sourceFileName, + NSUInteger sourceLineNumber, + NSString *_Nonnull message +); + /// This function synchronizes all outstanding log messages and writes them to the logging function /// set by BNCLogSetOutputFunction. extern void BNCLogFlushMessages(); @@ -141,25 +149,25 @@ extern void BNCLogFlushMessages(); ///@param format Log a debug message with the specified formatting. #define BNCLogDebug(...) \ - do { BNCLogMessageInternal(BNCLogLevelDebug, __FILE__, __LINE__, __VA_ARGS__); } while (0) + do { BNCLogWriteMessageFormat(BNCLogLevelDebug, __FILE__, __LINE__, __VA_ARGS__); } while (0) ///@param format Log a warning message with the specified formatting. #define BNCLogWarning(...) \ - do { BNCLogMessageInternal(BNCLogLevelWarning, __FILE__, __LINE__, __VA_ARGS__); } while (0) + do { BNCLogWriteMessageFormat(BNCLogLevelWarning, __FILE__, __LINE__, __VA_ARGS__); } while (0) ///@param format Log an error message with the specified formatting. #define BNCLogError(...) \ - do { BNCLogMessageInternal(BNCLogLevelError, __FILE__, __LINE__, __VA_ARGS__); } while (0) + do { BNCLogWriteMessageFormat(BNCLogLevelError, __FILE__, __LINE__, __VA_ARGS__); } while (0) ///@param format Log a message with the specified formatting. #define BNCLog(...) \ - do { BNCLogMessageInternal(BNCLogLevelLog, __FILE__, __LINE__, __VA_ARGS__); } while (0) + do { BNCLogWriteMessageFormat(BNCLogLevelLog, __FILE__, __LINE__, __VA_ARGS__); } while (0) ///Cause a programmatic breakpoint if breakpoints are enabled. #define BNCLogBreakPoint() \ do { \ if (BNCLogBreakPointsAreEnabled()) { \ - BNCLogMessageInternal(BNCLogLevelBreakPoint, __FILE__, __LINE__, @"Programmatic breakpoint."); \ + BNCLogWriteMessageFormat(BNCLogLevelBreakPoint, __FILE__, __LINE__, @"Programmatic breakpoint."); \ if (BNCDebuggerIsAttached()) { \ BNCLogFlushMessages(); \ BNCDebugBreakpoint(); \ @@ -171,7 +179,7 @@ extern void BNCLogFlushMessages(); #define BNCBreakPointWithMessage(...) \ do { \ if (BNCLogBreakPointsAreEnabled() { \ - BNCLogMessageInternal(BNCLogLevelBreakPoint, __FILE__, __LINE__, __VA_ARGS__); \ + BNCLogWriteMessageFormat(BNCLogLevelBreakPoint, __FILE__, __LINE__, __VA_ARGS__); \ if (BNCDebuggerIsAttached()) { \ BNCLogFlushMessages(); \ BNCDebugBreakpoint(); \ @@ -183,7 +191,7 @@ extern void BNCLogFlushMessages(); #define BNCLogAssert(condition) \ do { \ if (!(condition)) { \ - BNCLogMessageInternal(BNCLogLevelAssert, __FILE__, __LINE__, @"(%s) !!!", #condition); \ + BNCLogWriteMessageFormat(BNCLogLevelAssert, __FILE__, __LINE__, @"(%s) !!!", #condition); \ if (BNCLogBreakPointsAreEnabled() && BNCDebuggerIsAttached()) { \ BNCLogFlushMessages(); \ BNCDebugBreakpoint(); \ @@ -197,7 +205,7 @@ extern void BNCLogFlushMessages(); do { \ if (!(condition)) { \ NSString *m = [NSString stringWithFormat:message, __VA_ARGS__]; \ - BNCLogMessageInternal(BNCLogLevelAssert, __FILE__, __LINE__, @"(%s) !!! %@", #condition, m); \ + BNCLogWriteMessageFormat(BNCLogLevelAssert, __FILE__, __LINE__, @"(%s) !!! %@", #condition, m); \ if (BNCLogBreakPointsAreEnabled() && BNCDebuggerIsAttached()) { \ BNCLogFlushMessages(); \ BNCDebugBreakpoint(); \ diff --git a/src/ios/dependencies/Branch-SDK/BNCLog.m b/src/ios/dependencies/Branch-SDK/BNCLog.m index 1def862c..6e5a63d3 100644 --- a/src/ios/dependencies/Branch-SDK/BNCLog.m +++ b/src/ios/dependencies/Branch-SDK/BNCLog.m @@ -463,7 +463,7 @@ void BNCLogSetBreakPointsEnabled(BOOL enabled) { #pragma mark - Log Functions -static BNCLogOutputFunctionPtr bnc_LoggingFunction = BNCLogFunctionOutputToStdOut; +static BNCLogOutputFunctionPtr bnc_LoggingFunction = nil; // Default to just NSLog output. static BNCLogFlushFunctionPtr bnc_LogFlushFunction = BNCLogFlushFileDescriptor; BNCLogOutputFunctionPtr _Nullable BNCLogOutputFunction() { @@ -498,7 +498,7 @@ void BNCLogSetFlushFunction(BNCLogFlushFunctionPtr flushFunction) { static dispatch_queue_t bnc_LogQueue = nil; -void BNCLogMessageInternal( +void BNCLogWriteMessageFormat( BNCLogLevel logLevel, const char *_Nullable file, int lineNumber, @@ -551,6 +551,15 @@ void BNCLogMessageInternal( } } +void BNCLogWriteMessage( + BNCLogLevel logLevel, + NSString *_Nonnull file, + NSUInteger lineNumber, + NSString *_Nonnull message + ) { + BNCLogWriteMessageFormat(logLevel, file.UTF8String, (int)lineNumber, @"%@", message); +} + void BNCLogFlushMessages() { if (BNCLogSynchronizeMessages()) { dispatch_sync(bnc_LogQueue, ^{ diff --git a/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.h b/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.h index fd0286d1..419a6299 100755 --- a/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.h +++ b/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.h @@ -6,13 +6,12 @@ // // -#import "BNCServerRequest.h" +#import "BNCServerRequest.h" @class BranchOpenRequest; -@interface BNCServerRequestQueue : NSObject -@property (nonatomic, readonly) unsigned int size; +@interface BNCServerRequestQueue : NSObject - (void)enqueue:(BNCServerRequest *)request; - (BNCServerRequest *)dequeue; @@ -32,4 +31,6 @@ + (id)getInstance; +@property (readonly, assign) NSInteger queueDepth; +@property (readonly, assign) BOOL isDirty; @end diff --git a/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.m b/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.m index 9288fed2..3eeafdfc 100755 --- a/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.m +++ b/src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.m @@ -6,35 +6,46 @@ // // + #import "BNCServerRequestQueue.h" #import "BNCPreferenceHelper.h" #import "BranchCloseRequest.h" #import "BranchOpenRequest.h" + NSString * const BRANCH_QUEUE_FILE = @"BNCServerRequestQueue"; -NSUInteger const BATCH_WRITE_TIMEOUT = 3; +NSTimeInterval const BATCH_WRITE_TIMEOUT = 3.0; -@interface BNCServerRequestQueue() -@property (nonatomic, strong) NSMutableArray *queue; -@property (nonatomic) dispatch_queue_t asyncQueue; -@property (strong, nonatomic) NSTimer *writeTimer; +static inline uint64_t BNCNanoSecondsFromTimeInterval(NSTimeInterval interval) { + return interval * ((NSTimeInterval) NSEC_PER_SEC); +} + +@interface BNCServerRequestQueue() +@property (strong) NSMutableArray *queue; +@property (strong) dispatch_queue_t asyncQueue; +@property (strong) dispatch_source_t persistTimer; @end @implementation BNCServerRequestQueue - (id)init { - if (self = [super init]) { - self.queue = [NSMutableArray array]; - self.asyncQueue = dispatch_queue_create("brnch_persist_queue", NULL); - } + self = [super init]; + if (!self) return self; + + self.queue = [NSMutableArray array]; + self.asyncQueue = dispatch_queue_create("io.branch.persist_queue", DISPATCH_QUEUE_SERIAL); return self; } +- (void) dealloc { + [self persistImmediately]; +} + - (void)enqueue:(BNCServerRequest *)request { - @synchronized(self.queue) { + @synchronized (self) { if (request) { [self.queue addObject:request]; [self persistEventually]; @@ -43,12 +54,11 @@ - (void)enqueue:(BNCServerRequest *)request { } - (void)insert:(BNCServerRequest *)request at:(unsigned int)index { - @synchronized(self.queue) { + @synchronized (self) { if (index > self.queue.count) { [[BNCPreferenceHelper preferenceHelper] log:FILE_NAME line:LINE_NUM message:@"Invalid queue operation: index out of bound!"]; return; } - if (request) { [self.queue insertObject:request atIndex:index]; [self persistEventually]; @@ -57,38 +67,39 @@ - (void)insert:(BNCServerRequest *)request at:(unsigned int)index { } - (BNCServerRequest *)dequeue { - BNCServerRequest *request = nil; - - @synchronized(self.queue) { + @synchronized (self) { + BNCServerRequest *request = nil; if (self.queue.count > 0) { request = [self.queue objectAtIndex:0]; [self.queue removeObjectAtIndex:0]; [self persistEventually]; } - } - return request; + } } - (BNCServerRequest *)removeAt:(unsigned int)index { - BNCServerRequest *request = nil; - @synchronized(self.queue) { + @synchronized (self) { + BNCServerRequest *request = nil; if (index >= self.queue.count) { - [[BNCPreferenceHelper preferenceHelper] log:FILE_NAME line:LINE_NUM message:@"Invalid queue operation: index out of bound!"]; + [[BNCPreferenceHelper preferenceHelper] + log:FILE_NAME line:LINE_NUM + message:@"Invalid queue operation: index out of bound!"]; return nil; } request = [self.queue objectAtIndex:index]; [self.queue removeObjectAtIndex:index]; [self persistEventually]; + return request; } - - return request; } - (void)remove:(BNCServerRequest *)request { - [self.queue removeObject:request]; - [self persistEventually]; + @synchronized (self) { + [self.queue removeObject:request]; + [self persistEventually]; + } } - (BNCServerRequest *)peek { @@ -96,19 +107,25 @@ - (BNCServerRequest *)peek { } - (BNCServerRequest *)peekAt:(unsigned int)index { - if (index >= self.queue.count) { - [[BNCPreferenceHelper preferenceHelper] log:FILE_NAME line:LINE_NUM message:@"Invalid queue operation: index out of bound!"]; - return nil; + @synchronized (self) { + if (index >= self.queue.count) { + [[BNCPreferenceHelper preferenceHelper] + log:FILE_NAME line:LINE_NUM + message:@"Invalid queue operation: index out of bound!"]; + return nil; + } + + BNCServerRequest *request = nil; + request = [self.queue objectAtIndex:index]; + + return request; } - - BNCServerRequest *request = nil; - request = [self.queue objectAtIndex:index]; - - return request; } -- (unsigned int)size { - return (unsigned int)self.queue.count; +- (NSInteger)queueDepth { + @synchronized (self) { + return (NSInteger) self.queue.count; + } } - (NSString *)description { @@ -116,23 +133,27 @@ - (NSString *)description { } - (void)clearQueue { - [self.queue removeAllObjects]; - [self persistEventually]; + @synchronized (self) { + [self.queue removeAllObjects]; + [self persistEventually]; + } } - (BOOL)containsInstallOrOpen { - for (int i = 0; i < self.queue.count; i++) { - BNCServerRequest *req = [self.queue objectAtIndex:i]; - // Install extends open, so only need to check open. - if ([req isKindOfClass:[BranchOpenRequest class]]) { - return YES; + @synchronized (self) { + for (int i = 0; i < self.queue.count; i++) { + BNCServerRequest *req = [self.queue objectAtIndex:i]; + // Install extends open, so only need to check open. + if ([req isKindOfClass:[BranchOpenRequest class]]) { + return YES; + } } + return NO; } - return NO; } - (BOOL)removeInstallOrOpen { - @synchronized (self.queue) { + @synchronized (self) { for (int i = 0; i < self.queue.count; i++) { BranchOpenRequest *req = [self.queue objectAtIndex:i]; // Install extends open, so only need to check open. @@ -147,67 +168,84 @@ - (BOOL)removeInstallOrOpen { } - (BranchOpenRequest *)moveInstallOrOpenToFront:(NSInteger)networkCount { - BOOL requestAlreadyInProgress = networkCount > 0; + @synchronized (self) { - BNCServerRequest *openOrInstallRequest; - for (int i = 0; i < self.queue.count; i++) { - BNCServerRequest *req = [self.queue objectAtIndex:i]; - if ([req isKindOfClass:[BranchOpenRequest class]]) { - - // Already in front, nothing to do - if (i == 0 || (i == 1 && requestAlreadyInProgress)) { - return (BranchOpenRequest *)req; - } + BOOL requestAlreadyInProgress = networkCount > 0; + + BNCServerRequest *openOrInstallRequest; + for (int i = 0; i < self.queue.count; i++) { + BNCServerRequest *req = [self.queue objectAtIndex:i]; + if ([req isKindOfClass:[BranchOpenRequest class]]) { + + // Already in front, nothing to do + if (i == 0 || (i == 1 && requestAlreadyInProgress)) { + return (BranchOpenRequest *)req; + } - // Otherwise, pull this request out and stop early - openOrInstallRequest = [self removeAt:i]; - break; + // Otherwise, pull this request out and stop early + openOrInstallRequest = [self removeAt:i]; + break; + } } + + if (!openOrInstallRequest) { + [[BNCPreferenceHelper preferenceHelper] + logWarning:@"No install or open request in queue while trying to move it to the front"]; + return nil; + } + + if (!requestAlreadyInProgress || !self.queue.count) { + [self insert:openOrInstallRequest at:0]; + } + else { + [self insert:openOrInstallRequest at:1]; + } + + return (BranchOpenRequest *)openOrInstallRequest; } - - if (!openOrInstallRequest) { - [[BNCPreferenceHelper preferenceHelper] logWarning:@"No install or open request in queue while trying to move it to the front"]; - return nil; - } - - if (!requestAlreadyInProgress || !self.queue.count) { - [self insert:openOrInstallRequest at:0]; - } - else { - [self insert:openOrInstallRequest at:1]; - } - - return (BranchOpenRequest *)openOrInstallRequest; } - (BOOL)containsClose { - for (int i = 0; i < self.queue.count; i++) { - BNCServerRequest *req = [self.queue objectAtIndex:i]; - if ([req isKindOfClass:[BranchCloseRequest class]]) { - return YES; + @synchronized (self) { + for (int i = 0; i < self.queue.count; i++) { + BNCServerRequest *req = [self.queue objectAtIndex:i]; + if ([req isKindOfClass:[BranchCloseRequest class]]) { + return YES; + } } + return NO; } - - return NO; } - -#pragma mark - Private method +#pragma mark - Private Methods - (void)persistEventually { - if (!self.writeTimer.valid) { - self.writeTimer = [NSTimer scheduledTimerWithTimeInterval:BATCH_WRITE_TIMEOUT target:self selector:@selector(persistToDisk) userInfo:nil repeats:NO]; + @synchronized (self) { + if (self.persistTimer) return; + + self.persistTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, self.asyncQueue); + if (!self.persistTimer) return; + + dispatch_time_t startTime = + dispatch_time(DISPATCH_TIME_NOW, BNCNanoSecondsFromTimeInterval(BATCH_WRITE_TIMEOUT)); + dispatch_source_set_timer( + self.persistTimer, + startTime, + BNCNanoSecondsFromTimeInterval(BATCH_WRITE_TIMEOUT), + BNCNanoSecondsFromTimeInterval(BATCH_WRITE_TIMEOUT / 10.0) + ); + dispatch_source_set_event_handler(self.persistTimer, ^ { [self persistImmediately]; }); + dispatch_resume(self.persistTimer); } } - (void)persistImmediately { - [self.writeTimer invalidate]; - [self persistToDisk]; -} - -- (void)persistToDisk { - NSArray *requestsToPersist = [self.queue copy]; - dispatch_async(self.asyncQueue, ^ { + @synchronized (self) { + if (self.persistTimer) { + dispatch_source_cancel(self.persistTimer); + self.persistTimer = nil; + } + NSArray *requestsToPersist = [self.queue copy]; @try { NSMutableArray *encodedRequests = [[NSMutableArray alloc] init]; for (BNCServerRequest *req in requestsToPersist) { @@ -236,72 +274,82 @@ - (void)persistToDisk { NSString *warningMessage = [NSString stringWithFormat: @"An exception occurred while attempting to save the queue. Exception information:\n\n%@", - [self exceptionString:exception]]; + [self.class exceptionString:exception]]; [[BNCPreferenceHelper preferenceHelper] logWarning:warningMessage]; } - }); + } } -- (void)retrieve { - NSMutableArray *queue = [[NSMutableArray alloc] init]; - NSArray *encodedRequests = nil; - - // Capture exception while loading the queue file - @try { - NSError *error = nil; - NSData *data = [NSData dataWithContentsOfURL:self.class.URLForQueueFile options:0 error:&error]; - if ([error.domain isEqualToString:NSCocoaErrorDomain] && error.code == NSFileReadNoSuchFileError) { - encodedRequests = [NSArray new]; - } else if (!error && data) - encodedRequests = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - if (![encodedRequests isKindOfClass:[NSArray class]]) { - @throw [NSException exceptionWithName:NSInvalidArgumentException - reason:@"Saved server queue is invalid." userInfo:nil]; - } +- (BOOL) isDirty { + @synchronized (self) { + return (self.persistTimer != nil); } - @catch (NSException *exception) { - NSString *warningMessage = - [NSString stringWithFormat: - @"An exception occurred while attempting to load the queue file, " - "proceeding without requests. Exception information:\n\n%@", - [self exceptionString:exception]]; - [[BNCPreferenceHelper preferenceHelper] logWarning:warningMessage]; - self.queue = queue; - return; - } - - for (NSData *encodedRequest in encodedRequests) { - BNCServerRequest *request; +} - // Capture exceptions while parsing individual request objects +- (void)retrieve { + @synchronized (self) { + NSMutableArray *queue = [[NSMutableArray alloc] init]; + NSArray *encodedRequests = nil; + + // Capture exception while loading the queue file @try { - request = [NSKeyedUnarchiver unarchiveObjectWithData:encodedRequest]; + NSError *error = nil; + NSData *data = [NSData dataWithContentsOfURL:self.class.URLForQueueFile options:0 error:&error]; + if ([error.domain isEqualToString:NSCocoaErrorDomain] && error.code == NSFileReadNoSuchFileError) { + encodedRequests = [NSArray new]; + } else if (!error && data) + encodedRequests = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + if (![encodedRequests isKindOfClass:[NSArray class]]) { + @throw [NSException exceptionWithName:NSInvalidArgumentException + reason:@"Saved server queue is invalid." userInfo:nil]; + } } @catch (NSException *exception) { - [[BNCPreferenceHelper preferenceHelper] - logWarning:@"An exception occurred while attempting to parse a queued request, discarding."]; - continue; + NSString *warningMessage = + [NSString stringWithFormat: + @"An exception occurred while attempting to load the queue file, " + "proceeding without requests. Exception information:\n\n%@", + [self.class exceptionString:exception]]; + [[BNCPreferenceHelper preferenceHelper] logWarning:warningMessage]; + self.queue = queue; + return; } - - // Throw out invalid request types - if (![request isKindOfClass:[BNCServerRequest class]]) { - [[BNCPreferenceHelper preferenceHelper] logWarning:@"Found an invalid request object, discarding."]; - continue; + + for (NSData *encodedRequest in encodedRequests) { + BNCServerRequest *request; + + // Capture exceptions while parsing individual request objects + @try { + request = [NSKeyedUnarchiver unarchiveObjectWithData:encodedRequest]; + } + @catch (NSException *exception) { + [[BNCPreferenceHelper preferenceHelper] + logWarning:@"An exception occurred while attempting to parse a queued request, discarding."]; + continue; + } + + // Throw out invalid request types + if (![request isKindOfClass:[BNCServerRequest class]]) { + [[BNCPreferenceHelper preferenceHelper] logWarning:@"Found an invalid request object, discarding."]; + continue; + } + + // Throw out persisted close requests + if ([request isKindOfClass:[BranchCloseRequest class]]) { + continue; + } + + [queue addObject:request]; } - // Throw out persisted close requests - if ([request isKindOfClass:[BranchCloseRequest class]]) { - continue; - } - - [queue addObject:request]; + self.queue = queue; } - - self.queue = queue; } -- (NSString *)exceptionString:(NSException *)exception { - return [NSString stringWithFormat:@"Name: %@\nReason: %@\nStack:\n\t%@\n\n", exception.name, exception.reason, [exception.callStackSymbols componentsJoinedByString:@"\n\t"]]; ++ (NSString *)exceptionString:(NSException *)exception { + return [NSString stringWithFormat:@"Name: %@\nReason: %@\nStack:\n\t%@\n\n", + exception.name, exception.reason, + [exception.callStackSymbols componentsJoinedByString:@"\n\t"]]; } + (NSString *)queueFile_deprecated { @@ -347,7 +395,7 @@ + (void) initialize { } } -#pragma mark - Singleton method +#pragma mark - Shared Method + (id)getInstance { static BNCServerRequestQueue *sharedQueue = nil; @@ -361,7 +409,6 @@ + (id)getInstance { line:LINE_NUM message:@"Retrieved from Persist: %@", sharedQueue]; }); - return sharedQueue; } diff --git a/src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m b/src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m index 499d235b..ef6d92c4 100644 --- a/src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m +++ b/src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m @@ -254,7 +254,7 @@ - (UIWindow*) keyWindow { } /** - Find the top view controller that is not of type UINavigationController or UITabBarController + Find the top view controller that is not of type UINavigationController, UITabBarController, UISplitViewController */ - (UIViewController *)topViewController:(UIViewController *)baseViewController { if ([baseViewController isKindOfClass:[UINavigationController class]]) { @@ -265,6 +265,10 @@ - (UIViewController *)topViewController:(UIViewController *)baseViewController { return [self topViewController: ((UITabBarController *)baseViewController).selectedViewController]; } + if ([baseViewController isKindOfClass:[UISplitViewController class]]) { + return [self topViewController: ((UISplitViewController *)baseViewController).viewControllers.firstObject]; + } + if ([baseViewController presentedViewController] != nil) { return [self topViewController: [baseViewController presentedViewController]]; } diff --git a/src/ios/dependencies/Branch-SDK/BNCSystemObserver.m b/src/ios/dependencies/Branch-SDK/BNCSystemObserver.m index 559ee7c8..a39ec090 100644 --- a/src/ios/dependencies/Branch-SDK/BNCSystemObserver.m +++ b/src/ios/dependencies/Branch-SDK/BNCSystemObserver.m @@ -259,7 +259,7 @@ + (NSDate*) dateForPathComponent:(NSString*)component inURLs:(NSArray*)f } } if (!success || error) { - NSLog(@"Can't retrieve attributes. Success: %d Error: %@.", success, error); + NSLog(@"Warning: Can't retrieve bundle attributes. Success: %d Error: %@.", success, error); return nil; } return buildDate; diff --git a/src/ios/dependencies/Branch-SDK/Branch.m b/src/ios/dependencies/Branch-SDK/Branch.m index f2835b24..a41740be 100644 --- a/src/ios/dependencies/Branch-SDK/Branch.m +++ b/src/ios/dependencies/Branch-SDK/Branch.m @@ -1404,7 +1404,10 @@ void BNCPerformBlockOnMainThread(dispatch_block_t block) { dispatch_async(dispatch_get_main_queue(), block); } -- (void) processRequest:(BNCServerRequest*)req response:(BNCServerResponse*)response error:(NSError*)error { +- (void) processRequest:(BNCServerRequest*)req + response:(BNCServerResponse*)response + error:(NSError*)error { + // If the request was successful, or was a bad user request, continue processing. if (!error || error.code == BNCBadRequestError || error.code == BNCDuplicateResourceError) { @@ -1418,7 +1421,7 @@ - (void) processRequest:(BNCServerRequest*)req response:(BNCServerResponse*)resp else { // First, gather all the requests to fail NSMutableArray *requestsToFail = [[NSMutableArray alloc] init]; - for (int i = 0; i < self.requestQueue.size; i++) { + for (int i = 0; i < self.requestQueue.queueDepth; i++) { BNCServerRequest *request = [self.requestQueue peekAt:i]; if (request) { [requestsToFail addObject:request]; @@ -1448,7 +1451,10 @@ - (void) processRequest:(BNCServerRequest*)req response:(BNCServerResponse*)resp - (void)processNextQueueItem { dispatch_semaphore_wait(self.processing_sema, DISPATCH_TIME_FOREVER); - if (self.networkCount == 0 && self.requestQueue.size > 0 && !self.preferenceHelper.shouldWaitForInit) { + if (self.networkCount == 0 && + self.requestQueue.queueDepth > 0 && + !self.preferenceHelper.shouldWaitForInit) { + self.networkCount = 1; dispatch_semaphore_signal(self.processing_sema); BNCServerRequest *req = [self.requestQueue peek]; diff --git a/src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.m b/src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.m index 5b42e268..950827ac 100644 --- a/src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.m +++ b/src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.m @@ -8,6 +8,7 @@ #import "BranchActivityItemProvider.h" #import "Branch.h" +#import "BranchConstants.h" #import "BNCSystemObserver.h" #import "BNCDeviceInfo.h" @@ -57,19 +58,67 @@ - (id)item { NSString *stage = [self stageForChannel:channel]; NSString *campaign = [self campaignForChannel:channel]; NSString *alias = [self aliasForChannel:channel]; - + // Allow the channel param to be overridden, perhaps they want "fb" instead of "facebook" if ([self.delegate respondsToSelector:@selector(activityItemOverrideChannelForChannel:)]) { channel = [self.delegate activityItemOverrideChannelForChannel:channel]; } - // Because Facebook et al immediately scrape URLs, we add an additional parameter to the existing list, telling the backend to ignore the first click + // Because Facebook et al immediately scrape URLs, we add an additional parameter to the + // existing list, telling the backend to ignore the first click NSArray *scrapers = @[@"Facebook", @"Twitter", @"Slack", @"Apple Notes"]; for (NSString *scraper in scrapers) { if ([channel isEqualToString:scraper]) - return [NSURL URLWithString:[[Branch getInstance] getShortURLWithParams:params andTags:tags andChannel:channel andFeature:feature andStage:stage andCampaign:campaign andAlias:alias ignoreUAString:self.userAgentString forceLinkCreation:YES]]; + return [NSURL URLWithString:[[Branch getInstance] + getShortURLWithParams:params + andTags:tags + andChannel:channel + andFeature:feature + andStage:stage + andCampaign:campaign + andAlias:alias + ignoreUAString:self.userAgentString + forceLinkCreation:YES]]; } - return [NSURL URLWithString:[[Branch getInstance] getShortURLWithParams:params andTags:tags andChannel:channel andFeature:feature andStage:stage andCampaign:campaign andAlias:alias ignoreUAString:nil forceLinkCreation:YES]]; + + // Wrap the link in HTML content + if (self.activityType == UIActivityTypeMail && + [params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_HEADER] && + [params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_FOOTER]) { + NSURL *link = [NSURL URLWithString:[[Branch getInstance] + getShortURLWithParams:params + andTags:tags + andChannel:channel + andFeature:feature + andStage:stage + andCampaign:campaign + andAlias:alias + ignoreUAString:nil + forceLinkCreation:YES]]; + NSString *emailLink; + if ([params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_LINK_TEXT]) { + emailLink = [NSString stringWithFormat:@"%@", + link, [params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_LINK_TEXT]]; + } else { + emailLink = link.absoluteString; + } + + return [NSString stringWithFormat:@"%@%@%@", + [params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_HEADER], + emailLink, + [params objectForKey:BRANCH_LINK_DATA_KEY_EMAIL_HTML_FOOTER]]; + } + + return [NSURL URLWithString:[[Branch getInstance] + getShortURLWithParams:params + andTags:tags + andChannel:channel + andFeature:feature + andStage:stage + andCampaign:campaign + andAlias:alias + ignoreUAString:nil + forceLinkCreation:YES]]; } diff --git a/src/ios/dependencies/Branch-SDK/BranchConstants.h b/src/ios/dependencies/Branch-SDK/BranchConstants.h index 5ad1449c..6c4f08d8 100644 --- a/src/ios/dependencies/Branch-SDK/BranchConstants.h +++ b/src/ios/dependencies/Branch-SDK/BranchConstants.h @@ -104,6 +104,9 @@ extern NSString * const BRANCH_LINK_DATA_KEY_CANONICAL_URL; extern NSString * const BRANCH_LINK_DATA_KEY_CONTENT_EXPIRATION_DATE; extern NSString * const BRANCH_LINK_DATA_KEY_CONTENT_TYPE; extern NSString * const BRANCH_LINK_DATA_KEY_EMAIL_SUBJECT; +extern NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_HEADER; +extern NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_FOOTER; +extern NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_LINK_TEXT; extern NSString * const BRANCH_SPOTLIGHT_PREFIX; diff --git a/src/ios/dependencies/Branch-SDK/BranchConstants.m b/src/ios/dependencies/Branch-SDK/BranchConstants.m index ddacc389..cf45a21c 100644 --- a/src/ios/dependencies/Branch-SDK/BranchConstants.m +++ b/src/ios/dependencies/Branch-SDK/BranchConstants.m @@ -103,6 +103,9 @@ NSString * const BRANCH_LINK_DATA_KEY_CONTENT_EXPIRATION_DATE = @"$exp_date"; NSString * const BRANCH_LINK_DATA_KEY_CONTENT_TYPE = @"$content_type"; NSString * const BRANCH_LINK_DATA_KEY_EMAIL_SUBJECT = @"$email_subject"; +NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_HEADER = @"$email_html_header"; +NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_FOOTER = @"$email_html_footer"; +NSString * const BRANCH_LINK_DATA_KEY_EMAIL_HTML_LINK_TEXT = @"$email_html_link_text"; NSString * const BRANCH_SPOTLIGHT_PREFIX = @"io.branch.link.v1";