Created
June 7, 2019 18:17
-
-
Save sjchmiela/b7a596d75b958cb69bd153ede7439d45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://github.com/CocoaPods/Specs.git' | |
platform :ios, '10.0' | |
target 'exponent-view-template' do | |
pod 'ExpoKit', | |
# git..., | |
:subspecs => [ | |
"Core" | |
], | |
:inhibit_warnings => true | |
# We added this following https://docs.expo.io/versions/latest/expokit/expokit/#upgrading-expokit | |
# Install unimodules | |
require_relative '../node_modules/react-native-unimodules/cocoapods.rb' | |
use_unimodules! | |
# React pods... | |
# ... | |
# ... | |
# Now, ensure this whole post_install block looks like this. You even may copy it directly from here. | |
post_install do |installer| | |
installer.pods_project.main_group.tab_width = '2'; | |
installer.pods_project.main_group.indent_width = '2'; | |
installer.target_installation_results.pod_target_installation_results | |
.each do |pod_name, target_installation_result| | |
if pod_name == 'ExpoKit' | |
target_installation_result.native_target.build_configurations.each do |config| | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1' | |
# Enable Google Maps support | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS=1' | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS_UTILS=1' | |
end | |
end | |
if ['Amplitude-iOS','Analytics','AppAuth','Branch','CocoaLumberjack','FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit','GPUImage','JKBigInteger2'].include? pod_name | |
target_installation_result.native_target.build_configurations.each do |config| | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' | |
end | |
end | |
# Can't specify this in the React podspec because we need to use those podspecs for detached | |
# projects which don't reference ExponentCPP. | |
if pod_name.start_with?('React') | |
target_installation_result.native_target.build_configurations.each do |config| | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' | |
config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)'] | |
end | |
end | |
# Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and | |
# RCT_ENABLE_PACKAGER_CONNECTION disabled | |
next unless pod_name == 'React' | |
target_installation_result.native_target.build_configurations.each do |config| | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1' | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0' | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0' | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment