Skip to content

Commit a35f8f1

Browse files
committed
Add a missing import in iOS plugin config
1 parent 7cf78af commit a35f8f1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/react-native-app-auth/plugin/ios/app-delegate-header.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const withAppAuthAppDelegateHeader = rootConfig =>
2020
let contents = fs.readFileSync(headerFilePath, 'utf-8');
2121

2222
// add a new import (unless it already exists)
23-
contents = codeModIOs.addObjcImports(contents, ['"RNAppAuthAuthorizationFlowManager.h"']);
23+
contents = codeModIOs.addObjcImports(contents, [
24+
'"RNAppAuthAuthorizationFlowManager.h"',
25+
"<React/RCTLinkingManager.h>", // in reverse order because of the way the code-mod works
26+
]);
2427

2528
// adds a new protocol to the AppDelegate interface (unless it already exists)
2629
contents = insertProtocolDeclaration({

packages/react-native-app-auth/plugin/ios/app-delegate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const {
55
removeContents,
66
} = require('@expo/config-plugins/build/utils/generateCode');
77

8-
const withAppAuthAppDelegate = rootConfig =>
9-
withAppDelegate(rootConfig, config => {
8+
const withAppAuthAppDelegate = (rootConfig) =>
9+
withAppDelegate(rootConfig, (config) => {
1010
let { contents } = config.modResults;
1111

1212
// generation tags & headers

0 commit comments

Comments
 (0)