feat(background): iOS + Android background task templates#13
Open
A-Legg wants to merge 4 commits into
Open
Conversation
Changes: - AndroidManifest.xml.eex: add com.android.vending.BILLING permission for Play Billing (used by mob_iap and any other IAP plugin) - build.zig.eex: add -Dproject_plugin_sources option that accepts comma-separated name:path pairs, allowing mob_dev to auto-discover and compile plugin C sources from deps' priv/native/android/jni/ Refs: GenericJam/mob#27
The previous one-line comment didn't capture why the permission is declared unconditionally vs. gated on a generator flag. Expand it to document both the rationale (avoid generator complexity) and the tradeoff (Play Console may warn non-IAP apps about the unused permission) so users know how to opt out. Template-only change; no behavior shift. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…hooks Updates generated project templates to support iOS Background Fetch and silent push (content-available: 1) per docs/designs/background_tasks.md. - AppDelegate.m.eex: add didReceiveRemoteNotification:fetchCompletionHandler: and performFetchWithCompletionHandler: delegate methods - Info.plist.eex: add fetch and remote-notification to UIBackgroundModes Refs: docs/designs/background_tasks.md Phase 1
- Add MobBackgroundWorker.kt.eex: WorkManager worker that calls MobBridge.nativeBeginBackgroundTask(uuid, type, payload) and returns immediately (BEAM handles the work asynchronously). - Update MobBridge.kt.eex: add nativeBeginBackgroundTask JNI extern. - Update beam_jni.c.eex: add JNI stub calling mob_begin_background_task(). - Update MobFirebaseService.kt.eex: detect mob_background_task FCM data messages and enqueue MobBackgroundWorker. - Add androidx.work:work-runtime:2.9.0 to build.gradle.eex.
Author
Runtime PR
|
Author
Related PRs
|
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.
Summary
Templates for cross-platform Mob background tasks (Phase 1 iOS + Phase 2 Android):
AppDelegate.m.eexsilent push + background fetch hooks;Info.plist.eexUIBackgroundModesentries.MobBackgroundWorker.kt.eexWorkManager worker triggered by FCM data messages;MobFirebaseService.kt.eexenqueues worker onmob_background_taskFCM key;MobBridge.kt.eexnativeBeginBackgroundTaskJNI extern;beam_jni.c.eexnativeBeginBackgroundTaskJNI stub;build.gradle.eexwork-runtime:2.9.0dependency.Changes
android/app/src/main/java/MobBackgroundWorker.kt.eexandroid/app/src/main/java/MobFirebaseService.kt.eexandroid/app/src/main/java/MobBridge.kt.eexandroid/app/src/main/jni/beam_jni.c.eexandroid/app/build.gradle.eexios/AppDelegate.m.eex+ios/Info.plist.eexRelated PRs