forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
ImageModule Swift fix #5
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
Closed
Closed
Conversation
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
HubertBer
pushed a commit
that referenced
this pull request
Dec 4, 2025
# Why Ran into an issue with background tasks (triggered by a background notification): <details> <summary>Details</summary> ``` (lldb) bt * thread #19, queue = 'expo.application.remoteNotification', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1038578e4) frame #0: 0x00000001038578e4 libdispatch.dylib`_dispatch_assert_queue_fail + 120 frame #1: 0x000000010388e01c libdispatch.dylib`dispatch_assert_queue$V2.cold.1 + 116 frame #2: 0x0000000103857868 libdispatch.dylib`dispatch_assert_queue + 108 frame #3: 0x000000018996003c libswift_Concurrency.dylib`_swift_task_checkIsolatedSwift + 48 frame #4: 0x00000001899bf724 libswift_Concurrency.dylib`swift_task_isCurrentExecutorWithFlagsImpl(swift::SerialExecutorRef, swift::swift_task_is_current_executor_flag) + 356 frame #5: 0x00000001050e6678 notificationtester.debug.dylib`closure #1 in closure #2 in static ExpoAppDelegateSubscriberManager.application(result=.noData, failedCount=0, newDataCount=0, subscribersLeft=2, completionHandler=0x0000000104f6dea8 notificationtester.debug.dylib`partial apply forwarder for reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned __C.UIBackgroundFetchResult) -> () to @escaping @callee_guaranteed (@unowned __C.UIBackgroundFetchResult) -> () at <compiler-generated>) at ExpoAppDelegateSubscriberManager.swift:0 frame #8: 0x000000010386e2e0 libdispatch.dylib`_dispatch_client_callout + 16 frame #9: 0x00000001038653cc libdispatch.dylib`_dispatch_lane_barrier_sync_invoke_and_complete + 172 * frame #10: 0x00000001050e650c notificationtester.debug.dylib`closure #2 in static ExpoAppDelegateSubscriberManager.application(result=.noData, dispatchQueue=0x000000012c455d80, failedCount=0, newDataCount=0, subscribersLeft=2, completionHandler=0x0000000104f6dea8 notificationtester.debug.dylib`partial apply forwarder for reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned __C.UIBackgroundFetchResult) -> () to @escaping @callee_guaranteed (@unowned __C.UIBackgroundFetchResult) -> () at <compiler-generated>) at ExpoAppDelegateSubscriberManager.swift:225:21 frame #12: 0x0000000104f6bad8 notificationtester.debug.dylib`__94-[EXLegacyAppDelegateWrapper application:didReceiveRemoteNotification:fetchCompletionHandler:]_block_invoke(.block_descriptor=0x0000000120206340, result=UIBackgroundFetchResultNoData) at EXLegacyAppDelegateWrapper.m:212:9 frame #13: 0x0000000104f65064 notificationtester.debug.dylib`__63-[EXTaskService runTasksWithReason:userInfo:completionHandler:]_block_invoke(.block_descriptor=0x000000012bbebc90, results=@"1 element") at EXTaskService.m:351:7 frame #14: 0x0000000104f666f8 notificationtester.debug.dylib`__67-[EXTaskService _runTasksSupportingLaunchReason:userInfo:callback:]_block_invoke(.block_descriptor=0x0000000120204f80, results=@"1 element") at EXTaskService.m:517:7 frame #15: 0x0000000104f60cdc notificationtester.debug.dylib`-[EXTaskExecutionRequest _maybeExecuteCallback](self=0x000000012c519b60, _cmd="_maybeExecuteCallback") at EXTaskExecutionRequest.m:59:5 frame #16: 0x0000000104f60c74 notificationtester.debug.dylib`-[EXTaskExecutionRequest maybeEvaluate](self=0x000000012c519b60, _cmd="maybeEvaluate") at EXTaskExecutionRequest.m:46:5 frame #17: 0x0000000104f60b98 notificationtester.debug.dylib`-[EXTaskExecutionRequest task:didFinishWithResult:](self=0x000000012c519b60, _cmd="task:didFinishWithResult:", task=0x0000000120370840, result=(long)1) at EXTaskExecutionRequest.m:35:3 frame #18: 0x0000000104f63e64 notificationtester.debug.dylib`-[EXTaskService notifyTaskWithName:forAppId:didFinishWithResponse:](self=0x00000001200014c0, _cmd="notifyTaskWithName:forAppId:didFinishWithResponse:", taskName=@"BACKGROUND_NOTIFICATION_TASK", appId=@"mainApplication", response=1 key/value pair) at EXTaskService.m:217:7 frame #19: 0x0000000104f617c4 notificationtester.debug.dylib`-[EXTaskManager notifyTaskFinished:withResponse:resolve:reject:](self=0x0000000120371600, _cmd="notifyTaskFinished:withResponse:resolve:reject:", taskName=@"BACKGROUND_NOTIFICATION_TASK", response=1 key/value pair, resolve=0x000000010ad20e7c, reject=0x000000010ad213bc) at EXTaskManager.m:104:3 frame #20: 0x000000018b4ee6c4 CoreFoundation`__invoking___ + 148 frame #21: 0x000000018b4ee550 CoreFoundation`-[NSInvocation invoke] + 424 frame #22: 0x0000000105015b5c notificationtester.debug.dylib`-[EXExportedModule callExportedMethod:withArguments:resolver:rejecter:](self=0x0000000120371600, _cmd="callExportedMethod:withArguments:resolver:rejecter:", methodName=@"notifyTaskFinishedAsync", arguments=@"2 elements", resolve=0x000000010ad20e7c, reject=0x000000010ad213bc) at EXExportedModule.m:168:3 frame #23: 0x000000010501fa10 notificationtester.debug.dylib`__79-[EXNativeModulesProxy callMethod:methodNameOrKey:arguments:resolver:rejecter:]_block_invoke(.block_descriptor=0x0000000122ea9270) at EXNativeModulesProxy.mm:243:7 frame #24: 0x000000010385463c libdispatch.dylib`_dispatch_call_block_and_release + 32 frame #25: 0x000000010386e2e0 libdispatch.dylib`_dispatch_client_callout + 16 frame expo#26: 0x000000010385cb4c libdispatch.dylib`_dispatch_lane_serial_drain + 796 frame expo#27: 0x000000010385d7d4 libdispatch.dylib`_dispatch_lane_invoke + 432 frame expo#28: 0x0000000103869b20 libdispatch.dylib`_dispatch_root_queue_drain_deferred_wlh + 344 frame expo#29: 0x00000001038691c4 libdispatch.dylib`_dispatch_workloop_worker_thread + 752 frame expo#30: 0x00000001e7d803b8 libsystem_pthread.dylib`_pthread_wqthread + 292 ``` </details> # How - dispatch the completion handlers on main queue # Test Plan - tested locally with notification-tester app # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
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.
Why
This PR removes the comma that caused compilation errors for the iOS platform in bare-expo
How
I deleted the comma from
ImageModule.swiftin functiongeneratePlaceholderTest Plan
I tested it on iOS
Checklist
changelog.mdentry and rebuilt the package sources according to this short guidenpx expo prebuild& EAS Build (eg: updated a module plugin).