-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathPodfile
More file actions
124 lines (103 loc) · 3.87 KB
/
Podfile
File metadata and controls
124 lines (103 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
source 'https://cdn.cocoapods.org/'
# 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
require_relative './mendix_utils'
deployment_target = min_ios_version_supported
platform :ios, deployment_target
prepare_react_native_project!
generate_mendix_delegate
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
def common_pods
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
# RN development pods
config = use_native_modules!
xcconfig_file = "./Config/config.xcconfig"
xcconfig = Xcodeproj::Config.new(xcconfig_file)
hermes_enabled = xcconfig.attributes['HERMES_ENABLED'] || 'false'
use_react_native!(
:path => config[:reactNativePath],
# Hermes is configurable in Studio Pro via Navigation Profile
:hermes_enabled => (hermes_enabled == 'YES'),
:fabric_enabled => false,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# RN pods end
# Manually linked dependencies
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
# Third party dependencies of dependencies
pod 'IQKeyboardManager'
# At least one permission must be added when `react-native-permissions` used
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
# Required MendixNative dependency
pod 'SSZipArchive'
# Required for Push notifications
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
end
target 'nativeTemplate' do
generate_pod_dependencies
use_native_modules!
common_pods
# Intentionally left empty
end
target 'dev' do
generate_pod_dependencies
use_native_modules!
common_pods
# Intentionally left empty
end
post_install do |installer|
config = use_native_modules!
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
installer.pods_project.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'YES'
config.build_settings['OTHER_LDFLAGS'] ||= ['$(inherited)']
if config.name == "Debug"
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
config.build_settings['OTHER_LDFLAGS'] << "-fembed-bitcode-marker"
config.build_settings['BITCODE_GENERATION_MODE'] = "marker"
else
config.build_settings['OTHER_LDFLAGS'] << "-fembed-bitcode"
config.build_settings['BITCODE_GENERATION_MODE'] = "bitcode"
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == "React"
if config.name == "ReleaseDevApp"
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << "DEBUG=1"
end
end
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
end
end
# Ensure deployment_target is set correctly for all projects
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
end
end
project.build_configurations.each do |bc|
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
end
end
end