Skip to content

Commit 6e494ea

Browse files
committed
feat: ios build setup for example and updated demo gif
1 parent 216ea3b commit 6e494ea

File tree

29 files changed

+2616
-2
lines changed

29 files changed

+2616
-2
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
React Native Video Trimmer UI is a powerful and easy-to-use UI component that adds video trimming functionality to your React Native applications. It's perfect for video editing apps, social media platforms, or any application requiring video manipulation.
44

5+
6+
## Demo
7+
8+
![Video Trimmer UI Demo](./demo.gif)
9+
510
## Key Features
611

712
- Intuitive user interface for selecting trim range
@@ -90,4 +95,4 @@ After selecting the trim range using the VideoTrimmerUI component, you can use t
9095

9196
## License
9297

93-
MIT
98+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

demo.gif

15.6 MB
Loading

example/assets/sample.mp4

-1.02 MB
Binary file not shown.

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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
8+
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
9+
10+
use_autolinking_method_symbol = ('use' + '_native' + '_modules!').to_sym
11+
origin_autolinking_method = self.method(use_autolinking_method_symbol)
12+
self.define_singleton_method(use_autolinking_method_symbol) do |*args|
13+
if ENV['EXPO_UNSTABLE_CORE_AUTOLINKING'] == '1'
14+
Pod::UI.puts('Using expo-modules-autolinking as core autolinking source'.green)
15+
config_command = [
16+
'node',
17+
'--no-warnings',
18+
'--eval',
19+
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
20+
'react-native-config',
21+
'--json',
22+
'--platform',
23+
'ios'
24+
]
25+
origin_autolinking_method.call(config_command)
26+
else
27+
origin_autolinking_method.call()
28+
end
29+
end
30+
31+
platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'
32+
install! 'cocoapods',
33+
:deterministic_uuids => false
34+
35+
prepare_react_native_project!
36+
37+
target 'example' do
38+
use_expo_modules!
39+
config = use_native_modules!
40+
41+
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
42+
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
43+
44+
use_react_native!(
45+
:path => config[:reactNativePath],
46+
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
47+
# An absolute path to your application root.
48+
:app_path => "#{Pod::Config.instance.installation_root}/..",
49+
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
50+
)
51+
52+
post_install do |installer|
53+
react_native_post_install(
54+
installer,
55+
config[:reactNativePath],
56+
:mac_catalyst_enabled => false,
57+
:ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',
58+
)
59+
60+
# This is necessary for Xcode 14, because it signs resource bundles by default
61+
# when building for devices.
62+
installer.target_installation_results.pod_target_installation_results
63+
.each do |pod_name, target_installation_result|
64+
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
65+
resource_bundle_target.build_configurations.each do |config|
66+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
67+
end
68+
end
69+
end
70+
end
71+
72+
post_integrate do |installer|
73+
begin
74+
expo_patch_react_imports!(installer)
75+
rescue => e
76+
Pod::UI.warn e
77+
end
78+
end
79+
end

0 commit comments

Comments
 (0)