Logging-in with actual account triggers the next flow which opens the sandbox purchase modal so I cannot use the sandbox account to log in. Fixed it so I can use sandbox account to test purchasing subs product.
Debugging in progress
Reconfirmed whether subscription plan changes are properly reflected in settings and vice versa
Sync works correctly; delay appears to be due to sandbox environment latency. It is probably related to the main account.
Test subscription plan modal
When changing plans, updates are reflected in the settings options
Handles case when user cancels right before biometric registration
After changing subscription in settings, clicking the Restore button fetches product info from Apple correctly
Store user email in the database for management
July 26
Retested subscriptions
After reinstalling the app, subscription info is restored, but usage count was resetting → Fixed
Fix: Issue where the latest purchased product wasn’t syncing with the server
Fix: Restore userId when there’s no local data but data exists on the server
Improved functionality to restore user ID using original_transaction_identifier_ios from server subscription info after app reinstall
Fix: Bug where duplicate rows were being inserted into the daily_usage table