upd: ios
This commit is contained in:
@@ -35,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
||||
# your application. You should enable this flag either if you want
|
||||
# to write custom TurboModules/Fabric components OR use libraries that
|
||||
# are providing them.
|
||||
newArchEnabled=true
|
||||
newArchEnabled=false
|
||||
|
||||
# Use this property to enable or disable the Hermes JS engine.
|
||||
# If set to false, you will be using JSC instead.
|
||||
|
||||
90
ios/Podfile
90
ios/Podfile
@@ -1,79 +1,41 @@
|
||||
ENV['EXPO_USE_FRAMEWORKS'] = '1'
|
||||
require 'json'
|
||||
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
||||
|
||||
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 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
|
||||
# ✅ Hapus autolinking manual jika sebelumnya ada
|
||||
# require_relative '../node_modules/expo-modules-core/scripts/autolinking'
|
||||
# use_expo_modules!
|
||||
# Use Expo modules with guard
|
||||
use_expo_modules! if respond_to?(:use_expo_modules!)
|
||||
|
||||
config = use_native_modules! do |c|
|
||||
use_flipper!({ 'Flipper' => '0.182.0' })
|
||||
end
|
||||
config = {
|
||||
:reactNativePath => "../node_modules/react-native"
|
||||
}
|
||||
|
||||
use_react_native!(
|
||||
:path => config[:reactNativePath],
|
||||
:hermes_enabled => podfile_properties['expo.jsEngine'].nil? || podfile_properties['expo.jsEngine'] == 'hermes',
|
||||
:app_path => "#{Pod::Config.instance.installation_root}/..",
|
||||
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
|
||||
:hermes_enabled => true
|
||||
)
|
||||
|
||||
# ✅ Modular headers fix untuk Firebase, dsb.
|
||||
pod 'FirebaseDatabase', :modular_headers => true
|
||||
pod 'FirebaseCore', :modular_headers => true
|
||||
pod 'FirebaseAppCheckInterop', :modular_headers => true
|
||||
pod 'leveldb-library', :modular_headers => true
|
||||
pod 'GoogleUtilities', :modular_headers => true
|
||||
end
|
||||
# Post Install processing
|
||||
post_install do |installer|
|
||||
# Call react_native_post_install without parameters
|
||||
react_native_post_install(installer)
|
||||
|
||||
post_install do |installer|
|
||||
# (Optional fix) remove bad script
|
||||
system("rm -rf Pods/Target\\ Support\\ Files/Pods-mobiledarmasaba/expo-configure-project.sh")
|
||||
# Set C++20 standard for all targets
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'
|
||||
config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
|
||||
|
||||
react_native_post_install(
|
||||
installer,
|
||||
config[:reactNativePath],
|
||||
:mac_catalyst_enabled => false,
|
||||
: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}"
|
||||
# Enable C++ modules
|
||||
config.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
|
||||
config.build_settings['GCC_C_LANGUAGE_STANDARD'] = 'gnu11'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
994
ios/Podfile.lock
994
ios/Podfile.lock
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,70 +1,48 @@
|
||||
import Expo
|
||||
import UIKit
|
||||
import ExpoModulesCore
|
||||
import React
|
||||
import ReactAppDependencyProvider
|
||||
|
||||
@UIApplicationMain
|
||||
public class AppDelegate: ExpoAppDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
var reactNativeDelegate: ExpoReactNativeFactoryDelegate?
|
||||
var reactNativeFactory: RCTReactNativeFactory?
|
||||
|
||||
public override func application(
|
||||
@main
|
||||
class AppDelegate: ExpoAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
let delegate = ReactNativeDelegate()
|
||||
let factory = ExpoReactNativeFactory(delegate: delegate)
|
||||
delegate.dependencyProvider = RCTAppDependencyProvider()
|
||||
// Make sure the expo modules provider is set up
|
||||
let reactNativeWindow = (window as? UIWindow) ?? UIWindow()
|
||||
|
||||
reactNativeDelegate = delegate
|
||||
reactNativeFactory = factory
|
||||
bindReactNativeFactory(factory)
|
||||
if #available(iOS 13.0, *) {
|
||||
reactNativeWindow.overrideUserInterfaceStyle = .light
|
||||
}
|
||||
|
||||
#if os(iOS) || os(tvOS)
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
factory.startReactNative(
|
||||
withModuleName: "main",
|
||||
in: window,
|
||||
launchOptions: launchOptions)
|
||||
#endif
|
||||
// Initialize the Expo modules provider
|
||||
let reactAppDelegate = ReactAppDelegateWrapper(moduleProvider: {
|
||||
return [
|
||||
// Add any custom modules here if needed
|
||||
]
|
||||
})
|
||||
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
// Call the parent's implementation
|
||||
let result = 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
|
||||
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)
|
||||
}
|
||||
// MARK: - UISceneSession Lifecycle
|
||||
|
||||
// Universal Links
|
||||
public override func application(
|
||||
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
|
||||
configurationForConnecting connectingSceneSession: UISceneSession,
|
||||
options: UIScene.ConnectionOptions
|
||||
) -> UISceneConfiguration {
|
||||
return UISceneConfiguration(
|
||||
name: "Default Configuration",
|
||||
sessionRole: connectingSceneSession.role
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
70
ios/mobiledarmasaba/AppDelegate.swift.backup
Normal file
70
ios/mobiledarmasaba/AppDelegate.swift.backup
Normal 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
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,14 @@
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</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>
|
||||
<array>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<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>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||
@@ -26,11 +16,12 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>85F4.1</string>
|
||||
<string>E174.1</string>
|
||||
<string>CA92.1</string>
|
||||
<string>1C8F.1</string>
|
||||
<string>C56D.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
@@ -41,6 +32,15 @@
|
||||
<string>35F9.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>85F4.1</string>
|
||||
<string>E174.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
|
||||
@@ -1,5 +1,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">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -17,6 +17,7 @@
|
||||
"dependencies": {
|
||||
"@expo/server": "^0.6.2",
|
||||
"@expo/vector-icons": "^14.0.2",
|
||||
"@formatjs/intl-getcanonicallocales": "^2.5.5",
|
||||
"@react-native-async-storage/async-storage": "2.1.2",
|
||||
"@react-native-community/cli": "^19.1.0",
|
||||
"@react-native-community/datetimepicker": "8.4.1",
|
||||
@@ -35,7 +36,7 @@
|
||||
"expo-blur": "~14.1.4",
|
||||
"expo-clipboard": "^7.1.4",
|
||||
"expo-constants": "~17.1.6",
|
||||
"expo-dev-client": "~5.2.0",
|
||||
"expo-dev-client": "^5.2.4",
|
||||
"expo-device": "~7.1.4",
|
||||
"expo-document-picker": "^13.1.5",
|
||||
"expo-file-system": "^18.1.10",
|
||||
@@ -58,6 +59,7 @@
|
||||
"expo-web-browser": "~14.2.0",
|
||||
"form-data": "^4.0.2",
|
||||
"formidable": "^3.5.4",
|
||||
"intl": "^1.2.5",
|
||||
"moment": "^2.30.1",
|
||||
"react": "19.0.0",
|
||||
"react-dom": "19.0.0",
|
||||
@@ -88,6 +90,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native-community/cli-platform-ios": "^18.0.0",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/react": "~19.0.10",
|
||||
|
||||
Reference in New Issue
Block a user