Skip to content

Conversation

@sumeruchat
Copy link
Contributor

@sumeruchat sumeruchat commented Dec 30, 2025

🔗 Deep Linking Integration Test - Universal Links from External Apps

deeplinktest.mp4

What This Does

Adds an automated integration test that validates deep linking works when users tap links from external iOS apps like Reminders, Notes, or Messages.

The Test Flow

  1. Opens Reminders app and creates a new reminder
  2. Adds a test link (https://links.tsetester.com/a/test?url=tester://product/12345)
  3. Taps the link to trigger iOS universal link handling
  4. Verifies the app opens and receives the universal link
  5. Confirms link unwrapping - Iterable SDK unwraps the /a/ tracking link
  6. Validates deep link routing - SDK correctly routes to tester://product/12345
  7. Checks the result - App displays the deep link destination

Running It

# Run the deep linking test
./scripts/run-tests.sh deeplink

# Run in fast mode (quicker, skips some validations)
./scripts/run-tests.sh deeplink --fast-test

Test Results

✅ Test passes in ~60 seconds
✅ Automated app switching (test app → Reminders → test app)
✅ Screenshots captured at each step
✅ Full XCTest report generated

Technical Setup

  • Universal Link Domain: links.tsetester.com
  • Test Deep Link Scheme: tester://
  • Associated Domains: Configured in app entitlements
  • SDK API: Uses IterableAPI.handle(universalLink:)

@sumeruchat sumeruchat force-pushed the feature/BCIT-deeplink branch from 0987846 to d067a87 Compare December 30, 2025 15:59
@sumeruchat sumeruchat changed the title BCIT Deeplinking Tests SDK-216 BCIT App configured for deep link handling Jan 5, 2026
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.73%. Comparing base (6ff8247) to head (8c5049a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #991      +/-   ##
==========================================
+ Coverage   69.72%   69.73%   +0.01%     
==========================================
  Files         111      111              
  Lines        8981     8981              
==========================================
+ Hits         6262     6263       +1     
+ Misses       2719     2718       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return true // No deep link handling in this test app
print("🔗 [APP] Universal link received via NSUserActivity")
print("🔗 [APP] Activity type: \(userActivity.activityType)")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is our deep / universal link handler

<string>applinks:example.com</string>
<string>applinks:links.example.com</string>
<string>applinks:links.tsetester.com</string>
</array>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where we have specified an associated domain

XCTAssertTrue(reminders.wait(for: .runningForeground, timeout: standardTimeout), "Reminders app should launch")
sleep(2)

// Dismiss welcome modal if it appears
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the logic for opening the reminders app

Copy link
Contributor Author

@sumeruchat sumeruchat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving some comments for clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants