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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba814ac41f376631ff6ad61aa17f9079504ffdeca70d67745fbff6ba66a7f9a
|
4
|
+
data.tar.gz: bc663a8c5bb09bdf7a63bda133bc9cef5a5b519a4abe63ddfc3a8581a23074ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87fafdd3717866fa0bb684f5e836c8de9ede0f21d69e979f0c2335977e26bdd9c8ee68af46277be567735b64e3a9330090756f176f8e148eab70e9a776f47eb3
|
7
|
+
data.tar.gz: d4021c5931c8439e21cfb45c99bb2d4a1601de30721e3fa0a636066aea9d614b83001163027ef346617de7e982ca7d0c94a347a430654938fe4fc844b4b4f2c9
|
@@ -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 =
|
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
|
|