mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
* Revert "fix yarn web (#814)" This reverts commitbf158fd977. * Revert "add hermes ios engine" This reverts commitf6defcfb12. * Revert "codex feedback" This reverts commitdf35a47f72. * Revert "merge with dev" This reverts commit47a8d9d2f1. * Revert "update Gemfile.lock and remove lock when reinstalling" This reverts commit5f25752f77. * Revert "test package update" This reverts commit19dcba0e42. * Revert "revert install cmd changes" This reverts commit5427bd12a1. * Revert "Fix CI build by excluding nokogiri in GitHub Actions/Act environments" This reverts commitdbff69a13e. * Revert "prettier" This reverts commit87f421456f. * Revert "fix building" This reverts commitfbbefd2a3d. * Revert "optimize path resolving" This reverts commit23b1118b8e. * Revert "fix loading" This reverts commitf0c884b43b. * Revert "clean up dupe bundle install" This reverts commit5428567bbe. * Revert "fix metro loading" This reverts commit3a766001dc. * Revert "remove passport provider lazy loading" This reverts commit5f793a54b3. * Revert "allow cursor to edit Gemfile and update lock file" This reverts commitb6f7158e8e. * Revert "Update Gemfile.lock to exclude nokogiri in CI environments" This reverts commit243640152d. * Revert "fix install commands" This reverts commit2dc7d7c1c9. * Revert "fix imports and test" This reverts commit83d6308029. * Revert "fix import" This reverts commitfa42b07ce4. * Revert "update build checks" This reverts commitb281f15a16. * Revert "save updated imports" This reverts commit215bca4bee. * Revert "fix build command" This reverts commit37f95bc8fb. * Revert "build dependencies before linting" This reverts commit9e57e017ca. * Revert "lint suggestions" This reverts commitff9b9d2c7c. * Revert "fix type. more opportunities" This reverts commit7ad82d5817. * Revert "add typing to crypto loader" This reverts commitd55eec8f44. * Revert "yarn nice" This reverts commitdf1c2dbd9b. * Revert "update lock" This reverts commit04692ba3b5. * Revert "cm feedback" This reverts commit848071f315. * fix file name * fix web loading * fix border width styling * fix package commands * fix import and update lock * fixes from reverted commits * more fixes for web building * fix yarn web:build * add yarn web:build workflow * cm feedback * final fixes * fix for and vitge * fix loading
138 lines
5.1 KiB
Ruby
Executable File
138 lines
5.1 KiB
Ruby
Executable File
source "https://cdn.cocoapods.org/"
|
|
use_frameworks!
|
|
require "tmpdir"
|
|
|
|
# Resolve react_native_pods.rb with node to allow for hoisting
|
|
require Pod::Executable.execute_command("node", ["-p",
|
|
'require.resolve(
|
|
"react-native/scripts/react_native_pods.rb",
|
|
{paths: [process.argv[1]]},
|
|
)', __dir__]).strip
|
|
|
|
project "Self.xcodeproj"
|
|
|
|
platform :ios, "15.0" if !ENV["ACT"]
|
|
prepare_react_native_project!
|
|
|
|
flipper_enabled = ENV["NO_FLIPPER"] != "1"
|
|
flipper_config = { "Flipper" => flipper_enabled ? "~> 0.125.0" : nil }
|
|
|
|
linkage = ENV["USE_FRAMEWORKS"]
|
|
if linkage != nil
|
|
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
use_frameworks! :linkage => linkage.to_sym
|
|
end
|
|
|
|
target "Self" do
|
|
config = use_native_modules!
|
|
|
|
use_frameworks!
|
|
pod "NFCPassportReader", git: "https://github.com/seshanthS/NFCPassportReader", commit: "74098a5e29c23b3f5a58dc14a336556fa89c0ad6"
|
|
|
|
pod "QKMRZScanner"
|
|
pod "lottie-ios"
|
|
pod "SwiftQRScanner", :git => "https://github.com/vinodiOS/SwiftQRScanner"
|
|
pod "Mixpanel-swift", "~> 5.0.0"
|
|
pod "RNReactNativeHapticFeedback", :path => "../../node_modules/react-native-haptic-feedback", :modular_headers => true
|
|
|
|
use_react_native!(
|
|
:path => config[:reactNativePath],
|
|
:hermes_enabled => true,
|
|
# An absolute path to your application root.
|
|
:app_path => "#{Pod::Config.instance.installation_root}/..",
|
|
# Flipper設定は削除
|
|
)
|
|
|
|
pod "Sentry", :modular_headers => true
|
|
pod "SentryPrivate", :modular_headers => true
|
|
|
|
pod "Firebase", :modular_headers => true
|
|
pod "FirebaseCore", :modular_headers => true
|
|
pod "FirebaseCoreInternal", :modular_headers => true
|
|
pod "GoogleUtilities", :modular_headers => true
|
|
pod "FirebaseMessaging"
|
|
|
|
if flipper_enabled
|
|
pod "RCT-Folly", :podspec => "#{config[:reactNativePath]}/third-party-podspecs/RCT-Folly.podspec"
|
|
end
|
|
|
|
post_install do |installer|
|
|
installer.generated_projects.each do |project|
|
|
project.targets.each do |target|
|
|
if target.name == "RNZipArchive"
|
|
target.source_build_phase.files.each do |file|
|
|
if file.settings && file.settings["COMPILER_FLAGS"]
|
|
file.settings["COMPILER_FLAGS"] = ""
|
|
end
|
|
end
|
|
end
|
|
target.build_configurations.each do |config|
|
|
config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = "15.0"
|
|
config.build_settings["GCC_PREPROCESSOR_DEFINITIONS"] ||= ["$(inherited)", "_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"]
|
|
end
|
|
end
|
|
end
|
|
|
|
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
|
|
|
|
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
framework_path = File.join(Dir.pwd, framework_relative_path)
|
|
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
|
|
puts "Stripping bitcode: #{command}"
|
|
system(command)
|
|
end
|
|
|
|
framework_paths = [
|
|
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64/OpenSSL.framework/OpenSSL",
|
|
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst/OpenSSL.framework/OpenSSL",
|
|
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-simulator/OpenSSL.framework/OpenSSL",
|
|
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_x86_64/OpenSSL.framework/OpenSSL",
|
|
]
|
|
|
|
framework_paths.each do |framework_relative_path|
|
|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
end
|
|
|
|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
react_native_post_install(
|
|
installer,
|
|
config[:reactNativePath],
|
|
:mac_catalyst_enabled => false,
|
|
# :ccache_enabled => true
|
|
)
|
|
|
|
installer.pods_project.targets.each do |target|
|
|
if target.name == "RNReactNativeHapticFeedback"
|
|
target.build_configurations.each do |config|
|
|
config.build_settings["OTHER_LDFLAGS"] ||= ["$(inherited)"]
|
|
config.build_settings["OTHER_LDFLAGS"] << "-framework AudioToolbox"
|
|
end
|
|
end
|
|
end
|
|
|
|
# update QKCutoutView.swift to hide OCR border
|
|
qkCutoutView = "Pods/QKMRZScanner/QKMRZScanner/QKCutoutView.swift"
|
|
if File.exist?(qkCutoutView) && File.writable?(qkCutoutView)
|
|
text = File.read(qkCutoutView)
|
|
# Only modify if the line is not already commented
|
|
if text.match?(/^\s*[^\/]*addBorderAroundCutout\s*\(\s*\)/)
|
|
# Comment out the line containing "addBorderAroundCutout()"
|
|
new_text = text.gsub(/^(\s*addBorderAroundCutout\s*\(\s*\))/, '// \1')
|
|
File.open(qkCutoutView, "w") { |file| file.puts new_text }
|
|
end
|
|
else
|
|
puts "Warning: Could not find QKCutoutView.swift at #{qkCutoutView}"
|
|
end
|
|
|
|
# Disable code signing for Pod targets to avoid conflicts with main app signing
|
|
installer.pods_project.targets.each do |target|
|
|
target.build_configurations.each do |config|
|
|
config.build_settings["CODE_SIGNING_ALLOWED"] = "NO"
|
|
|
|
# Fix for Rosetta emulator builds - exclude arm64 for simulator
|
|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
|
|
end
|
|
end
|
|
end
|
|
end
|