Skip to content

Commit 11a36ab

Browse files
committed
add comments to explain 'null' returned from 'modifyObjcAppDelegate'
1 parent 5627a4f commit 11a36ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/auth/plugin/src/ios/openUrlFix.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const multiline_appDelegateOpenUrlInsertionPointAfter = new RegExp(
103103
appDelegateOpenUrlInsertionPointAfter.source + '\\s*{\\s*\\n',
104104
);
105105

106-
// Returns AppDelegate with modification applied, or null if no change needed.
106+
// Returns contents of new AppDelegate with modification applied, or returns null if this patch is not applicable because the AppDelegate doesn't have an 'openURL' method to handle deep links.
107107
export function modifyObjcAppDelegate(contents: string): string | null {
108108
const pattern = appDelegateOpenUrlInsertionPointAfter;
109109
const multilinePattern = multiline_appDelegateOpenUrlInsertionPointAfter;
@@ -121,6 +121,7 @@ export function modifyObjcAppDelegate(contents: string): string | null {
121121
].join(' '),
122122
);
123123
} else {
124+
// openURL method was not found in AppDelegate
124125
return null;
125126
}
126127
}

0 commit comments

Comments
 (0)