cocoapods-rn-toolkit 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2ca85c40bb8b152ffac086032b5d9b4438a790b5a71d7755e74ee1406db1027
4
- data.tar.gz: 7cdaea44f959dddfdef627cc063b5ea660898c23547b2a6eb1f1cda6280a3c69
3
+ metadata.gz: 95138111efdbb11484f7e3a8651d5cfbc02f92c777f4d2711b4d757a9f3711ae
4
+ data.tar.gz: ec2ebe8b5537cdaace1161c6c8104369f510c7e9364a51195ed70bf93084d387
5
5
  SHA512:
6
- metadata.gz: 7bfde6c973a692a2000a5173a6d9cde7f28273ab06892a58833cf4e8c5912320a35a1d3dd4d05441ee6501a4170df9f1e105a2249fd618a63634370098887248
7
- data.tar.gz: ace773463c5ef16e5758f29aaced6b440cb9bce82f83d4ba0363cc486538189a61dd50d42cb8717bde52f5b8e8eacd0c0e02c7d7aa96f84c9ab2024a2c98db99
6
+ metadata.gz: 9f0a40e257726eb8faf059f69a00e7f32b04e454233e084d9168dddaec506a30f973e07ed17e1dfea4aea1bb05377bdc92961277ad79fe907373b7b09c5a75cd
7
+ data.tar.gz: b4a8dc8906e87f2b940fc9f24e692d51d087ee2534a6526ec72cd2e634e021e759f7db09606f7e2b3486a4dd2d53b517e2b24a8c61715b8ebfd355cbddf6dc39
@@ -1,3 +1,3 @@
1
1
  module CocoapodsRnToolkit
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -1,22 +1,27 @@
1
1
  module CocoapodsRnToolkit
2
2
  module IOS17UIGraphics
3
- def self.apply(installer)
4
- installer.pods_project.targets.each do |target|
5
- update_prefix_header(target)
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(target)
12
- prefix_path = target.prefix_header_path
13
- return unless File.exist?(prefix_path)
13
+ def self.update_prefix_header(config)
14
+ prefix_path = config.build_settings['GCC_PREFIX_HEADER']
15
+ return unless prefix_path
14
16
 
15
- content = File.read(prefix_path)
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(prefix_path, 'w') { |file| file.write(content) }
24
+ File.open(full_prefix_path, 'w') { |file| file.write(content) }
20
25
  end
21
26
 
22
27
  def self.macro
@@ -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 |installer|
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(installer)
11
+ CocoapodsRnToolkit::CommonBuildSettings.apply(context)
12
12
 
13
13
  puts "[cocoapods-rn-toolkit] 应用 Xcode 16 RNZipArchive 修复..."
14
- CocoapodsRnToolkit::Xcode16RNZipArchive.apply(installer)
14
+ CocoapodsRnToolkit::Xcode16RNZipArchive.apply(context)
15
15
 
16
16
  puts "[cocoapods-rn-toolkit] 应用 iOS 17 UIGraphics 修复..."
17
- CocoapodsRnToolkit::IOS17UIGraphics.apply(installer)
17
+ CocoapodsRnToolkit::IOS17UIGraphics.apply(context)
18
18
 
19
19
  puts "[cocoapods-rn-toolkit] 应用库搜索路径修复..."
20
- CocoapodsRnToolkit::LibrarySearchPaths.apply(installer)
20
+ CocoapodsRnToolkit::LibrarySearchPaths.apply(context)
21
21
 
22
22
  puts "[cocoapods-rn-toolkit] React Native 修复应用完成。"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-rn-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nx