Commit 3e30c371 authored by Lê Hoàng Dương's avatar Lê Hoàng Dương

.

parent f5580a97
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
# 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
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
setup_permissions([
# 'AppTrackingTransparency',
# 'Bluetooth',
# 'Calendars',
# 'CalendarsWriteOnly',
# 'Camera',
# 'Contacts',
# 'FaceID',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
# 'MediaLibrary',
# 'Microphone',
# 'Motion',
# 'Notifications',
# 'PhotoLibrary',
# 'PhotoLibraryAddOnly',
# 'Reminders',
# 'Siri',
# 'SpeechRecognition',
# 'StoreKit',
])
# flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
......@@ -49,22 +24,14 @@ end
target 'anawork_mobile' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
# An absolute path to your application root.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
......@@ -74,13 +41,13 @@ target 'anawork_mobile' do
end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
# __apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
......@@ -90,4 +57,3 @@ def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
puts "Stripping bitcode: #{command}"
system(command)
end
......@@ -1647,7 +1647,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNPermissions (5.2.6):
- RNPermissions (5.3.0):
- React-Core
- RNReanimated (3.17.1):
- DoubleConversion
......@@ -2140,7 +2140,7 @@ SPEC CHECKSUMS:
RNDateTimePicker: 29264364ea7b8cc0fb355b3843cf276a4ff78966
RNFastImage: 462a183c4b0b6b26fdfd639e1ed6ba37536c3b87
RNGestureHandler: fc491c834d09b0538618a3f328ab75fe8f90f5b4
RNPermissions: c5077df5505247042c113d42b17f96b047f41441
RNPermissions: 5017380d9fe1f63f0d1403139bc8d630fe0b7a19
RNReanimated: 109749f3d76b07f13b0b4dec7f0d7d768032393f
RNScreens: 631b8768411a16e356f7934058d2139d0cc75157
RNSVG: 7d403633772d39f695b8a1ccb64db8499e807dac
......@@ -2149,6 +2149,6 @@ SPEC CHECKSUMS:
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 4ef80d96a5534f0e01b3055f17d1e19a9fc61b63
PODFILE CHECKSUM: d0348f0af80e441951e4160be2e7b02572b91a0b
PODFILE CHECKSUM: 313d38a7780c27dcf25e928fcbd0a903a53a37cc
COCOAPODS: 1.16.2
......@@ -27,7 +27,7 @@
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
......
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const path = require("path");
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const defaultConfig = getDefaultConfig(__dirname);
const {assetExts, sourceExts} = defaultConfig.resolver;
const { resolver: { sourceExts, assetExts } } = defaultConfig;
/**
* Metro configuration
* https://reactnative.dev/docs/metro
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
babelTransformerPath: require.resolve("react-native-svg-transformer"),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
assetExts: assetExts.filter((ext) => ext !== "svg"),
sourceExts: [...sourceExts, "svg"],
// resolverMainFields: ["sbmodern", "react-native", "browser", "main"],
},
watchFolders: [path.resolve(__dirname, "../")],
};
module.exports = mergeConfig(defaultConfig, config);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment