This commit is contained in:
2025-07-28 10:16:07 +08:00
parent ec1eda54d7
commit 0886c56b39
11 changed files with 456 additions and 1024 deletions

View File

@@ -35,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want # your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that # to write custom TurboModules/Fabric components OR use libraries that
# are providing them. # are providing them.
newArchEnabled=true newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine. # Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead. # If set to false, you will be using JSC instead.

BIN
bun.lockb

Binary file not shown.

View File

@@ -1,79 +1,41 @@
ENV['EXPO_USE_FRAMEWORKS'] = '1' require_relative '../node_modules/react-native/scripts/react_native_pods'
require 'json'
expo_autolinking_script = File.join(File.dirname(%x(node --print "require.resolve('expo/package.json')").strip), "scripts", "autolinking") platform :ios, '15.1'
install! 'cocoapods', :deterministic_uuids => false
# Add Expo modules autolinking
expo_autolinking_script = File.join(File.dirname(%x(node --print "require.resolve('expo/package.json')").strip), "scripts/autolinking")
require expo_autolinking_script if File.exist?(expo_autolinking_script) require expo_autolinking_script if File.exist?(expo_autolinking_script)
require File.join(File.dirname(%x(node --print "require.resolve('react-native/package.json')").strip), "scripts", "react_native_pods")
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1'
install! 'cocoapods',
:deterministic_uuids => false,
:generate_multiple_pod_projects => true,
:incremental_installation => true
prepare_react_native_project!
config = nil
target 'mobiledarmasaba' do target 'mobiledarmasaba' do
# ✅ Hapus autolinking manual jika sebelumnya ada # Use Expo modules with guard
# require_relative '../node_modules/expo-modules-core/scripts/autolinking' use_expo_modules! if respond_to?(:use_expo_modules!)
# use_expo_modules!
config = {
config = use_native_modules! do |c| :reactNativePath => "../node_modules/react-native"
use_flipper!({ 'Flipper' => '0.182.0' }) }
end
use_react_native!( use_react_native!(
:path => config[:reactNativePath], :path => config[:reactNativePath],
:hermes_enabled => podfile_properties['expo.jsEngine'].nil? || podfile_properties['expo.jsEngine'] == 'hermes', :hermes_enabled => true
:app_path => "#{Pod::Config.instance.installation_root}/..",
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
) )
# ✅ Modular headers fix untuk Firebase, dsb. # Post Install processing
pod 'FirebaseDatabase', :modular_headers => true post_install do |installer|
pod 'FirebaseCore', :modular_headers => true # Call react_native_post_install without parameters
pod 'FirebaseAppCheckInterop', :modular_headers => true react_native_post_install(installer)
pod 'leveldb-library', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true # Set C++20 standard for all targets
end installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
post_install do |installer| config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'
# (Optional fix) remove bad script config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
system("rm -rf Pods/Target\\ Support\\ Files/Pods-mobiledarmasaba/expo-configure-project.sh") config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
react_native_post_install( # Enable C++ modules
installer, config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
config[:reactNativePath], config.build_settings['GCC_C_LANGUAGE_STANDARD'] = 'gnu11'
:mac_catalyst_enabled => false, end
:ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# ✅ Critical for Expo Swift modules
config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
config.build_settings['DEFINES_MODULE'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
# Avoid duplicate module map error
if ['ReactCommon', 'react_runtime'].include?(target.name)
target.module_map = nil if target.respond_to?(:module_map)
end
# Fix Hermes build script (path env)
if target.name == 'hermes-engine'
script = target.build_phases.first.shell_script
target.build_phases.first.shell_script = "export NODE_BINARY=$(which node)\n#{script}"
end end
end end
end end

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,70 +1,48 @@
import Expo import UIKit
import ExpoModulesCore
import React import React
import ReactAppDependencyProvider
@UIApplicationMain @main
public class AppDelegate: ExpoAppDelegate { class AppDelegate: ExpoAppDelegate {
var window: UIWindow? override func application(
var reactNativeDelegate: ExpoReactNativeFactoryDelegate?
var reactNativeFactory: RCTReactNativeFactory?
public override func application(
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
let delegate = ReactNativeDelegate() // Make sure the expo modules provider is set up
let factory = ExpoReactNativeFactory(delegate: delegate) let reactNativeWindow = (window as? UIWindow) ?? UIWindow()
delegate.dependencyProvider = RCTAppDependencyProvider()
if #available(iOS 13.0, *) {
reactNativeDelegate = delegate reactNativeWindow.overrideUserInterfaceStyle = .light
reactNativeFactory = factory }
bindReactNativeFactory(factory)
// Initialize the Expo modules provider
#if os(iOS) || os(tvOS) let reactAppDelegate = ReactAppDelegateWrapper(moduleProvider: {
window = UIWindow(frame: UIScreen.main.bounds) return [
factory.startReactNative( // Add any custom modules here if needed
withModuleName: "main", ]
in: window, })
launchOptions: launchOptions)
#endif // Call the parent's implementation
let result = super.application(application, didFinishLaunchingWithOptions: launchOptions)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
// Set up the React Native root view
if let rootView = self.window?.rootViewController?.view as? RCTRootView {
rootView.backgroundColor = .white
}
return result
} }
// Linking API // MARK: - UISceneSession Lifecycle
public override func application(
_ app: UIApplication, override func application(
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
return super.application(app, open: url, options: options) || RCTLinkingManager.application(app, open: url, options: options)
}
// Universal Links
public override func application(
_ application: UIApplication, _ application: UIApplication,
continue userActivity: NSUserActivity, configurationForConnecting connectingSceneSession: UISceneSession,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void options: UIScene.ConnectionOptions
) -> Bool { ) -> UISceneConfiguration {
let result = RCTLinkingManager.application(application, continue: userActivity, restorationHandler: restorationHandler) return UISceneConfiguration(
return super.application(application, continue: userActivity, restorationHandler: restorationHandler) || result name: "Default Configuration",
} sessionRole: connectingSceneSession.role
} )
class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {
// Extension point for config-plugins
override func sourceURL(for bridge: RCTBridge) -> URL? {
// needed to return the correct URL for expo-dev-client.
bridge.bundleURL ?? bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: ".expo/.virtual-metro-entry")
#else
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
} }
} }

View File

@@ -0,0 +1,70 @@
import Expo
import React
import ReactAppDependencyProvider
@UIApplicationMain
public class AppDelegate: ExpoAppDelegate {
var window: UIWindow?
var reactNativeDelegate: ExpoReactNativeFactoryDelegate?
var reactNativeFactory: RCTReactNativeFactory?
public override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let delegate = ReactNativeDelegate()
let factory = ExpoReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()
reactNativeDelegate = delegate
reactNativeFactory = factory
bindReactNativeFactory(factory)
#if os(iOS) || os(tvOS)
window = UIWindow(frame: UIScreen.main.bounds)
factory.startReactNative(
withModuleName: "main",
in: window,
launchOptions: launchOptions)
#endif
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
// Linking API
public override func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
return super.application(app, open: url, options: options) || RCTLinkingManager.application(app, open: url, options: options)
}
// Universal Links
public override func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
let result = RCTLinkingManager.application(application, continue: userActivity, restorationHandler: restorationHandler)
return super.application(application, continue: userActivity, restorationHandler: restorationHandler) || result
}
}
class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {
// Extension point for config-plugins
override func sourceURL(for bridge: RCTBridge) -> URL? {
// needed to return the correct URL for expo-dev-client.
bridge.bundleURL ?? bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: ".expo/.virtual-metro-entry")
#else
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}

View File

@@ -53,6 +53,14 @@
<key>NSAllowsLocalNetworking</key> <key>NSAllowsLocalNetworking</key>
<true/> <true/>
</dict> </dict>
<key>NSCameraUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your microphone</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to save photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your photos</string>
<key>NSUserActivityTypes</key> <key>NSUserActivityTypes</key>
<array> <array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>

View File

@@ -4,16 +4,6 @@
<dict> <dict>
<key>NSPrivacyAccessedAPITypes</key> <key>NSPrivacyAccessedAPITypes</key>
<array> <array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
<string>1C8F.1</string>
<string>C56D.1</string>
</array>
</dict>
<dict> <dict>
<key>NSPrivacyAccessedAPIType</key> <key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string> <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
@@ -26,11 +16,12 @@
</dict> </dict>
<dict> <dict>
<key>NSPrivacyAccessedAPIType</key> <key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string> <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key> <key>NSPrivacyAccessedAPITypeReasons</key>
<array> <array>
<string>85F4.1</string> <string>CA92.1</string>
<string>E174.1</string> <string>1C8F.1</string>
<string>C56D.1</string>
</array> </array>
</dict> </dict>
<dict> <dict>
@@ -41,6 +32,15 @@
<string>35F9.1</string> <string>35F9.1</string>
</array> </array>
</dict> </dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>85F4.1</string>
<string>E174.1</string>
</array>
</dict>
</array> </array>
<key>NSPrivacyCollectedDataTypes</key> <key>NSPrivacyCollectedDataTypes</key>
<array/> <array/>

View File

@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict/> <dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist> </plist>

View File

@@ -17,6 +17,7 @@
"dependencies": { "dependencies": {
"@expo/server": "^0.6.2", "@expo/server": "^0.6.2",
"@expo/vector-icons": "^14.0.2", "@expo/vector-icons": "^14.0.2",
"@formatjs/intl-getcanonicallocales": "^2.5.5",
"@react-native-async-storage/async-storage": "2.1.2", "@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/cli": "^19.1.0", "@react-native-community/cli": "^19.1.0",
"@react-native-community/datetimepicker": "8.4.1", "@react-native-community/datetimepicker": "8.4.1",
@@ -35,7 +36,7 @@
"expo-blur": "~14.1.4", "expo-blur": "~14.1.4",
"expo-clipboard": "^7.1.4", "expo-clipboard": "^7.1.4",
"expo-constants": "~17.1.6", "expo-constants": "~17.1.6",
"expo-dev-client": "~5.2.0", "expo-dev-client": "^5.2.4",
"expo-device": "~7.1.4", "expo-device": "~7.1.4",
"expo-document-picker": "^13.1.5", "expo-document-picker": "^13.1.5",
"expo-file-system": "^18.1.10", "expo-file-system": "^18.1.10",
@@ -58,6 +59,7 @@
"expo-web-browser": "~14.2.0", "expo-web-browser": "~14.2.0",
"form-data": "^4.0.2", "form-data": "^4.0.2",
"formidable": "^3.5.4", "formidable": "^3.5.4",
"intl": "^1.2.5",
"moment": "^2.30.1", "moment": "^2.30.1",
"react": "19.0.0", "react": "19.0.0",
"react-dom": "19.0.0", "react-dom": "19.0.0",
@@ -88,6 +90,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.25.2", "@babel/core": "^7.25.2",
"@react-native-community/cli-platform-ios": "^18.0.0",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/react": "~19.0.10", "@types/react": "~19.0.10",