From c39a93d95fe64f1f29b026787393d58282dec320 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 26 Jan 2026 20:23:22 +0200 Subject: [PATCH] fork mcemojipicker --- app.config.js | 1 + .../ios/EmojiPickerModule.podspec | 2 +- plugins/withMCEmojiPickerFork.js | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 plugins/withMCEmojiPickerFork.js diff --git a/app.config.js b/app.config.js index 7528e9010c..ef3df27b91 100644 --- a/app.config.js +++ b/app.config.js @@ -289,6 +289,7 @@ module.exports = function (_config) { './plugins/withAndroidNoJitpackPlugin.js', './plugins/shareExtension/withShareExtensions.js', './plugins/notificationsExtension/withNotificationsExtension.js', + './plugins/withMCEmojiPickerFork.js', [ 'expo-font', { diff --git a/modules/expo-emoji-picker/ios/EmojiPickerModule.podspec b/modules/expo-emoji-picker/ios/EmojiPickerModule.podspec index 78349c9504..e6a982a70e 100644 --- a/modules/expo-emoji-picker/ios/EmojiPickerModule.podspec +++ b/modules/expo-emoji-picker/ios/EmojiPickerModule.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.static_framework = true s.dependency 'ExpoModulesCore' - s.dependency 'MCEmojiPicker', '1.2.3' + s.dependency 'MCEmojiPicker' # Swift/Objective-C compatibility s.pod_target_xcconfig = { diff --git a/plugins/withMCEmojiPickerFork.js b/plugins/withMCEmojiPickerFork.js new file mode 100644 index 0000000000..052cf24b42 --- /dev/null +++ b/plugins/withMCEmojiPickerFork.js @@ -0,0 +1,30 @@ +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 + }) +}