You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Improve comments and logging for AppDelegate Info.plist feature
This commit cleans up comments and refines logging messages within the
`+load` method in `FirebaseAppDelegateSwizzling` category for clarity
and accuracy related to the recently added feature for specifying the
AppDelegate via Info.plist.
- Clarified comments explaining the Info.plist handling path, including
the setup of the specified delegate and the execution of pending blocks.
- Ensured comments accurately reflect that pending blocks are not cleared
from the queue after execution in `+load` when in Info.plist mode.
- Minor wording improvements to log messages for better diagnostics.
- Removed redundant or outdated comments from previous iterations.
No functional code changes are included in this commit.
NSLog(@"Firebase Error: Info.plist key '%@' provided class name '%@', but this class was not found. Proceeding with default setDelegate: swizzling.", kFirebaseAppDelegateClassNameKey, appDelegateClassName);
204
+
NSLog(@"Firebase Error: Info.plist key '%@' specifies class '%@', which was not found. Proceeding with default [UIApplication setDelegate:] swizzling.",
if (appDelegateClassName) { // Key exists but is empty or not a string
200
-
NSLog(@"Firebase Warning: Info.plist key '%@' is present but invalid (empty or not a string: %@). Proceeding with default setDelegate: swizzling.", kFirebaseAppDelegateClassNameKey, appDelegateClassName);
201
-
} else { // Key does not exist
202
-
NSLog(@"Firebase: Info.plist key '%@' not found. Proceeding with default setDelegate: swizzling.", kFirebaseAppDelegateClassNameKey);
203
-
}
208
+
if (appDelegateClassName) { // Key is present but value is invalid (e.g., empty string or wrong type).
209
+
NSLog(@"Firebase Warning: Info.plist key '%@' has an invalid value ('%@'). Proceeding with default [UIApplication setDelegate:] swizzling.",
NSLog(@"Firebase: RunOnAppDelegateClasses - added block to pending list (total pending: %d). This block will run on future new delegate classes.", g_pending_block_count);
287
261
} else {
288
-
// Original Swizzling Mode:
289
-
// Queue the current block if no delegates seen yet, or always for future new delegates.
290
-
if (g_pending_block_count < MAX_PENDING_APP_DELEGATE_BLOCKS) {
NSLog(@"Firebase: RunOnAppDelegateClasses (Swizzle Mode) - Added block to pending list (total pending: %d). This block will run on future new delegate classes.", g_pending_block_count);
294
-
} else {
295
-
NSLog(@"Firebase Error: RunOnAppDelegateClasses (Swizzle Mode) - Pending block queue is full (max %d). Cannot add new block for future execution. Discarding block.", MAX_PENDING_APP_DELEGATE_BLOCKS);
296
-
}
262
+
NSLog(@"Firebase Error: RunOnAppDelegateClasses - pending block queue is full (max %d). Cannot add new block for future execution. Discarding block.", MAX_PENDING_APP_DELEGATE_BLOCKS);
0 commit comments