Skip to content

Commit 8691d4f

Browse files
committed
feat: created sdk provider with example app
1 parent 228e618 commit 8691d4f

36 files changed

Lines changed: 17413 additions & 23 deletions

example/ios/.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
.xcode.env.local
25+
26+
# Bundle artifacts
27+
*.jsbundle
28+
29+
# CocoaPods
30+
/Pods/

example/ios/.xcode.env

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This `.xcode.env` file is versioned and is used to source the environment
2+
# used when running script phases inside Xcode.
3+
# To customize your local environment, you can create an `.xcode.env.local`
4+
# file that is not versioned.
5+
6+
# NODE_BINARY variable contains the PATH to the node executable.
7+
#
8+
# Customize the NODE_BINARY variable here.
9+
# For example, to use nvm with brew, add the following line
10+
# . "$(brew --prefix nvm)/nvm.sh" --no-use
11+
export NODE_BINARY=$(command -v node)

example/ios/Podfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
2+
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
3+
4+
require 'json'
5+
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
6+
7+
ENV['RCT_NEW_ARCH_ENABLED'] = '0' if podfile_properties['newArchEnabled'] == 'false'
8+
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
9+
10+
platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1'
11+
install! 'cocoapods',
12+
:deterministic_uuids => false
13+
14+
prepare_react_native_project!
15+
16+
target 'example' do
17+
use_expo_modules!
18+
19+
if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
20+
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
21+
else
22+
config_command = [
23+
'npx',
24+
'expo-modules-autolinking',
25+
'react-native-config',
26+
'--json',
27+
'--platform',
28+
'ios'
29+
]
30+
end
31+
32+
config = use_native_modules!(config_command)
33+
34+
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
35+
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
36+
37+
use_react_native!(
38+
:path => config[:reactNativePath],
39+
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
40+
# An absolute path to your application root.
41+
:app_path => "#{Pod::Config.instance.installation_root}/..",
42+
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
43+
)
44+
45+
post_install do |installer|
46+
react_native_post_install(
47+
installer,
48+
config[:reactNativePath],
49+
:mac_catalyst_enabled => false,
50+
:ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',
51+
)
52+
53+
# This is necessary for Xcode 14, because it signs resource bundles by default
54+
# when building for devices.
55+
installer.target_installation_results.pod_target_installation_results
56+
.each do |pod_name, target_installation_result|
57+
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
58+
resource_bundle_target.build_configurations.each do |config|
59+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
60+
end
61+
end
62+
end
63+
end
64+
end

0 commit comments

Comments
 (0)