Skip to content

Commit b4893f5

Browse files
committed
fix: add workaround regarding xcprivacy issue with Bugsee
1 parent fcd437c commit b4893f5

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

src/app/ios/Podfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,26 @@ post_install do |installer|
4646
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
4747
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
4848
end
49+
50+
# Workaround: move .xcprivacy files from Sources to Resources build phase.
51+
# Some pods (e.g. bugsee_flutter) incorrectly place PrivacyInfo.xcprivacy in
52+
# the Sources phase, causing "no rule to process file ... of type 'text.xml'"
53+
# during xcodebuild archive.
54+
sources_phase = target.build_phases.find { |p| p.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase) }
55+
next unless sources_phase
56+
57+
xcprivacy_files = sources_phase.files.select { |f| f.file_ref&.path&.end_with?('.xcprivacy') }
58+
next if xcprivacy_files.empty?
59+
60+
resources_phase = target.build_phases.find { |p| p.is_a?(Xcodeproj::Project::Object::PBXResourcesBuildPhase) }
61+
resources_phase ||= target.new_resources_build_phase
62+
63+
xcprivacy_files.each do |build_file|
64+
file_ref = build_file.file_ref
65+
sources_phase.remove_file_reference(file_ref)
66+
unless resources_phase.files.map(&:file_ref).include?(file_ref)
67+
resources_phase.add_file_reference(file_ref)
68+
end
69+
end
4970
end
5071
end

src/cli/CHANGELOG.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ Prefix your items with `(Template)` if the change is about the template and not
88
## 0.26.2
99
- Fix issue with dispose in VM.
1010
- Fix errors in documentation.
11+
- Fix issue with Bugsee and xcprivacy files.
1112

1213
## 0.26.1
1314
- Update flutter to 3.38.5 and update dependencies.
14-
- iOS now uses UIScene life cycle,
15+
- iOS now uses UIScene life cycle.
1516

1617
## 0.26.0
1718
- Update flutter to 3.35.6 and update dependencies.
18-
- Now compliant with [16 KB Google Play compatibility requirement](https://developer.android.com/guide/practices/page-sizes)
19-
- Use Material3 navigation bar
19+
- Now compliant with [16 KB Google Play compatibility requirement](https://developer.android.com/guide/practices/page-sizes).
20+
- Use Material3 navigation bar.
2021

2122
## 0.25.4
2223
- Fix CocoaPods cache and dependency issues in iOS build pipeline.
@@ -60,25 +61,25 @@ Prefix your items with `(Template)` if the change is about the template and not
6061
- Moved Android distribution for Staging from App Center to Firebase App Distribution.
6162

6263
## 0.21.1
63-
- Added conventional commit validation stage `stage-build.yml`
64+
- Added conventional commit validation stage `stage-build.yml`.
6465

6566
## 0.21.0
66-
- Add Bugsee SDK in Flutter template
67-
- Update build stage in `steps-build-android.yml` and `steps-build-ios.yml` providing Bugsee token
67+
- Add Bugsee SDK in Flutter template.
68+
- Update build stage in `steps-build-android.yml` and `steps-build-ios.yml` providing Bugsee token.
6869

6970
## 0.20.4
70-
- Updates to documentation
71+
- Updates to documentation.
7172

7273
## 0.20.3
73-
- (CI/CD) Fixes an authentication issue with pub.dev
74+
- (CI/CD) Fixes an authentication issue with pub.dev.
7475

7576
## 0.20.2
7677
- (Template) Fixes an issue with the CLI in which the build fails during template generation because of a missing required file.
7778

7879
## 0.20.1
7980
- Fix CI/CD artifact name for Android.
8081
- Fix CI/CD to install gcloud CLI Tool.
81-
- Fix CI/CD build number
82+
- Fix CI/CD build number.
8283

8384
## 0.20.0
8485
- Configured MobSF security scan on Android and iOS for Staging and Production builds.

0 commit comments

Comments
 (0)