Skip to content

Conversation

subdiox
Copy link
Contributor

@subdiox subdiox commented Jul 31, 2025

Summary

Fixes a crash that occurs when launching an app linked with FirebaseMessaging and FirebaseInAppMessaging on iOS 18 devices or simulators when built with Xcode 26 Beta 4.

Root Cause

The crash was caused by referencing the symbol NSUserActivityTypeBrowsingWeb, which appears to be unavailable or unresolved at runtime when using the combination of Xcode 26 and iOS 18. Attempting to access this symbol directly results in a dyld crash:

dyld[27074]: Symbol not found: _NSUserActivityTypeBrowsingWeb
  Referenced from: <7CB71490-F307-3C6E-853C-925749317C78> /private/var/containers/Bundle/Application/C7665515-F4B5-4EAA-B560-774A439A4F1E/Rulebook-Dev.app/Rulebook-Dev.debug.dylib
  Expected in:     <050203DD-7488-307D-A999-E587314B041A> /System/Library/Frameworks/CoreServices.framework/CoreServices
Symbol not found: _NSUserActivityTypeBrowsingWeb
  Referenced from: <7CB71490-F307-3C6E-853C-925749317C78> /private/var/containers/Bundle/Application/C7665515-F4B5-4EAA-B560-774A439A4F1E/Rulebook-Dev.app/Rulebook-Dev.debug.dylib
  Expected in:     <050203DD-7488-307D-A999-E587314B041A> /System/Library/Frameworks/CoreServices.framework/CoreServices
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libLogRedirect.dylib:/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/usr/lib/libViewDebuggerSupport.dylib
Symbol not found: _NSUserActivityTypeBrowsingWeb
  Referenced from: <7CB71490-F307-3C6E-853C-925749317C78> /private/var/containers/Bundle/Application/C7665515-F4B5-4EAA-B560-774A439A4F1E/Rulebook-Dev.app/Rulebook-Dev.debug.dylib
  Expected in:     <050203DD-7488-307D-A999-E587314B041A> /System/Library/Frameworks/CoreServices.framework/CoreServices
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libLogRedirect.dylib:/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/usr/lib/libViewDebuggerSupport.dylib

Fix

Replaced the symbol reference with a raw string literal @"NSUserActivityTypeBrowsingWeb", which avoids the runtime lookup and resolves the crash.

Related Issue

This issue is discussed in #15159.

Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

Copy link

google-cla bot commented Jul 31, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever fix, thank you!

@ncooke3
Copy link
Member

ncooke3 commented Jul 31, 2025

Could you please run the style script?

scripts/style.sh FirebaseInAppMessaging/Sources/Runtime/FIRIAMActionURLFollower.m FirebaseInAppMessaging/Tests/Unit/FIRIAMActionUrlFollowerTests.m FirebaseMessaging/Sources/FIRMessaging.m

@ncooke3 ncooke3 added this to the 12.1.0 - M168 milestone Jul 31, 2025
@ncooke3
Copy link
Member

ncooke3 commented Jul 31, 2025

Also, please prepend the FirebaseMessaging/CHANGELOG.md with a brief release note. Example:

# 12.1.0
- [fixed] Fix Xcode 26 crash from missing `NSUserActivityTypeBrowsingWeb` symbol. (#15159)

@ncooke3 ncooke3 changed the base branch from main to nc/15164 July 31, 2025 20:24
@ncooke3 ncooke3 merged commit 7eb1bd7 into firebase:nc/15164 Jul 31, 2025
67 of 68 checks passed
@firebase firebase locked and limited conversation to collaborators Aug 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants