BranchMetrics / capacitor-branch-deep-links

Capacitor plugin for branch.io deep links
MIT License
33 stars 43 forks source link

Add ATT result handling to iOS #122

Closed nvahalik closed 7 months ago

nvahalik commented 7 months ago

Reference

SDK-XXXX -- .</p> <h2>Summary</h2> <p>This patch adds ATT handling for iOS. It is already in the <a rel="noreferrer nofollow" target="_blank" href="https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/commit/d4d270b352f2365edf53862ded3d77e15b2e793d">ReactNative version</a>.</p> <h2>Motivation</h2> <p>Without this change, ATT prompt opt-in doesn't affect Branch.</p> <h2>Type Of Change</h2> <ul> <li>[X] Bug fix (non-breaking change which fixes an issue)</li> <li>[X] New feature (non-breaking change which adds functionality)</li> <li>[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)</li> <li>[X] This change requires a documentation update</li> </ul> <h2>Testing Instructions</h2> <p>Pass in the results of the ATT prompt to the provided function. </p> <p>Note that you'll either need to do the ATT prompt yourself or you'll need another package like <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mahnuh/capacitor-plugin-app-tracking-transparency"><code>capacitor-plugin-app-tracking-transparency</code></a></p> <p>Example:</p> <pre><code>handleATTAuthorizationStatus(trackingStatus: AppTrackingStatus) { if (Capacitor.isNativePlatform() && this.platform.is('ios')) { let status: BranchATTAuthorizationStatus; // Convert the strings back to the correct integer value. switch(trackingStatus) { case 'authorized': status = 3; break; case 'denied': status = 2; break; case 'notDetermined': status = 0; break; case 'restricted': status = 1; break; } BranchDeepLinks.handleATTAuthorizationStatus({status}); } }</code></pre> <p>I have been in contact with support about this. This change is a merge of our working copy of the code with Branch's official code.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/gdeluna-branch"><img src="https://avatars.githubusercontent.com/u/94577415?v=4" />gdeluna-branch</a> commented <strong> 7 months ago</strong> </div> <div class="markdown-body"> <p>We'll review this soon, thanks!</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>