Skip to content

storage list compile error #1746

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

Draft
wants to merge 4 commits into
base: feat/storage-list-stubs
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
626 changes: 626 additions & 0 deletions AGENTS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/src/invites/ios/invites_ios_startup.mm
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ @implementation UIApplication (FIRFBI)
+ (void)load {
// C++ constructors may not be called yet so call NSLog rather than LogDebug.
NSLog(@"Loading UIApplication category for Firebase App");
::firebase::util::ForEachAppDelegateClass(^(Class clazz) {
::firebase::util::RunOnAppDelegateClasses(^(Class clazz) {
::firebase::invites::HookAppDelegateMethods(clazz);
});
}
Expand Down
10 changes: 6 additions & 4 deletions app/src/util_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ typedef BOOL (
id self, SEL selector_value, UIApplication *application,
NSUserActivity *user_activity, void (^restoration_handler)(NSArray *));

// Call the given block once for every Objective-C class that exists that
// implements the UIApplicationDelegate protocol (except for those in a
// blacklist we keep).
void ForEachAppDelegateClass(void (^block)(Class));
// Calls the given block for each unique Objective-C class that has been
// previously passed to [UIApplication setDelegate:]. The block is executed
// immediately for all currently known unique delegate classes.
// Additionally, the block is queued to be executed if any new, unique
// Objective-C class is passed to [UIApplication setDelegate:] in the future.
void RunOnAppDelegateClasses(void (^block)(Class));

// Convert a string array into an NSMutableArray.
NSMutableArray *StringVectorToNSMutableArray(
Expand Down
328 changes: 268 additions & 60 deletions app/src/util_ios.mm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion messaging/src/ios/messaging.mm
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ @implementation UIApplication (FIRFCM)
+ (void)load {
// C++ constructors may not be called yet so call NSLog rather than LogInfo.
NSLog(@"FCM: Loading UIApplication FIRFCM category");
::firebase::util::ForEachAppDelegateClass(^(Class clazz) {
::firebase::util::RunOnAppDelegateClasses(^(Class clazz) {
FirebaseMessagingHookAppDelegate(clazz);
});
}
Expand Down
35 changes: 32 additions & 3 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,30 @@ addition to any you may have implemented.

The Firebase Cloud Messaging library needs to attach
handlers to the application delegate using method swizzling. If you are using
these libraries, at load time, Firebase will identify your `AppDelegate` class
and swizzle the required methods onto it, chaining a call back to your existing
method implementation.
these libraries, at load time, Firebase will typically identify your `AppDelegate`
class and swizzle the required methods onto it.

#### Specifying Your AppDelegate Class Directly (iOS)

For a more direct approach, or if you encounter issues with the default
method swizzling, you can explicitly tell Firebase which class is your
application's `AppDelegate`. To do this, add the `FirebaseAppDelegateClassName`
key to your app's `Info.plist` file:

* **Key:** `FirebaseAppDelegateClassName`
* **Type:** `String`
* **Value:** Your AppDelegate's class name (e.g., `MyCustomAppDelegate`)

**Example `Info.plist` entry:**
```xml
<key>FirebaseAppDelegateClassName</key>
<string>MyCustomAppDelegate</string>
```

If this key is provided with a valid class name, Firebase will use that class
directly for its AppDelegate-related interactions. If the key is not present,
is invalid, or the class is not found, Firebase will use its standard method
swizzling approach.

### Custom Android Build Systems

Expand Down Expand Up @@ -654,6 +675,14 @@ workflow use only during the development of your app, not for publicly shipping
code.

## Release Notes
### Upcoming Release
- Changes
- iOS: Added an option to explicitly specify your app's `AppDelegate` class
name via the `FirebaseAppDelegateClassName` key in `Info.plist`. This
provides a more direct way for Firebase to interact with your specified
AppDelegate. See "Platform Notes > iOS Method Swizzling >
Specifying Your AppDelegate Class Directly (iOS)" for details.

### 12.8.0
- Changes
- General (iOS): Update to Firebase Cocoapods version 11.14.0.
Expand Down
105 changes: 105 additions & 0 deletions scripts/dumpsrc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#!/bin/bash
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Print a formatted list of source files from specific directories.
# Suggested usage: dumpsrc.sh <path1> [path2] [path3] [...] | pbcopy

included_files=(
'*.swig'
'*.i'
'*.c'
'*.cc'
'*.cpp'
'*.cs'
'*.cmake'
'*.fbs'
'*.gradle'
'*.h'
'*.hh'
'*.java'
'*.js'
'*.json'
'*.md'
'*.m'
'*.mm'
'CMakeLists.txt'
'Podfile'
)

get_markdown_language_for_file() {
local filename="$1"
local base="$(basename "$filename")"
local ext="${base##*.}"
if [[ "$base" == "$ext" && "$base" != .* ]]; then
ext="" # No extension
fi

# Handle special filename case first
if [[ "$base" == "CMakeLists.txt" ]]; then
echo "cmake"
return 0
fi

# Main logic using case based on extension
case "$ext" in
c) echo "c" ;;
cc) echo "cpp" ;;
cs) echo "csharp" ;;
hh) echo "cpp" ;;
m) echo "objectivec" ;;
mm) echo "objectivec" ;;
sh) echo "bash" ;;
py) echo "python" ;;
md) echo "markdown" ;;
json) echo "js" ;;
h)
if grep -qE "\@interface|\#import" "$filename"; then
echo "objectivec";
else
echo "cpp";
fi
;;
"") # Explicitly handle no extension (after CMakeLists.txt check)
: # Output nothing
;;
*) # Default case for any other non-empty extension
echo "$ext"
;;
esac
return 0
}


if [[ -z "$1" ]]; then
echo "Usage: $0 <path1> [path2] [path3] ..."
exit 1
fi

find_cmd_args=('-name' 'UNUSED')

for pattern in "${included_files[@]}"; do
if [[ -n "${pattern}" ]]; then
find_cmd_args+=('-or' '-name' "$pattern")
fi
done

for f in `find $* -type f -and "${find_cmd_args[@]}"`; do
echo "*** BEGIN CONTENTS OF FILE '$f' ***";
echo '```'$(get_markdown_language_for_file "$f");
cat "$f";
echo '```';
echo "*** END CONTENTS OF FILE '$f' ***";
echo
done
Loading
Loading