Skip to content

Instantly share code, notes, and snippets.

@codeclash
Created October 2, 2017 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeclash/889da117d8720ead98a9d1d379260fe3 to your computer and use it in GitHub Desktop.
Save codeclash/889da117d8720ead98a9d1d379260fe3 to your computer and use it in GitHub Desktop.
Sample Expo Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'your-app-name' do
pod 'ExpoKit',
:git => "http://github.com/expo/expo.git",
:tag => "ios/1.20.3",
:subspecs => [
"Core",
"CPP"
]
pod 'React',
:path => "../node_modules/react-native",
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
"RCTGeolocation",
"RCTImage",
"RCTNetwork",
"RCTText",
"RCTVibration",
"RCTWebSocket",
"DevSupport",
"BatchedBridge"
]
pod 'Yoga',
:path => "../node_modules/react-native/ReactCommon/yoga"
post_install do |installer|
installer.pods_project.main_group.tab_width = '2';
installer.pods_project.main_group.indent_width = '2';
installer.pod_targets.each do |target|
if target.pod_name == 'ExpoKit'
target.native_target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'
# needed for GoogleMaps 2.x
config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= []
config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Base/Frameworks'
config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Maps/Frameworks'
end
end
# Build React Native with RCT_DEV enabled
next unless target.pod_name == 'React'
target.native_target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment