cocoapods-privacy 0.1.3 → 0.1.5

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: 3a01926feebe0e4abec4ba740c40045150fa16eadbde2286bbe9bfeedaa6594d
4
- data.tar.gz: 43e885178765e82aef94d3b2e0a115fc807c410b389b6c6752ac673dd45de73f
3
+ metadata.gz: cba814ac41f376631ff6ad61aa17f9079504ffdeca70d67745fbff6ba66a7f9a
4
+ data.tar.gz: bc663a8c5bb09bdf7a63bda133bc9cef5a5b519a4abe63ddfc3a8581a23074ad
5
5
  SHA512:
6
- metadata.gz: 625ebb584fe2db868894a19e7fe8bff1cbf817d3b1026418afaf48588d3ee5ae2bd81bb1c4d265bf03e8a28ffd61b73fceda1457c2c120315b2cb70be0c072d0
7
- data.tar.gz: e9fc5727cafed29d6afbbd6a9c0f9dd964e1871125215e191103ad7e80342c0ddd2ca0068c213be272c70bedf7e99bf58442545c0b739263f4814607051a22e6
6
+ metadata.gz: 87fafdd3717866fa0bb684f5e836c8de9ede0f21d69e979f0c2335977e26bdd9c8ee68af46277be567735b64e3a9330090756f176f8e148eab70e9a776f47eb3
7
+ data.tar.gz: d4021c5931c8439e21cfb45c99bb2d4a1601de30721e3fa0a636066aea9d614b83001163027ef346617de7e982ca7d0c94a347a430654938fe4fc844b4b4f2c9
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPrivacy
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -147,14 +147,19 @@ module PrivacyModule
147
147
  # 打开 Xcode 项目,在Resources 下创建
148
148
  project = Xcodeproj::Project.open(File.basename(project_path))
149
149
  main_group = project.main_group
150
- resources_group = PrivacyUtils.find_group_by_path(main_group,resources_folder_path)
150
+ resources_group = main_group.find_subpath('Resources',false)
151
151
  if resources_group.nil?
152
152
  resources_group = main_group.new_group('Resources',resources_folder_path)
153
153
  end
154
154
 
155
155
  # 如果不存在引用,创建新的引入xcode引用
156
156
  if resources_group.find_file_by_path(PrivacyUtils.privacy_name).nil?
157
- resources_group.new_reference(PrivacyUtils.privacy_name)
157
+ privacy_file_ref = resources_group.new_reference(PrivacyUtils.privacy_name,:group)
158
+ privacy_file_ref.last_known_file_type = 'text.xml'
159
+ target = project.targets.first
160
+ resources_build_phase = target.resources_build_phase
161
+ resources_build_phase.add_file_reference(privacy_file_ref) # 将文件引用添加到 resources 构建阶段中
162
+ # target.add_file_references([privacy_file_ref]) # 将文件引用添加到 target 中
158
163
  # resources_group.new_file(privacy_file_path)
159
164
  end
160
165
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-privacy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - youhui