@norcy/react-native-toolkit 0.2.8 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -3
- package/.circleci/config.yml +0 -98
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.github/workflows/publish-on-main.yml +0 -32
- package/.gitignore +0 -66
- package/.husky/pre-commit +0 -2
- package/.prettierrc +0 -8
- package/.watchmanconfig +0 -6
- package/babel.config.js +0 -3
- package/clean_build.sh +0 -6
- package/cocoa_plugins/cocoapods-rn-toolkit/Gemfile +0 -13
- package/cocoa_plugins/cocoapods-rn-toolkit/LICENSE.txt +0 -22
- package/cocoa_plugins/cocoapods-rn-toolkit/README.md +0 -27
- package/cocoa_plugins/cocoapods-rn-toolkit/Rakefile +0 -13
- package/cocoa_plugins/cocoapods-rn-toolkit/cocoapods-rn-toolkit.gemspec +0 -28
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/command/toolkit.rb +0 -44
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/command.rb +0 -1
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/common_build_settings.rb +0 -12
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/gem_version.rb +0 -3
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/ios17_uigraphics.rb +0 -57
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/library_search_paths.rb +0 -41
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/xcode16_rnziparchive.rb +0 -15
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit.rb +0 -1
- package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods_plugin.rb +0 -32
- package/cocoa_plugins/cocoapods-rn-toolkit/spec/command/toolkit_spec.rb +0 -12
- package/cocoa_plugins/cocoapods-rn-toolkit/spec/spec_helper.rb +0 -50
- package/locales/en-US.json +0 -1
- package/locales/zh-CN.json +0 -1
- package/tsconfig.json +0 -27
- package/yarn.lock +0 -10058
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norcy/react-native-toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "My Toolkit",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react-native": "0.72.5",
|
|
78
78
|
"react-native-blob-util": "^0.19.11",
|
|
79
79
|
"react-native-builder-bob": "^0.30.2",
|
|
80
|
-
"react-native-device-info": "^
|
|
80
|
+
"react-native-device-info": "^11.1.0",
|
|
81
81
|
"react-native-gesture-handler": "^2.0.0",
|
|
82
82
|
"react-native-in-app-review": "^4.4.2",
|
|
83
83
|
"react-native-mmkv-storage": "0.10.3",
|
|
@@ -97,7 +97,6 @@
|
|
|
97
97
|
"@react-native-async-storage/async-storage": "*",
|
|
98
98
|
"@react-native-camera-roll/camera-roll": "*",
|
|
99
99
|
"@react-native-clipboard/clipboard": "*",
|
|
100
|
-
"@react-native-community/async-storage": "*",
|
|
101
100
|
"@react-native-community/cameraroll": "*",
|
|
102
101
|
"@react-native-masked-view/masked-view": "*",
|
|
103
102
|
"@sentry/react-native": "*",
|
package/.circleci/config.yml
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
executors:
|
|
4
|
-
default:
|
|
5
|
-
docker:
|
|
6
|
-
- image: circleci/node:10
|
|
7
|
-
working_directory: ~/project
|
|
8
|
-
|
|
9
|
-
commands:
|
|
10
|
-
attach_project:
|
|
11
|
-
steps:
|
|
12
|
-
- attach_workspace:
|
|
13
|
-
at: ~/project
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
install-dependencies:
|
|
17
|
-
executor: default
|
|
18
|
-
steps:
|
|
19
|
-
- checkout
|
|
20
|
-
- attach_project
|
|
21
|
-
- restore_cache:
|
|
22
|
-
keys:
|
|
23
|
-
- dependencies-{{ checksum "package.json" }}
|
|
24
|
-
- dependencies-
|
|
25
|
-
- restore_cache:
|
|
26
|
-
keys:
|
|
27
|
-
- dependencies-example-{{ checksum "example/package.json" }}
|
|
28
|
-
- dependencies-example-
|
|
29
|
-
- run:
|
|
30
|
-
name: Install dependencies
|
|
31
|
-
command: |
|
|
32
|
-
yarn install --cwd example --frozen-lockfile
|
|
33
|
-
yarn install --frozen-lockfile
|
|
34
|
-
- save_cache:
|
|
35
|
-
key: dependencies-{{ checksum "package.json" }}
|
|
36
|
-
paths: node_modules
|
|
37
|
-
- save_cache:
|
|
38
|
-
key: dependencies-example-{{ checksum "example/package.json" }}
|
|
39
|
-
paths: example/node_modules
|
|
40
|
-
- persist_to_workspace:
|
|
41
|
-
root: .
|
|
42
|
-
paths: .
|
|
43
|
-
|
|
44
|
-
lint:
|
|
45
|
-
executor: default
|
|
46
|
-
steps:
|
|
47
|
-
- attach_project
|
|
48
|
-
- run:
|
|
49
|
-
name: Lint files
|
|
50
|
-
command: |
|
|
51
|
-
yarn lint
|
|
52
|
-
|
|
53
|
-
typescript:
|
|
54
|
-
executor: default
|
|
55
|
-
steps:
|
|
56
|
-
- attach_project
|
|
57
|
-
- run:
|
|
58
|
-
name: Typecheck files
|
|
59
|
-
command: |
|
|
60
|
-
yarn typescript
|
|
61
|
-
|
|
62
|
-
unit-tests:
|
|
63
|
-
executor: default
|
|
64
|
-
steps:
|
|
65
|
-
- attach_project
|
|
66
|
-
- run:
|
|
67
|
-
name: Run unit tests
|
|
68
|
-
command: |
|
|
69
|
-
yarn test --coverage
|
|
70
|
-
- store_artifacts:
|
|
71
|
-
path: coverage
|
|
72
|
-
destination: coverage
|
|
73
|
-
|
|
74
|
-
build-package:
|
|
75
|
-
executor: default
|
|
76
|
-
steps:
|
|
77
|
-
- attach_project
|
|
78
|
-
- run:
|
|
79
|
-
name: Build package
|
|
80
|
-
command: |
|
|
81
|
-
yarn prepare
|
|
82
|
-
|
|
83
|
-
workflows:
|
|
84
|
-
build-and-test:
|
|
85
|
-
jobs:
|
|
86
|
-
- install-dependencies
|
|
87
|
-
- lint:
|
|
88
|
-
requires:
|
|
89
|
-
- install-dependencies
|
|
90
|
-
- typescript:
|
|
91
|
-
requires:
|
|
92
|
-
- install-dependencies
|
|
93
|
-
- unit-tests:
|
|
94
|
-
requires:
|
|
95
|
-
- install-dependencies
|
|
96
|
-
- build-package:
|
|
97
|
-
requires:
|
|
98
|
-
- install-dependencies
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.gitattributes
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: Publish to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master, beta]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
publish-npm:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
with:
|
|
13
|
-
fetch-depth: 0
|
|
14
|
-
# 添加 token 权限
|
|
15
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
16
|
-
|
|
17
|
-
- uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: '18.x'
|
|
20
|
-
registry-url: 'https://registry.npmjs.org'
|
|
21
|
-
|
|
22
|
-
- run: yarn install --frozen-lockfile --ignore-scripts
|
|
23
|
-
|
|
24
|
-
- run: |
|
|
25
|
-
git config user.name "GitHub Actions"
|
|
26
|
-
git config user.email "actions@github.com"
|
|
27
|
-
yarn publish --patch --message "Bump version to %s [skip ci]"
|
|
28
|
-
git push origin ${{ github.ref_name }} --follow-tags
|
|
29
|
-
env:
|
|
30
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
31
|
-
# 确保使用 checkout 步骤配置的 token
|
|
32
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/.gitignore
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# OSX
|
|
2
|
-
#
|
|
3
|
-
.DS_Store
|
|
4
|
-
|
|
5
|
-
# XDE
|
|
6
|
-
.expo/
|
|
7
|
-
|
|
8
|
-
# VSCode
|
|
9
|
-
.vscode/
|
|
10
|
-
jsconfig.json
|
|
11
|
-
|
|
12
|
-
# Xcode
|
|
13
|
-
#
|
|
14
|
-
build/
|
|
15
|
-
*.pbxuser
|
|
16
|
-
!default.pbxuser
|
|
17
|
-
*.mode1v3
|
|
18
|
-
!default.mode1v3
|
|
19
|
-
*.mode2v3
|
|
20
|
-
!default.mode2v3
|
|
21
|
-
*.perspectivev3
|
|
22
|
-
!default.perspectivev3
|
|
23
|
-
xcuserdata
|
|
24
|
-
*.xccheckout
|
|
25
|
-
*.moved-aside
|
|
26
|
-
DerivedData
|
|
27
|
-
*.hmap
|
|
28
|
-
*.ipa
|
|
29
|
-
*.xcuserstate
|
|
30
|
-
project.xcworkspace
|
|
31
|
-
|
|
32
|
-
# Android/IJ
|
|
33
|
-
#
|
|
34
|
-
.idea
|
|
35
|
-
.gradle
|
|
36
|
-
local.properties
|
|
37
|
-
android.iml
|
|
38
|
-
|
|
39
|
-
# Cocoapods
|
|
40
|
-
#
|
|
41
|
-
example/ios/Pods
|
|
42
|
-
|
|
43
|
-
# node.js
|
|
44
|
-
#
|
|
45
|
-
node_modules/
|
|
46
|
-
npm-debug.log
|
|
47
|
-
yarn-debug.log
|
|
48
|
-
yarn-error.log
|
|
49
|
-
|
|
50
|
-
# BUCK
|
|
51
|
-
buck-out/
|
|
52
|
-
\.buckd/
|
|
53
|
-
android/app/libs
|
|
54
|
-
android/keystores/debug.keystore
|
|
55
|
-
|
|
56
|
-
# Expo
|
|
57
|
-
.expo/*
|
|
58
|
-
|
|
59
|
-
# generated by bob
|
|
60
|
-
lib/
|
|
61
|
-
|
|
62
|
-
# cocoa_plugins
|
|
63
|
-
!/cocoa_plugins/cocoapods-rn-toolkit/lib
|
|
64
|
-
pkg
|
|
65
|
-
.idea/
|
|
66
|
-
*.gem
|
package/.husky/pre-commit
DELETED
package/.prettierrc
DELETED
package/.watchmanconfig
DELETED
package/babel.config.js
DELETED
package/clean_build.sh
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2024 Nx <chenyg32@gmail.com>
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# cocoapods-rn-toolkit
|
|
2
|
-
|
|
3
|
-
A description of cocoapods-rn-toolkit.
|
|
4
|
-
|
|
5
|
-
## 构建
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
gem build cocoapods-rn-toolkit.gemspec
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 发布
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
# Step 1: 修改 gem_version.rb 中的版本号
|
|
15
|
-
# Step 2: 发布
|
|
16
|
-
gem push cocoapods-rn-toolkit-x.x.x.gem
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
$ gem install -s https://rubygems.org cocoapods-rn-toolkit -V
|
|
22
|
-
$ bundle install
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
$ pod spec toolkit POD_NAME
|
|
27
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'cocoapods-rn-toolkit/gem_version.rb'
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = 'cocoapods-rn-toolkit'
|
|
8
|
-
spec.version = CocoapodsRnToolkit::VERSION
|
|
9
|
-
spec.authors = ['Nx']
|
|
10
|
-
spec.email = ['chenyg32@gmail.com']
|
|
11
|
-
spec.description = %q{A toolkit for React Native development with CocoaPods.}
|
|
12
|
-
spec.summary = %q{cocoapods-rn-toolkit provides utilities and commands to streamline React Native development using CocoaPods.}
|
|
13
|
-
spec.homepage = 'https://github.com/your_username/cocoapods-rn-toolkit'
|
|
14
|
-
spec.license = 'MIT'
|
|
15
|
-
|
|
16
|
-
spec.files = Dir['lib/**/*', 'README.md', 'LICENSE']
|
|
17
|
-
spec.require_paths = ['lib']
|
|
18
|
-
|
|
19
|
-
spec.add_runtime_dependency 'cocoapods', '~> 1.0'
|
|
20
|
-
|
|
21
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
22
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
|
23
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
24
|
-
|
|
25
|
-
spec.required_ruby_version = '>= 2.6.0'
|
|
26
|
-
spec.platform = Gem::Platform::RUBY
|
|
27
|
-
spec.required_rubygems_version = '>= 2.7.0'
|
|
28
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
module Pod
|
|
2
|
-
class Command
|
|
3
|
-
# This is an example of a cocoapods plugin adding a top-level subcommand
|
|
4
|
-
# to the 'pod' command.
|
|
5
|
-
#
|
|
6
|
-
# You can also create subcommands of existing or new commands. Say you
|
|
7
|
-
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
|
8
|
-
# (e.g. `pod list deprecated`), there are a few things that would need
|
|
9
|
-
# to change.
|
|
10
|
-
#
|
|
11
|
-
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
|
12
|
-
# the class to exist in the the Pod::Command::List namespace
|
|
13
|
-
# - change this class to extend from `List` instead of `Command`. This
|
|
14
|
-
# tells the plugin system that it is a subcommand of `list`.
|
|
15
|
-
# - edit `lib/cocoapods_plugins.rb` to require this file
|
|
16
|
-
#
|
|
17
|
-
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
|
18
|
-
# in the `plugins.json` file, once your plugin is released.
|
|
19
|
-
#
|
|
20
|
-
class Toolkit < Command
|
|
21
|
-
self.summary = 'Short description of cocoapods-rn-toolkit.'
|
|
22
|
-
|
|
23
|
-
self.description = <<-DESC
|
|
24
|
-
Longer description of cocoapods-rn-toolkit.
|
|
25
|
-
DESC
|
|
26
|
-
|
|
27
|
-
self.arguments = 'NAME'
|
|
28
|
-
|
|
29
|
-
def initialize(argv)
|
|
30
|
-
@name = argv.shift_argument
|
|
31
|
-
super
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def validate!
|
|
35
|
-
super
|
|
36
|
-
help! 'A Pod name is required.' unless @name
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def run
|
|
40
|
-
UI.puts "Add your implementation for the cocoapods-rn-toolkit plugin in #{__FILE__}"
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require 'cocoapods-rn-toolkit/command/toolkit'
|
package/cocoa_plugins/cocoapods-rn-toolkit/lib/cocoapods-rn-toolkit/common_build_settings.rb
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module CocoapodsRnToolkit
|
|
2
|
-
class CommonBuildSettings
|
|
3
|
-
def self.apply(installer)
|
|
4
|
-
installer.pods_project.targets.each do |target|
|
|
5
|
-
target.build_configurations.each do |config|
|
|
6
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
7
|
-
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
module CocoapodsRnToolkit
|
|
2
|
-
module IOS17UIGraphics
|
|
3
|
-
def self.apply(context)
|
|
4
|
-
context.pods_project.targets.each do |target|
|
|
5
|
-
target.build_configurations.each do |config|
|
|
6
|
-
update_prefix_header(context, config)
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def self.update_prefix_header(context, config)
|
|
14
|
-
prefix_path = config.build_settings['GCC_PREFIX_HEADER']
|
|
15
|
-
return unless prefix_path
|
|
16
|
-
|
|
17
|
-
full_prefix_path = File.join(context.sandbox.root, prefix_path)
|
|
18
|
-
return unless File.exist?(full_prefix_path)
|
|
19
|
-
|
|
20
|
-
content = File.read(full_prefix_path)
|
|
21
|
-
return if content.include?(macro)
|
|
22
|
-
|
|
23
|
-
# puts "[cocoapods-rn-toolkit] 更新前缀头文件: #{full_prefix_path}"
|
|
24
|
-
|
|
25
|
-
content = content + "\n" + macro
|
|
26
|
-
File.open(full_prefix_path, 'w') { |file| file.write(content) }
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def self.macro
|
|
30
|
-
<<~MACRO
|
|
31
|
-
#ifndef UIGraphicsBeginImageContextWithOptions
|
|
32
|
-
#define UIGraphicsBeginImageContextWithOptions(size, opaque, scale) \\
|
|
33
|
-
do {\\
|
|
34
|
-
if (@available(iOS 17.0, *)) {\\
|
|
35
|
-
CGSize _size = CGSizeMake(size.width < 0.01 ? 0.01 : size.width, size.height < 0.01 ? 0.01 : size.height);\\
|
|
36
|
-
UIGraphicsBeginImageContextWithOptions(_size, opaque, scale);\\
|
|
37
|
-
} else {\\
|
|
38
|
-
UIGraphicsBeginImageContextWithOptions(size, opaque, scale);\\
|
|
39
|
-
}\\
|
|
40
|
-
} while(0)
|
|
41
|
-
#endif
|
|
42
|
-
|
|
43
|
-
#ifndef UIGraphicsBeginImageContext
|
|
44
|
-
#define UIGraphicsBeginImageContext(size) \\
|
|
45
|
-
do {\\
|
|
46
|
-
if (@available(iOS 17.0, *)) {\\
|
|
47
|
-
CGSize _size = CGSizeMake(size.width < 0.01 ? 0.01 : size.width, size.height < 0.01 ? 0.01 : size.height);\\
|
|
48
|
-
UIGraphicsBeginImageContext(_size);\\
|
|
49
|
-
} else {\\
|
|
50
|
-
UIGraphicsBeginImageContext(size);\\
|
|
51
|
-
}\\
|
|
52
|
-
} while(0)
|
|
53
|
-
#endif
|
|
54
|
-
MACRO
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
module CocoapodsRnToolkit
|
|
2
|
-
module LibrarySearchPaths
|
|
3
|
-
def self.apply(context)
|
|
4
|
-
# 获取所有的用户项目
|
|
5
|
-
user_projects = context.umbrella_targets.map(&:user_project).uniq(&:path)
|
|
6
|
-
|
|
7
|
-
# 获取 Pods 项目
|
|
8
|
-
pods_project = context.pods_project
|
|
9
|
-
|
|
10
|
-
# 合并所有需要处理的项目
|
|
11
|
-
projects = user_projects + [pods_project]
|
|
12
|
-
|
|
13
|
-
projects.each do |project|
|
|
14
|
-
project.build_configurations.each do |config|
|
|
15
|
-
fix_config(config)
|
|
16
|
-
end
|
|
17
|
-
project.native_targets.each do |target|
|
|
18
|
-
target.build_configurations.each do |config|
|
|
19
|
-
fix_config(config)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
project.save()
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
def self.fix_config(config)
|
|
29
|
-
lib_search_paths = config.build_settings["LIBRARY_SEARCH_PATHS"]
|
|
30
|
-
if lib_search_paths
|
|
31
|
-
if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
|
|
32
|
-
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
|
|
33
|
-
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
|
|
34
|
-
if !(lib_search_paths.include?("$(SDKROOT)/usr/lib/swift") || lib_search_paths.include?("\"$(SDKROOT)/usr/lib/swift\""))
|
|
35
|
-
lib_search_paths.insert(0, "$(SDKROOT)/usr/lib/swift")
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module CocoapodsRnToolkit
|
|
2
|
-
module Xcode16RNZipArchive
|
|
3
|
-
def self.apply(installer)
|
|
4
|
-
installer.pods_project.targets.each do |target|
|
|
5
|
-
if target.name == 'RNZipArchive'
|
|
6
|
-
target.source_build_phase.files.each do |file|
|
|
7
|
-
if file.settings && file.settings['COMPILER_FLAGS']
|
|
8
|
-
file.settings['COMPILER_FLAGS'] = ''
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require 'cocoapods-rn-toolkit/gem_version'
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
require 'cocoapods-rn-toolkit/xcode16_rnziparchive'
|
|
2
|
-
require 'cocoapods-rn-toolkit/ios17_uigraphics'
|
|
3
|
-
require 'cocoapods-rn-toolkit/library_search_paths'
|
|
4
|
-
require 'cocoapods-rn-toolkit/common_build_settings'
|
|
5
|
-
|
|
6
|
-
module CocoapodsRnToolkit
|
|
7
|
-
Pod::HooksManager.register('cocoapods-rn-toolkit', :post_install) do |context|
|
|
8
|
-
puts "[cocoapods-rn-toolkit] 开始应用 React Native 修复..."
|
|
9
|
-
|
|
10
|
-
puts "[cocoapods-rn-toolkit] 应用通用构建设置..."
|
|
11
|
-
CocoapodsRnToolkit::CommonBuildSettings.apply(context)
|
|
12
|
-
|
|
13
|
-
puts "[cocoapods-rn-toolkit] 应用 Xcode 16 RNZipArchive 修复..."
|
|
14
|
-
CocoapodsRnToolkit::Xcode16RNZipArchive.apply(context)
|
|
15
|
-
|
|
16
|
-
puts "[cocoapods-rn-toolkit] 应用 iOS 17 UIGraphics 修复..."
|
|
17
|
-
CocoapodsRnToolkit::IOS17UIGraphics.apply(context)
|
|
18
|
-
|
|
19
|
-
puts "[cocoapods-rn-toolkit] 应用库搜索路径修复..."
|
|
20
|
-
CocoapodsRnToolkit::LibrarySearchPaths.apply(context)
|
|
21
|
-
|
|
22
|
-
puts "[cocoapods-rn-toolkit] React Native 修复应用完成。"
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
module Pod
|
|
27
|
-
class Podfile
|
|
28
|
-
def apply_rn_fixes!
|
|
29
|
-
plugin 'cocoapods-rn-toolkit'
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require 'pathname'
|
|
2
|
-
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
|
3
|
-
$:.unshift((ROOT + 'lib').to_s)
|
|
4
|
-
$:.unshift((ROOT + 'spec').to_s)
|
|
5
|
-
|
|
6
|
-
require 'bundler/setup'
|
|
7
|
-
require 'bacon'
|
|
8
|
-
require 'mocha-on-bacon'
|
|
9
|
-
require 'pretty_bacon'
|
|
10
|
-
require 'pathname'
|
|
11
|
-
require 'cocoapods'
|
|
12
|
-
|
|
13
|
-
Mocha::Configuration.prevent(:stubbing_non_existent_method)
|
|
14
|
-
|
|
15
|
-
require 'cocoapods_plugin'
|
|
16
|
-
|
|
17
|
-
#-----------------------------------------------------------------------------#
|
|
18
|
-
|
|
19
|
-
module Pod
|
|
20
|
-
|
|
21
|
-
# Disable the wrapping so the output is deterministic in the tests.
|
|
22
|
-
#
|
|
23
|
-
UI.disable_wrap = true
|
|
24
|
-
|
|
25
|
-
# Redirects the messages to an internal store.
|
|
26
|
-
#
|
|
27
|
-
module UI
|
|
28
|
-
@output = ''
|
|
29
|
-
@warnings = ''
|
|
30
|
-
|
|
31
|
-
class << self
|
|
32
|
-
attr_accessor :output
|
|
33
|
-
attr_accessor :warnings
|
|
34
|
-
|
|
35
|
-
def puts(message = '')
|
|
36
|
-
@output << "#{message}\n"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def warn(message = '', actions = [])
|
|
40
|
-
@warnings << "#{message}\n"
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def print(message)
|
|
44
|
-
@output << message
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
#-----------------------------------------------------------------------------#
|
package/locales/en-US.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/locales/zh-CN.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|