replace config plugin with extraPods
This commit is contained in:
+7
-1
@@ -255,6 +255,13 @@ module.exports = function (_config) {
|
||||
deploymentTarget: '15.1',
|
||||
buildReactNativeFromSource: true,
|
||||
ccacheEnabled: IS_DEV,
|
||||
extraPods: [
|
||||
{
|
||||
name: 'MCEmojiPicker',
|
||||
git: 'https://github.com/bluesky-social/MCEmojiPicker.git',
|
||||
branch: 'main',
|
||||
},
|
||||
],
|
||||
},
|
||||
android: {
|
||||
compileSdkVersion: 35,
|
||||
@@ -289,7 +296,6 @@ module.exports = function (_config) {
|
||||
'./plugins/withAndroidNoJitpackPlugin.js',
|
||||
'./plugins/shareExtension/withShareExtensions.js',
|
||||
'./plugins/notificationsExtension/withNotificationsExtension.js',
|
||||
'./plugins/withMCEmojiPickerFork.js',
|
||||
[
|
||||
'expo-font',
|
||||
{
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
const {withPodfile} = require('@expo/config-plugins')
|
||||
|
||||
const POD_LINE =
|
||||
"pod 'MCEmojiPicker', :git => 'https://github.com/bluesky-social/MCEmojiPicker.git', :branch => 'main'"
|
||||
|
||||
module.exports = function withMCEmojiPickerFork(config) {
|
||||
return withPodfile(config, config => {
|
||||
const contents = config.modResults.contents
|
||||
|
||||
// Check if already added
|
||||
if (contents.includes(POD_LINE)) {
|
||||
return config
|
||||
}
|
||||
|
||||
// Insert after use_expo_modules!
|
||||
const anchor = 'use_expo_modules!'
|
||||
if (!contents.includes(anchor)) {
|
||||
throw new Error(
|
||||
`Cannot find "${anchor}" in Podfile to insert MCEmojiPicker fork`,
|
||||
)
|
||||
}
|
||||
|
||||
config.modResults.contents = contents.replace(
|
||||
anchor,
|
||||
`${anchor}\n\n # Use maintained fork of MCEmojiPicker\n ${POD_LINE}`,
|
||||
)
|
||||
|
||||
return config
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user