Skip to content

Commit

Permalink
add comments to explain 'null' returned from 'modifyObjcAppDelegate'
Browse files Browse the repository at this point in the history
  • Loading branch information
jey committed Dec 28, 2024
1 parent 5627a4f commit 11a36ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/auth/plugin/src/ios/openUrlFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const multiline_appDelegateOpenUrlInsertionPointAfter = new RegExp(
appDelegateOpenUrlInsertionPointAfter.source + '\\s*{\\s*\\n',
);

// Returns AppDelegate with modification applied, or null if no change needed.
// 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.
export function modifyObjcAppDelegate(contents: string): string | null {
const pattern = appDelegateOpenUrlInsertionPointAfter;
const multilinePattern = multiline_appDelegateOpenUrlInsertionPointAfter;
Expand All @@ -121,6 +121,7 @@ export function modifyObjcAppDelegate(contents: string): string | null {
].join(' '),
);
} else {
// openURL method was not found in AppDelegate
return null;
}
}
Expand Down

0 comments on commit 11a36ab

Please sign in to comment.