Fix sync file structure and implement iOS BGTaskScheduler#591
Draft
Fix sync file structure and implement iOS BGTaskScheduler#591
Conversation
Co-authored-by: farfromrefug <[email protected]>
Co-authored-by: farfromrefug <[email protected]>
…larms Co-authored-by: farfromrefug <[email protected]>
…and improve performance Co-authored-by: farfromrefug <[email protected]>
Co-authored-by: farfromrefug <[email protected]>
Co-authored-by: farfromrefug <[email protected]>
Co-authored-by: farfromrefug <[email protected]>
Co-authored-by: farfromrefug <[email protected]>
Copilot
AI
changed the title
[WIP] Add sync throttling for configurable sync intervals
Add per-service sync throttling with background support
Mar 14, 2026
…te iOS background sync Co-authored-by: farfromrefug <[email protected]>
Copilot
AI
changed the title
Add per-service sync throttling with background support
Fix sync file structure and implement iOS BGTaskScheduler
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NativeScript's module resolution prioritizes
sync.${platform}.tsoversync.ts, causing the common sync logic to be skipped entirely on both platforms.Changes
File Structure
sync.ts→sync.common.ts- shared SyncService implementationsync.android.ts- exports from common, sets Android AlarmManager implementationssync.ios.ts- exports from common, sets iOS BGTaskScheduler implementationsPlatform files inject their implementations into the common module:
When importing
~/services/sync, NativeScript loads the platform-specific file which re-exports everything from common plus platform implementations.iOS Background Sync
${__APP_ID__}.syncMap<serviceId, scheduledTime>for pending syncs across all servicessetTimeouton iOS < 13Android
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.