@@ -6,18 +6,27 @@ load "/tmp/override_cio_sdk.rb"
66# end of internal Customer.io testing code
77# -------------
88
9- # Resolve react_native_pods.rb with node to allow for hoisting
10- require Pod ::Executable . execute_command ( "node" , [ "-p" ,
11- 'require.resolve(
12- "react-native/scripts/react_native_pods.rb",
13- {paths: [process.argv[1]]},
14- )' , __dir__ ] ) . strip
9+ # Resolve scripts with node to allow for hoisting
10+ def node_require ( script )
11+ require Pod ::Executable . execute_command ( 'node' , [ '-p' ,
12+ "require.resolve(
13+ '#{ script } ',
14+ {paths: [process.argv[1]]},
15+ )" , __dir__ ] ) . strip
16+ end
17+
18+ node_require ( 'react-native/scripts/react_native_pods.rb' )
19+ node_require ( 'react-native-permissions/scripts/setup.rb' )
1520
1621require_relative "../scripts/ios_project_setup_utils.rb"
1722
1823platform :ios , min_ios_version_supported
1924prepare_react_native_project!
2025
26+ setup_permissions ( [
27+ 'LocationWhenInUse' ,
28+ ] )
29+
2130push_provider = ( ENV [ "PUSH_PROVIDER" ] || "apn" ) . downcase
2231
2332app_target_name = "SampleApp"
@@ -51,7 +60,7 @@ target app_target_name do
5160 :path => config [ :reactNativePath ] ,
5261 :app_path => "#{ installation_root } /.." ,
5362 )
54- pod "customerio-reactnative/ #{ push_provider } " , :path => cio_package_path
63+ pod "customerio-reactnative" , :path => cio_package_path , :subspecs => [ push_provider , "location" ]
5564 # install_non_production_ios_sdk_local_path(local_path: '~/code/customerio-ios/', is_app_extension: false, push_service: push_provider)
5665 # install_non_production_ios_sdk_git_branch(branch_name: 'feature/wrappers-inline-support', is_app_extension: false, push_service: push_provider)
5766
0 commit comments