mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-28 17:48:26 +01:00
chore: expo 55 upgrade (#1594)
Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com> Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com>
This commit is contained in:
@@ -24,6 +24,34 @@ function buildPatch() {
|
||||
" t.build_configurations.each do |cfg|",
|
||||
" cfg.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited)'",
|
||||
" cfg.build_settings['HEADER_SEARCH_PATHS'] << \" #{extra_hdrs.join(' ')}\"",
|
||||
" cfg.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'",
|
||||
" end",
|
||||
" end",
|
||||
"",
|
||||
" # Safely patch RCTThirdPartyComponentsProvider.mm to avoid startup crash on unlinked Fabric components",
|
||||
' filepath = "#{installer.sandbox.root}/../build/generated/ios/ReactCodegen/RCTThirdPartyComponentsProvider.mm"',
|
||||
" if File.exist?(filepath)",
|
||||
" content = File.read(filepath)",
|
||||
" if content =~ /thirdPartyComponents = @\\{([\\s\\S]*?)\\};/",
|
||||
" entries = $1",
|
||||
' new_code = "NSMutableDictionary *dict = [NSMutableDictionary dictionary];\\n"',
|
||||
' new_code += " Class cls;\\n"',
|
||||
" entries.each_line do |line|",
|
||||
" line = line.strip",
|
||||
" next if line.empty?",
|
||||
' if line =~ /@\\"(.*?)\\":\\s*NSClassFromString\\(@\\"(.*?)\\"\\),?(.*)/',
|
||||
" key = $1",
|
||||
" val = $2",
|
||||
" comment = $3",
|
||||
' new_code += " cls = NSClassFromString(@\\"#{val}\\"); if (cls) dict[@\\"#{key}\\"] = cls;#{comment}\\n"',
|
||||
" else",
|
||||
' new_code += " // #{line}\\n"',
|
||||
" end",
|
||||
" end",
|
||||
' new_code += " thirdPartyComponents = dict;"',
|
||||
" content = content.sub(/thirdPartyComponents = @\\{[\\s\\S]*?\\};/, new_code)",
|
||||
" File.write(filepath, content)",
|
||||
' puts "✅ Patched RCTThirdPartyComponentsProvider.mm for safety"',
|
||||
" end",
|
||||
" end",
|
||||
PATCH_END,
|
||||
|
||||
Reference in New Issue
Block a user