Skip to content

Commit e380b10

Browse files
committed
Fix running expo prebuild after Podfile modifications
1 parent 8b4a6b3 commit e380b10

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ PODS:
14991499
- React-logger (= 0.75.4)
15001500
- React-perflogger (= 0.75.4)
15011501
- React-utils (= 0.75.4)
1502-
- RNPermissions (5.0.0):
1502+
- RNPermissions (5.0.1):
15031503
- React-Core
15041504
- RNVectorIcons (10.2.0):
15051505
- DoubleConversion
@@ -1794,7 +1794,7 @@ SPEC CHECKSUMS:
17941794
React-utils: cbe8b8b3d7b2ac282e018e46f0e7b25cdc87c5a0
17951795
ReactCodegen: 4bcb34e6b5ebf6eef5cee34f55aa39991ea1c1f1
17961796
ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad
1797-
RNPermissions: 71b219b536d93ecf39169432f1037f6cb45aa9ec
1797+
RNPermissions: ed7216b9f49ed98b6cf56b8030de68b9a10b2423
17981798
RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136
17991799
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
18001800
Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-permissions",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"license": "MIT",
55
"description": "An unified permissions API for React Native on iOS, Android and Windows",
66
"author": "Mathieu Acthernoene <[email protected]>",

src/expo.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {ConfigPlugin, withDangerousMod} from '@expo/config-plugins';
1+
import {ConfigPlugin, createRunOncePlugin, withDangerousMod} from '@expo/config-plugins';
22
import {mergeContents} from '@expo/config-plugins/build/utils/generateCode';
33
import * as fs from 'fs/promises';
44
import * as path from 'path';
@@ -60,16 +60,9 @@ ${iosPermissions.map((permission) => ` '${permission}',`).join('\n')}
6060
comment: '#',
6161
});
6262

63-
if (!withRequire.didMerge || !withSetup.didMerge) {
64-
console.error(
65-
"ERROR: Cannot add react-native-permissions to the project's ios/Podfile because it's malformed. Please report this with a copy of your project Podfile.",
66-
);
67-
return config;
68-
}
69-
7063
await fs.writeFile(file, withSetup.contents, 'utf-8');
7164
return config;
7265
},
7366
]);
7467

75-
export default withPermissions;
68+
export default createRunOncePlugin(withPermissions, 'react-native-permissions');

0 commit comments

Comments
 (0)