Skip to content

[Feature] Unknown User Activation #764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 274 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
42693fa
conflict resolution after merging master to AUT
hardikmashru Jun 16, 2024
7f27cec
merge tests disabled
hardikmashru Jun 16, 2024
74b7e29
bug fixes with double values having trailing zeros
hardikmashru Jun 24, 2024
66298d4
Merge pull request #776 from Iterable/fixpricewith_trailingzeros
evantk91 Jun 24, 2024
1c594ab
Minmatch and single item matches done with test cases
hardikmashru Jun 26, 2024
4f66fe5
Is set match and test cases
hardikmashru Jun 27, 2024
1ad4f77
Fixed user event
hardikmashru Jun 27, 2024
caabfb4
[SDK] iOS - remove sync events call when SDK is initialized
hardikmashru Jun 27, 2024
2817f9c
check for SDK initialization needs to be separated and missing return…
hardikmashru Jun 27, 2024
125a2c5
Fixed comment
hardikmashru Jun 27, 2024
330fa0b
Fixed comment
hardikmashru Jun 27, 2024
acf3080
Fixed comment
hardikmashru Jun 27, 2024
a000a3d
[iOS-SDK] Not combinator logic
hardikmashru Jun 28, 2024
df58b61
Not test case done
hardikmashru Jun 28, 2024
214f60b
Merge branch 'itbl_min_match_items' into itbl_is_set_match
hardikmashru Jun 28, 2024
a7d9af6
Temp changes in is set
hardikmashru Jun 28, 2024
40294ae
Merge branch 'feature/itbl_track_anon_user' into itbl_min_match_items
hardikmashru Jun 28, 2024
db53f54
Added logs
hardikmashru Jul 1, 2024
0dac88e
Remove items key
hardikmashru Jul 1, 2024
8988852
fixed warnings
hardikmashru Jul 1, 2024
55dc491
some bug fixes
hardikmashru Jul 1, 2024
c17180c
fixed warnings
hardikmashru Jul 1, 2024
9e367cc
Merge pull request #781 from Iterable/MOB-8961
evantk91 Jul 1, 2024
3a3f888
Merge pull request #778 from Iterable/itbl_min_match_items
evantk91 Jul 1, 2024
578e6ad
Merge branch 'feature/itbl_track_anon_user' into MOB-8820
evantk91 Jul 1, 2024
224a0a1
Merge pull request #779 from Iterable/MOB-8820
evantk91 Jul 2, 2024
2ee4546
Added merge param
hardikmashru Jul 2, 2024
628771d
Merge all cases
hardikmashru Jul 2, 2024
dd8947a
Remove log
hardikmashru Jul 2, 2024
44fc499
Revert temp logic
hardikmashru Jul 2, 2024
3253d49
Fixed comment
hardikmashru Jul 3, 2024
7cd1ea0
Fixed comment
hardikmashru Jul 3, 2024
5b8d122
Merge pull request #780 from Iterable/MOB-8822
evantk91 Jul 3, 2024
b605438
Test file fixed
hardikmashru Jul 4, 2024
8abe640
All test cases are done
hardikmashru Jul 4, 2024
c211c89
Updatecart is set fixed
hardikmashru Jul 5, 2024
2c3a193
Update cart is set done
hardikmashru Jul 5, 2024
a6fe094
Merge branch 'feature/itbl_track_anon_user' into itbl_is_set_match
hardikmashru Jul 5, 2024
5ee11ea
Merge branch 'temp_isset' into itbl_is_set_match
hardikmashru Jul 5, 2024
87ef408
Fixed error
hardikmashru Jul 5, 2024
8756734
Remover static json
hardikmashru Jul 5, 2024
34bd746
Fixed test case issue
hardikmashru Jul 5, 2024
5417103
Revert update cart old changes
hardikmashru Jul 5, 2024
d6d37f4
Merge branch 'feature/itbl_track_anon_user' into itbl_merge_param
evantk91 Jul 8, 2024
4ff68e3
Merge pull request #787 from Iterable/itbl_merge_param
evantk91 Jul 8, 2024
a5ad68d
finished isSet criterias for updateCart and purchase events
hardikmashru Jul 9, 2024
11fc89f
Merge branch 'feature/itbl_track_anon_user' into itbl_is_set_match
hardikmashru Jul 9, 2024
72a9a3d
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Jul 9, 2024
85b0af4
Merge branch 'feature/itbl_track_anon_user' into itbl_is_set_match
evantk91 Jul 9, 2024
fcde6d7
Merge branch 'master' into feature/itbl_track_anon_user
Jul 9, 2024
b422fa7
Merge branch 'feature/itbl_track_anon_user' of github.com:Iterable/sw…
Jul 9, 2024
195d723
Merge branch 'feature/itbl_track_anon_user' into itbl_is_set_match
Jul 9, 2024
642fec7
addresses warning
Jul 9, 2024
f88c1fe
minor cleanup
Jul 9, 2024
02da1a2
Merge pull request #789 from Iterable/itbl_is_set_match
evantk91 Jul 9, 2024
ef7408f
updates merge flow to align with Android
Jul 10, 2024
087d496
resolves tests
Jul 10, 2024
9c0aa66
updates merge flow
Jul 10, 2024
0ad5070
resolves unit tests and sets merge to false for setting anonymous user
Jul 10, 2024
ba28308
Update swift-sdk/Internal/InternalIterableAPI.swift
evantk91 Jul 11, 2024
527933c
addresses comments
Jul 11, 2024
7f0d464
adds check for anonymous user id stored
Jul 13, 2024
cd861bf
reverts check
Jul 15, 2024
2ade395
Merge pull request #790 from Iterable/evan/MOB-8962-set-anonymous-user
evantk91 Jul 15, 2024
91c0876
adds anonymous user id stored check
Jul 18, 2024
cfc07df
fixes unit tests
Jul 18, 2024
b7c3f6c
adds event storage clearing if merge does not occur
Jul 18, 2024
0d28531
minor edits
Jul 18, 2024
9bfba2d
Merge pull request #791 from Iterable/evan/MOB-9109-add-anonymous-id-…
evantk91 Jul 18, 2024
7237b39
MOB-9138: Resolves DoesNotEqual criteria match issue
megha-iterable Aug 8, 2024
4559a1e
MOB-9314: Written automated unit test cases for different field types…
megha-iterable Aug 9, 2024
fed98c1
Resolve nested criteria match issue
hani-iterable Aug 9, 2024
3c8e124
Merge branch 'bugfix/MOB-9138-resolves-DoesNotEqual-criteria-match' i…
megha-iterable Aug 13, 2024
1f705f3
Merge pull request #803 from Iterable/bugfix/MOB-9314-automated-unit-…
megha-iterable Aug 13, 2024
25360cd
Merge pull request #801 from Iterable/bugfix/MOB-9138-resolves-DoesNo…
evantk91 Aug 13, 2024
0d745ac
Merge branch 'feature/itbl_track_anon_user' into bugfix_MOB_9149
evantk91 Aug 13, 2024
5eb3064
MOB-9310: Write automated unit tests against Combination logic with E…
megha-iterable Aug 14, 2024
f8489b9
MOB-9304 Replayed events don't have proper createdAt timestamp
megha-iterable Aug 17, 2024
b4366e3
MOB 8826 - limit the number of stored events and make the number of s…
megha-iterable Aug 20, 2024
b6a5cd0
refactoring
Aug 20, 2024
0762033
Merge branch 'feature/MOB-8826-Event-storage-configuration-for-AUT' i…
megha-iterable Aug 21, 2024
7c366d1
refactors setEmail and setUserId
Aug 22, 2024
cc60635
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9349-disabl…
evantk91 Aug 22, 2024
f39263d
MOB-9313: Fully supports comparison for data in Array data with all c…
megha-iterable Aug 23, 2024
006e24b
updates tryMergeUser
Aug 23, 2024
2d0a397
removes getSourceUserIdOrEmail function
Aug 23, 2024
3290f88
minor update
Aug 23, 2024
512a1ee
Merge pull request #807 from Iterable/feature/MOB-8826-Event-storage-…
evantk91 Aug 26, 2024
274e8c3
Merge branch 'feature/itbl_track_anon_user' into bugfix_MOB_9149
evantk91 Aug 26, 2024
c2c56fc
updates unit test
Aug 26, 2024
b9b10a6
Merge branch 'feature/itbl_track_anon_user' into bugfix/MOB-9310-auto…
evantk91 Aug 26, 2024
72c8993
Merge pull request #804 from Iterable/bugfix/MOB-9310-automated-unit-…
evantk91 Aug 26, 2024
300a2b1
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9313-Ful…
megha-iterable Aug 27, 2024
4e26650
Correcting some mark comments for some of the test cases
megha-iterable Aug 27, 2024
f7b8014
Merge branch 'feature/itbl_track_anon_user' into bugfix_MOB_9149
evantk91 Aug 27, 2024
e88f2b3
Merge pull request #802 from Iterable/bugfix_MOB_9149
evantk91 Aug 27, 2024
0640011
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9304-Rep…
evantk91 Aug 27, 2024
a1bf845
MOB-9309 Support nested field types
megha-iterable Aug 28, 2024
efeecf4
aligns with android
Aug 28, 2024
e86f117
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9349-disabl…
evantk91 Aug 28, 2024
b2b1a3d
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9421-make-t…
evantk91 Aug 28, 2024
1f73395
Merge pull request #810 from Iterable/evan/MOB-9349-disabling-merging…
evantk91 Aug 28, 2024
f4c3489
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9421-make-t…
Aug 28, 2024
6de2943
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9421-make-t…
evantk91 Aug 28, 2024
e4efbf3
Merge branch 'evan/MOB-9421-make-tryMergeUser-private' of github.com:…
Aug 28, 2024
bd2e082
reference localStorage in AnonymousUserMerge
Aug 28, 2024
49a20fb
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9304-Rep…
evantk91 Aug 29, 2024
836d6e7
Merge pull request #806 from Iterable/feature/MOB-9304-Replayed-event…
evantk91 Aug 29, 2024
a8ab8b0
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9309-Sup…
evantk91 Aug 29, 2024
920b25d
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9421-make-t…
evantk91 Aug 29, 2024
122f825
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9313-Ful…
evantk91 Aug 29, 2024
c44e26c
Merge pull request #811 from Iterable/feature/MOB-9313-Fully-support-…
evantk91 Aug 29, 2024
bde4fdd
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9421-make-t…
evantk91 Aug 29, 2024
ad609e4
Merge pull request #814 from Iterable/evan/MOB-9421-make-tryMergeUser…
evantk91 Aug 30, 2024
ae4e780
Update the nested logic as per the #PR_815 comment
megha-iterable Sep 2, 2024
9aeeb1d
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9309-Sup…
megha-iterable Sep 2, 2024
248dd0a
Merge pull request #815 from Iterable/feature/MOB-9309-Support-nested…
evantk91 Sep 2, 2024
9807ed2
Add Support isOneOf and isNotOneOf comparator
megha-iterable Sep 3, 2024
daaa10d
Merge pull request #818 from Iterable/feature/MOB-9387-Support-isOneO…
evantk91 Sep 4, 2024
ddcbf5b
Merge branch 'master' into feature/itbl_track_anon_user
megha-iterable Sep 10, 2024
ec20722
MOB-9449: update user should not be a separate call
megha-iterable Sep 10, 2024
ac2163b
comments for readibility
Sep 11, 2024
c3b0561
Merge pull request #820 from Iterable/feature/MOB-9449-update-user-sh…
evantk91 Sep 11, 2024
7074315
isNotOneOf criteria is causing a crash
megha-iterable Sep 15, 2024
4cd20be
Merge pull request #824 from Iterable/bugfix/MOB-9518-isNotOneOf-crit…
evantk91 Sep 15, 2024
b95df32
changes criterias to criteriaSets
Sep 18, 2024
897166e
resolves unit tests
Sep 18, 2024
c129779
Merge pull request #828 from Iterable/evan/MOB-9584
evantk91 Sep 19, 2024
2ac4e1f
adds IterableIdentityResolution
Sep 19, 2024
2bc840d
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9560-identi…
evantk91 Sep 19, 2024
d6f8f2f
updates function call in AnonymousUserManager
Sep 19, 2024
01b37ca
updates unit tests
Sep 19, 2024
20a6808
updates setting anonymous user to call internal IterableAPI
Sep 19, 2024
4483db4
- Add test to validate object created by custom event API calls
megha-iterable Sep 19, 2024
90d4bad
Merge branch 'feature/itbl_track_anon_user' into bugfix/MOB-9306-Add-…
megha-iterable Sep 20, 2024
1cf3c07
- Add support to check for nested criteria a.b.c
megha-iterable Sep 20, 2024
50efd83
- events are not getting replayed (unknown user to known user)
megha-iterable Sep 20, 2024
900011b
Merge pull request #832 from Iterable/bugfix/MOB-9517-events-are-not-…
evantk91 Sep 20, 2024
526169a
updates spelling
Sep 20, 2024
473980d
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9560-identi…
evantk91 Sep 20, 2024
dc777ee
corrects improperly assigned variables
Sep 20, 2024
b91d58e
Merge branch 'feature/itbl_track_anon_user' into bugfix/MOB-9306-Add-…
megha-iterable Sep 20, 2024
b82b8e6
Merge pull request #831 from Iterable/bugfix/MOB-9306-Add-test-to-val…
evantk91 Sep 20, 2024
9df309c
removes commented out functions
Sep 23, 2024
3d6bc72
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-9560-identi…
evantk91 Sep 24, 2024
eb28d3e
Merge pull request #830 from Iterable/evan/MOB-9560-identity-resolution
evantk91 Sep 24, 2024
0a91e58
Add handlers for notifying customer app of a newly created Anon userid
megha-iterable Sep 30, 2024
35c8b2a
Write automated unit tests against Complex criteria
megha-iterable Sep 30, 2024
b6a9073
Merge pull request #834 from Iterable/feature/MOB-9637-Add-handlers-f…
evantk91 Sep 30, 2024
4e36187
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9310-Wri…
evantk91 Sep 30, 2024
315d312
Add support for Nested JSON with Array Criteria Match
megha-iterable Oct 4, 2024
445c893
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Oct 7, 2024
ac62b9e
Merge branch 'feature/itbl_track_anon_user' into bugfix/MOB-9672-Nest…
evantk91 Oct 7, 2024
0c7981a
Merge pull request #837 from Iterable/bugfix/MOB-9672-Nested-JSON-wit…
evantk91 Oct 7, 2024
c7f6f43
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9310-Wri…
evantk91 Oct 8, 2024
ceabece
updates complex criteria 3 tests
Oct 8, 2024
dad1d7e
Merge pull request #835 from Iterable/feature/MOB-9310-Write-automate…
evantk91 Oct 8, 2024
22f4d60
adds unit test case
Oct 8, 2024
6759822
Keep AUT off until consent to track has been granted
megha-iterable Oct 9, 2024
9edb215
enable anonymousUsageTrack permission to test User merge scenarios tests
megha-iterable Oct 9, 2024
fa61f91
Merge pull request #838 from Iterable/evan/additional-complex-criteri…
evantk91 Oct 9, 2024
6077610
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9677-Kee…
evantk91 Oct 10, 2024
7b89260
Merge pull request #839 from Iterable/feature/MOB-9677-Keep-AUT-off-u…
evantk91 Oct 10, 2024
2b9c9e6
adds consent log statement
Oct 11, 2024
18c1c94
Merge pull request #841 from Iterable/evan/log-consent
evantk91 Oct 11, 2024
8e7371f
adds additional logging
Oct 11, 2024
4124e4d
minor edits
Oct 11, 2024
42d3b6f
Merge pull request #842 from Iterable/evan/additional-testing-logging
evantk91 Oct 11, 2024
956048c
adds check for anon tracking enablement and updates logging
Oct 14, 2024
0561323
Merge pull request #843 from Iterable/evan/MOB-9751
evantk91 Oct 14, 2024
e0612cc
updates replay to call syncEvents directly
Oct 15, 2024
b54a9c9
Update swift-sdk/Internal/InternalIterableAPI.swift
evantk91 Oct 16, 2024
f6741cb
Update swift-sdk/Internal/InternalIterableAPI.swift
evantk91 Oct 16, 2024
23e70ff
updates unit tests
Oct 16, 2024
7b2c9c9
updates unit tests
Oct 16, 2024
9ef537f
updates unit tests
Oct 17, 2024
e55535f
🎨 Formatted code and removed unnecessary let statements
joaodordio Oct 17, 2024
cd981cb
Merge pull request #846 from Iterable/evan/MOB-9646
evantk91 Oct 17, 2024
28f1524
Merge pull request #845 from Iterable/evan/MOB-9974
evantk91 Oct 17, 2024
8fe79bd
adding user update storage first steps
Oct 22, 2024
e976e8e
🔧 Updated UserDefaults implementation for anonumous user update
joaodordio Oct 22, 2024
fb972c8
🔧 Fixed wrong key usage
joaodordio Oct 22, 2024
f5ad559
🔧 Separated user update logic from regular user events saved in local…
joaodordio Oct 22, 2024
3395df1
🔀 Fixed code flow control
joaodordio Oct 22, 2024
c1aed93
✅ Fixed unit tests
joaodordio Oct 22, 2024
1a4cc8a
✅ Fixed lint issue
joaodordio Oct 22, 2024
761154b
updates user update saving logic
Oct 22, 2024
73e7a92
Merge pull request #848 from Iterable/evan/MOB-9996
evantk91 Oct 22, 2024
1d44bbb
Added support for fetching new JWT prior to calling merge
megha-iterable Oct 23, 2024
f3a0799
resolve property 'config' in closure requires explicit use of 'self' …
megha-iterable Oct 23, 2024
bcbe8da
cleanup
Oct 23, 2024
72cd8e4
🔧 Added sdk initialization checks to all API calls that warrant it. C…
joaodordio Oct 24, 2024
093e1e8
updates method naming
Oct 24, 2024
f7fafc8
renaming
Oct 24, 2024
b137b86
Merge pull request #851 from Iterable/evan/MOB-10055
evantk91 Oct 24, 2024
57860d0
Merge branch 'feature/itbl_track_anon_user' into joao/MOB-9946-ios-ad…
evantk91 Oct 24, 2024
ffa7efd
update public method gating
Oct 24, 2024
3083362
Merge branch 'joao/MOB-9946-ios-add-auth-checks-for-api-call-methods'…
evantk91 Oct 24, 2024
02e1f42
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9746-Use…
evantk91 Oct 24, 2024
3f449ae
Merge pull request #852 from Iterable/evan/MOB-9946
evantk91 Oct 25, 2024
9a26368
Merge pull request #850 from Iterable/joao/MOB-9946-ios-add-auth-chec…
evantk91 Oct 28, 2024
49eb8f3
Merge branch 'feature/itbl_track_anon_user' into feature/MOB-9746-Use…
evantk91 Oct 30, 2024
9ed3cdd
Merge pull request #849 from Iterable/feature/MOB-9746-Use-destinatio…
evantk91 Oct 30, 2024
1a5ec6d
renaming
Oct 30, 2024
ebfa82a
Merge branch 'master' into evan/MOB-10089
evantk91 Oct 30, 2024
d4cb261
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Oct 30, 2024
23b6394
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-10089
evantk91 Oct 30, 2024
1d56e8a
Merge pull request #856 from Iterable/evan/MOB-10089
evantk91 Oct 30, 2024
49940e2
renames to enableAnonActivation
Oct 31, 2024
e23c17c
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-10093-final…
evantk91 Oct 31, 2024
9e05993
remaning
Oct 31, 2024
e7d04d2
Merge pull request #857 from Iterable/evan/MOB-10093-final-cleanup
evantk91 Oct 31, 2024
7464bca
removes anon user markdown files
Nov 5, 2024
d6a5071
Merge pull request #858 from Iterable/evan/MOB-10120
evantk91 Nov 5, 2024
a7b3624
adds clearVisitorEventsAndUserData method
Nov 6, 2024
b51513a
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-10126
evantk91 Nov 6, 2024
a2579be
Merge pull request #859 from Iterable/evan/MOB-10126
evantk91 Nov 6, 2024
abb0460
updates pointers and changelog
Nov 7, 2024
196d443
clears local storage when replay is false
Nov 7, 2024
2955f6f
fixes unit tests
Nov 7, 2024
709a05e
Merge pull request #862 from Iterable/evan/MOB-10136
evantk91 Nov 7, 2024
b5f6d4a
Merge branch 'feature/itbl_track_anon_user' into evan/MOB-10114-6.6.0…
evantk91 Nov 7, 2024
6db86f8
adds release notes to changelog
Nov 8, 2024
038176a
update pointers
Nov 11, 2024
3ae0d6a
reverts unit test
Nov 11, 2024
2413ab2
minor edit
Nov 11, 2024
1cbd51a
Merge pull request #861 from Iterable/evan/MOB-10114-6.6.0-beta
evantk91 Nov 11, 2024
0256e0b
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Nov 19, 2024
7955b8b
update pointers and changelog
Dec 6, 2024
1a6ebf2
Merge pull request #870 from Iterable/evan/MOB-10367-prepare-6.6.0-be…
evantk91 Dec 6, 2024
82fdf09
updates github repo naming
Dec 7, 2024
35247e2
Merge branch 'master' into feature/itbl_track_anon_user
joaodordio Jan 16, 2025
c12c4a8
🔀 Fixed merge conflicts
joaodordio Jan 16, 2025
3f54136
[MOB-10616] Improve Criteria Update Frequency (#886)
joaodordio Jan 31, 2025
c138ef9
[MOB-10781] updates cooldown period constant (#892)
evantk91 Feb 3, 2025
6f57b12
Fix AUT issue where multiple users are created and merge (#899)
lokeshdud Feb 18, 2025
58ad654
Merge branch 'master' into feature/itbl_track_anon_user
Feb 18, 2025
0743abd
[MOB-10929] updates changelog and version numbers (#901)
evantk91 Feb 18, 2025
eefbf17
Merge branch 'master' into feature/itbl_track_anon_user
Jul 8, 2025
90d6831
MOB-11678: UUA - Consent Logging (#921)
joaodordio Jul 22, 2025
07633a6
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Jul 23, 2025
bdfbf1f
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Jul 23, 2025
8dd4a90
[MOB-11683] Rename Anonymous User to Unknown User terminology across …
sumeruchat Jul 28, 2025
a855624
[MOB-XXXX] rename anon session context (#928)
evantk91 Jul 29, 2025
701016b
[MOB-11790] fixes criteria fetching tests (#929)
evantk91 Jul 29, 2025
e08fc45
[MOB-11817] fixes consent logging timestamp (#932)
evantk91 Aug 4, 2025
ca3b4d2
Merge branch 'master' into feature/itbl_track_anon_user
evantk91 Aug 4, 2025
62bcd84
updates consent logging to be called after event replay completes
Aug 5, 2025
8949da5
Revert "updates consent logging to be called after event replay compl…
Aug 5, 2025
5ce4b1c
[MOB-11789] consent logging triggered by successful register call (#937)
evantk91 Aug 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 87 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
total_tests: 0,
passed_tests: 0,
failed_tests: 0,
success_rate: 0
success_rate: 0,
skipped_tests: 0
};

try {
Expand All @@ -77,17 +78,93 @@ jobs:
} catch (error) {
core.warning(`Error reading test summary: ${error.message}`);
}


// Extract just the main content from the HTML - removing the HTML tags

// Clean and optimize HTML for GitHub Check Run API
function stripHtml(html) {
// Simple regex to extract text content from HTML
if (!html) return '';

return html
.replace(/<h2>[\s\S]*?<\/h2>/gi, '')
// Remove problematic elements
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, '')
// Clean up complex attributes but keep basic structure
.replace(/\s*(class|id|dir|data-[^=]*|role|aria-[^=]*|tabindex)="[^"]*"/gi, '')
.replace(/\s*(markdown-accessiblity-table|data-catalyst)="[^"]*"/gi, '')
// Remove GitHub-specific elements that don't render in Check Runs
.replace(/<g-emoji[^>]*>.*?<\/g-emoji>/gi, '⚠️')
.replace(/<clipboard-copy[\s\S]*?<\/clipboard-copy>/gi, '')
.replace(/<div class="zeroclipboard-container[\s\S]*?<\/div>/gi, '')
.replace(/<div class="snippet-clipboard-content[\s\S]*?<\/div>/gi, '')
// Clean up excessive whitespace
.replace(/\s+/g, ' ')
.replace(/>\s+</g, '><')
.trim();
}

// Create the check with test results as summary and coverage as details
// Function to safely truncate content to fit byte limit
function truncateToByteLimit(text, maxBytes) {
if (!text) return '';

// Convert to bytes to check actual size
const encoder = new TextEncoder();
let bytes = encoder.encode(text);

if (bytes.length <= maxBytes) {
return text;
}

// Binary search to find the maximum length that fits
let left = 0;
let right = text.length;
let result = '';

while (left <= right) {
const mid = Math.floor((left + right) / 2);
const substring = text.substring(0, mid);
const substringBytes = encoder.encode(substring);

if (substringBytes.length <= maxBytes) {
result = substring;
left = mid + 1;
} else {
right = mid - 1;
}
}

// Add truncation indicator if content was cut off
if (result.length < text.length) {
const truncateMsg = '\n\n... (truncated due to size limits)';
const truncateMsgBytes = encoder.encode(truncateMsg);

if (encoder.encode(result).length + truncateMsgBytes.length <= maxBytes) {
result += truncateMsg;
}
}

return result;
}

// Extract and clean content
const cleanTestReport = stripHtml(testReport);
const cleanCoverageReport = stripHtml(coverageReport);

// Create concise summary focusing on key information
const summaryContent = `Test Results Summary:
• Total Tests: ${testStats.total_tests}
• Passed: ${testStats.passed_tests}
• Failed: ${testStats.failed_tests}
• Skipped: ${testStats.skipped_tests || 0}
• Success Rate: ${(testStats.success_rate || 0).toFixed(1)}%

${cleanTestReport}`;

// Ensure summary fits within GitHub's 65535 byte limit (leaving some buffer)
const truncatedSummary = truncateToByteLimit(summaryContent, 65000);

// Ensure coverage report fits within the text field limit
const truncatedCoverage = truncateToByteLimit(cleanCoverageReport, 65000);

// Create the check with test results
await github.rest.checks.create({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -96,9 +173,9 @@ jobs:
status: 'completed',
conclusion: testStats.failed_tests > 0 ? 'failure' : 'success',
output: {
title: `Tests: ${testStats.passed_tests}/${testStats.passed_tests + testStats.failed_tests} passed (${(testStats.success_rate).toFixed(1)}%) Skipped: ${testStats.skipped_tests}`,
summary: stripHtml(testReport.substring(0, 65000)),
text: stripHtml(coverageReport.substring(0, 65000))
title: `Tests: ${testStats.passed_tests}/${testStats.passed_tests + testStats.failed_tests} passed (${(testStats.success_rate || 0).toFixed(1)}%) Skipped: ${testStats.skipped_tests || 0}`,
summary: truncatedSummary,
text: truncatedCoverage
}
});

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ xcuserdata

.swiftpm/

# Claude AI agent settings
.claude/

*~
Podfile.lock
Pods/
Expand Down
166 changes: 166 additions & 0 deletions AGENT_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# AGENT README - Iterable Swift SDK

## Project Overview
This is the **Iterable Swift SDK** for iOS/macOS integration. The SDK provides:
- Push notification handling
- In-app messaging
- Event tracking
- User management
- Unknown user tracking

## Key Architecture
- **Core SDK**: `swift-sdk/` - Main SDK implementation
- **Sample Apps**: `sample-apps/` - Example integrations
- **Tests**: `tests/` - Unit tests, UI tests, and integration tests
- **Notification Extension**: `notification-extension/` - Rich push support

## Development Workflow

### 🔨 Building the SDK
```bash
./agent_build.sh
```
- Validates compilation on iOS Simulator
- Shows build errors with context
- Requires macOS with Xcode

### Listing All Available Tests

# List all available test suites
```bash
./agent_test.sh --list
```

### 🧪 Running Tests
```bash
# Run all tests
./agent_test.sh

# Run specific test suite
./agent_test.sh IterableApiCriteriaFetchTests

# Run specific unit test (dot notation - recommended)
./agent_test.sh "IterableApiCriteriaFetchTests.testForegroundCriteriaFetchWhenConditionsMet"

# Run any specific test with path
./agent_test.sh "unit-tests/IterableApiCriteriaFetchTests/testForegroundCriteriaFetchWhenConditionsMet"
```
- Executes on iOS Simulator with accurate pass/fail reporting
- Returns exit code 0 for success, 1 for failures
- Shows detailed test counts and failure information
- `--list` shows all test suites with test counts
- Requires password for xcpretty installation (first run)

## Project Structure
```
swift-sdk/
├── swift-sdk/ # Main SDK source
│ ├── Core/ # Public APIs and models
│ ├── Internal/ # Internal implementation
│ ├── SDK/ # Main SDK entry points
│ └── ui-components/ # SwiftUI/UIKit components
├── tests/ # Test suites
│ ├── unit-tests/ # Unit tests
│ ├── ui-tests/ # UI automation tests
│ └── endpoint-tests/ # API endpoint tests
├── sample-apps/ # Example applications
└── notification-extension/ # Push notification extension
```

## Key Classes
- **IterableAPI**: Main SDK interface
- **IterableConfig**: Configuration management
- **InternalIterableAPI**: Core implementation
- **UnknownUserManager**: Unknown user tracking
- **LocalStorage**: Data persistence

## Common Tasks

### Adding New Features
1. Build first: `./agent_build.sh`
2. Implement in `swift-sdk/Internal/` or `swift-sdk/SDK/`
3. Add tests in `tests/unit-tests/`
4. Verify: `./agent_test.sh` (all tests) or `./agent_test.sh YourTestSuite` (specific suite)

### Debugging Build Issues
- Build script shows compilation errors with file paths
- Check Xcode project references in `swift-sdk.xcodeproj/project.pbxproj`
- Verify file renames are reflected in project file

### Test Failures
- Test script shows specific failures with line numbers and detailed error messages
- Run failing tests individually: `./agent_test.sh "TestSuite.testMethod"`
- Mock classes available in `tests/common/`
- Update parameter names when refactoring APIs

## Requirements
- **macOS**: Required for Xcode builds
- **Xcode**: Latest stable version
- **Ruby**: For xcpretty (auto-installed)
- **iOS Simulator**: For testing

## Quick Start for AI Agents
1. Run `./agent_build.sh` to verify project builds
2. Run `./agent_test.sh` to check test health (or `./agent_test.sh TestSuite` for specific suite)
3. Make changes to source files
4. Re-run both scripts to validate
5. Debug failing tests: `./agent_test.sh "TestSuite.testMethod"`
6. Commit when both pass ✅

## Test Filtering Examples
```bash
# Debug specific failing tests
./agent_test.sh "IterableApiCriteriaFetchTests.testForegroundCriteriaFetchWhenConditionsMet"

# Run a problematic test suite
./agent_test.sh ValidateCustomEventUserUpdateAPITest

# Check auth-related tests
./agent_test.sh AuthTests
```

## AI Agent Memory System

### 🧠 Update Instructions for AI Agents
**IMPORTANT**: When you discover something useful while working on this codebase, update this README to help future AI agents. Add learnings to the sections below.

### 📍 Code Location Map
- **Auth Logic**: `swift-sdk/Internal/AuthManager.swift` (main auth manager), `swift-sdk/Internal/Auth.swift` (auth models)
- **API Calls**: `swift-sdk/Internal/api-client/ApiClient.swift` (main client), `swift-sdk/Internal/Network/NetworkHelper.swift` (networking)
- **Models**: `swift-sdk/Core/Models/` (all data structures - CommerceItem, IterableInAppMessage, etc.)
- **Main Entry**: `swift-sdk/SDK/IterableAPI.swift` (public API), `swift-sdk/Internal/InternalIterableAPI.swift` (core implementation)
- **Request Handling**: `swift-sdk/Internal/api-client/Request/` (online/offline processors)

### 🛠️ Common Task Recipes

**Add New API Endpoint:**
1. Add path constant to `swift-sdk/Core/Constants.swift` in `Const.Path`
2. Add method to `ApiClientProtocol.swift` and implement in `ApiClient.swift`
3. Create request in `swift-sdk/Internal/api-client/Request/RequestCreator.swift`
4. Add to `RequestHandlerProtocol.swift` and `RequestHandler.swift`

**Modify Auth Logic:**
- Main logic: `swift-sdk/Internal/AuthManager.swift`
- Token storage: `swift-sdk/Internal/Utilities/Keychain/IterableKeychain.swift`
- Auth failures: Handle in `RequestProcessorUtil.swift`

**Add New Model:**
- Create in `swift-sdk/Core/Models/YourModel.swift`
- Make it `@objcMembers public class` for Objective-C compatibility
- Implement `Codable` if it needs JSON serialization

### 🐛 Common Failure Solutions

**"Test X failed"** → Check test file in `tests/unit-tests/` - often parameter name mismatches after refactoring

**"Build failed: file not found"** → Update `swift-sdk.xcodeproj/project.pbxproj` to include new/renamed files

**"Auth token issues"** → Check `AuthManager.swift` and ensure JWT format is correct in tests

**"Network request fails"** → Check endpoint in `Constants.swift` and request creation in `RequestCreator.swift`

## Notes
- Always test builds after refactoring
- Parameter name changes require test file updates
- Project file (`*.pbxproj`) may need manual updates for file renames
- Sample apps demonstrate SDK usage patterns
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [6.6.0-beta3]

- This release includes fixes for the Unknown user activation private beta:
- Criteria is now fetched on foregrounding the app by default. This feature can be turned off setting enableForegroundCriteriaFetch flag to false.
- Unknown user ids are only generated once when multiple track calls are made.
- Unknown user activation is currently in private beta. If you'd like to learn more about it or discuss using it, talk to your Iterable customer success manager (who can also provide detailed documentation).

## [6.6.0-beta2]

- This release fixes beta1 release which was released from the wrong branch.

## [6.6.0-beta1]

- This release includes initial support for Unknown user activation, a feature that allows marketers to convert valuable visitors into customers. With this feature, the SDK can:
- Fetch unknown user profile creation criteria from your Iterable project, and then automatically create Iterable user profiles for Unknown users who meet these criteria.
- Save information about a user's previous interactions with your application to their unknown user profile, after it's created.
- Display personalized messages for Unknown users (in-app, push, and embedded messages).
- Merge unknown user profiles into an existing, known user profiles (when needed).
- Unknown user activation is currently in private beta. If you'd like to learn more about it or discuss using it, talk to your Iterable customer success manager (who can also provide detailed documentation).

## [Unreleased]

## [6.5.13]
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

🤖 **AI Agent Instructions**

Please read the `agent/AGENT_README.md` file for comprehensive project information, development workflow, and testing procedures.
Please read the `AGENT_README.md` file for comprehensive project information, development workflow, and testing procedures.

All the information you need to work on this Iterable Swift SDK project is documented there.
51 changes: 51 additions & 0 deletions agent_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash

# This script is to be used by LLMs and AI agents to build the Iterable Swift SDK on macOS.
# It uses xcpretty to format the build output and only shows errors.
# It also checks if the build is successful and exits with the correct status.

# Check if running on macOS
if [[ "$(uname)" != "Darwin" ]]; then
echo "❌ This script requires macOS to run Xcode builds"
exit 1
fi

# Make sure xcpretty is installed
if ! command -v xcpretty &> /dev/null; then
echo "xcpretty not found, installing via gem..."
sudo gem install xcpretty
fi

echo "Building Iterable Swift SDK..."

# Create a temporary file for the build output
TEMP_OUTPUT=$(mktemp)

# Run the build and capture all output
xcodebuild \
-project swift-sdk.xcodeproj \
-scheme "swift-sdk" \
-configuration Debug \
-sdk iphonesimulator \
build > $TEMP_OUTPUT 2>&1

# Check the exit status
BUILD_STATUS=$?

# Show errors and warnings if build failed
if [ $BUILD_STATUS -eq 0 ]; then
echo "✅ Iterable SDK build succeeded!"
else
echo "❌ Iterable SDK build failed with status $BUILD_STATUS"
echo ""
echo "🔍 Build errors:"
grep -E 'error:|fatal:' $TEMP_OUTPUT | head -10
echo ""
echo "⚠️ Build warnings:"
grep -E 'warning:' $TEMP_OUTPUT | head -5
fi

# Remove the temporary file
rm $TEMP_OUTPUT

exit $BUILD_STATUS
Loading