cocoapods-rn-toolkit 0.0.9 → 0.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95138111efdbb11484f7e3a8651d5cfbc02f92c777f4d2711b4d757a9f3711ae
|
4
|
+
data.tar.gz: ec2ebe8b5537cdaace1161c6c8104369f510c7e9364a51195ed70bf93084d387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f0a40e257726eb8faf059f69a00e7f32b04e454233e084d9168dddaec506a30f973e07ed17e1dfea4aea1bb05377bdc92961277ad79fe907373b7b09c5a75cd
|
7
|
+
data.tar.gz: b4a8dc8906e87f2b940fc9f24e692d51d087ee2534a6526ec72cd2e634e021e759f7db09606f7e2b3486a4dd2d53b517e2b24a8c61715b8ebfd355cbddf6dc39
|
@@ -1,22 +1,27 @@
|
|
1
1
|
module CocoapodsRnToolkit
|
2
2
|
module IOS17UIGraphics
|
3
|
-
def self.apply(
|
4
|
-
|
5
|
-
|
3
|
+
def self.apply(context)
|
4
|
+
context.pods_project.targets.each do |target|
|
5
|
+
target.build_configurations.each do |config|
|
6
|
+
update_prefix_header(config)
|
7
|
+
end
|
6
8
|
end
|
7
9
|
end
|
8
10
|
|
9
11
|
private
|
10
12
|
|
11
|
-
def self.update_prefix_header(
|
12
|
-
prefix_path =
|
13
|
-
return unless
|
13
|
+
def self.update_prefix_header(config)
|
14
|
+
prefix_path = config.build_settings['GCC_PREFIX_HEADER']
|
15
|
+
return unless prefix_path
|
14
16
|
|
15
|
-
|
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)
|
16
21
|
return if content.include?(macro)
|
17
22
|
|
18
23
|
content = content + "\n" + macro
|
19
|
-
File.open(
|
24
|
+
File.open(full_prefix_path, 'w') { |file| file.write(content) }
|
20
25
|
end
|
21
26
|
|
22
27
|
def self.macro
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -4,20 +4,20 @@ require 'cocoapods-rn-toolkit/library_search_paths'
|
|
4
4
|
require 'cocoapods-rn-toolkit/common_build_settings'
|
5
5
|
|
6
6
|
module CocoapodsRnToolkit
|
7
|
-
Pod::HooksManager.register('cocoapods-rn-toolkit', :post_install) do |
|
7
|
+
Pod::HooksManager.register('cocoapods-rn-toolkit', :post_install) do |context|
|
8
8
|
puts "[cocoapods-rn-toolkit] 开始应用 React Native 修复..."
|
9
9
|
|
10
10
|
puts "[cocoapods-rn-toolkit] 应用通用构建设置..."
|
11
|
-
CocoapodsRnToolkit::CommonBuildSettings.apply(
|
11
|
+
CocoapodsRnToolkit::CommonBuildSettings.apply(context)
|
12
12
|
|
13
13
|
puts "[cocoapods-rn-toolkit] 应用 Xcode 16 RNZipArchive 修复..."
|
14
|
-
CocoapodsRnToolkit::Xcode16RNZipArchive.apply(
|
14
|
+
CocoapodsRnToolkit::Xcode16RNZipArchive.apply(context)
|
15
15
|
|
16
16
|
puts "[cocoapods-rn-toolkit] 应用 iOS 17 UIGraphics 修复..."
|
17
|
-
CocoapodsRnToolkit::IOS17UIGraphics.apply(
|
17
|
+
CocoapodsRnToolkit::IOS17UIGraphics.apply(context)
|
18
18
|
|
19
19
|
puts "[cocoapods-rn-toolkit] 应用库搜索路径修复..."
|
20
|
-
CocoapodsRnToolkit::LibrarySearchPaths.apply(
|
20
|
+
CocoapodsRnToolkit::LibrarySearchPaths.apply(context)
|
21
21
|
|
22
22
|
puts "[cocoapods-rn-toolkit] React Native 修复应用完成。"
|
23
23
|
end
|