Skip to content

Commit 3bd4322

Browse files
Docs: Simplify AppDelegate Info.plist option in README
Further refines the documentation for the `FirebaseAppDelegateClassName` Info.plist key feature on iOS. - The explanation in `release_build_files/readme.md` under "Specifying Your AppDelegate Class Directly (iOS)" has been made more concise and user-focused, removing internal implementation details. - The corresponding release note for version 12.9.0 has also been simplified to match this approach. This change aims to make the documentation easier for developers to understand by focusing on the action and benefit rather than Firebase internal mechanisms.
1 parent 79903cd commit 3bd4322

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

app/src/util_ios.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ + (void)load {
239239
namespace firebase {
240240
namespace util {
241241

242-
// This is the ORIGINAL implementation of RunOnAppDelegateClasses
243242
void RunOnAppDelegateClasses(void (^block)(Class)) {
244243
if (g_seen_delegate_classes_count > 0) {
245244
NSLog(@"Firebase: RunOnAppDelegateClasses executing block for %d already seen delegate class(es).",

release_build_files/readme.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,30 @@ addition to any you may have implemented.
537537

538538
The Firebase Cloud Messaging library needs to attach
539539
handlers to the application delegate using method swizzling. If you are using
540-
these libraries, at load time, Firebase will identify your `AppDelegate` class
541-
and swizzle the required methods onto it, chaining a call back to your existing
542-
method implementation.
540+
these libraries, at load time, Firebase will typically identify your `AppDelegate`
541+
class and swizzle the required methods onto it.
542+
543+
#### Specifying Your AppDelegate Class Directly (iOS)
544+
545+
For a more direct approach, or if you encounter issues with the default
546+
method swizzling, you can explicitly tell Firebase which class is your
547+
application's `AppDelegate`. To do this, add the `FirebaseAppDelegateClassName`
548+
key to your app's `Info.plist` file:
549+
550+
* **Key:** `FirebaseAppDelegateClassName`
551+
* **Type:** `String`
552+
* **Value:** Your AppDelegate's class name (e.g., `MyCustomAppDelegate`)
553+
554+
**Example `Info.plist` entry:**
555+
```xml
556+
<key>FirebaseAppDelegateClassName</key>
557+
<string>MyCustomAppDelegate</string>
558+
```
559+
560+
If this key is provided with a valid class name, Firebase will use that class
561+
directly for its AppDelegate-related interactions. If the key is not present,
562+
is invalid, or the class is not found, Firebase will use its standard method
563+
swizzling approach.
543564

544565
### Custom Android Build Systems
545566

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

656677
## Release Notes
678+
### 12.9.0 (Upcoming)
679+
- Changes
680+
- iOS: Added an option to explicitly specify your app's `AppDelegate` class
681+
name via the `FirebaseAppDelegateClassName` key in `Info.plist`. This
682+
provides a more direct way for Firebase to interact with your specified
683+
AppDelegate. See "Platform Notes > iOS Method Swizzling >
684+
Specifying Your AppDelegate Class Directly (iOS)" for details.
685+
657686
### 12.8.0
658687
- Changes
659688
- General (iOS): Update to Firebase Cocoapods version 11.14.0.

0 commit comments

Comments
 (0)