ann-flavor-cocoapods 0.4.9 → 0.4.10
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 +4 -4
- data/CHANGELOG-TECHNICAL.md +22 -0
- data/CHANGELOG.md +4 -0
- data/lib/ann_flavor_cocoapods/podfile_helper.rb +69 -0
- data/lib/ann_flavor_cocoapods/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a745777f60f26aa551412f60cf82816b4d19c2cf80923e2883dbbc52b95de19
|
|
4
|
+
data.tar.gz: f74b7e32f1198f0c7cfdafa508135eda10085f788b9e757eca1c396dd92635d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61011d635ca4f7fec6019e9b0f561ec932a4878a13e48be274242218e96472bc460e3f549fd75b1b186e59495a781e3beda1cb3f6cb5a2b4446ed4047e232f7e
|
|
7
|
+
data.tar.gz: 31b7beebb0fb42800b112d96e91a58ee4175fcfd0b8d595888642cfce94c154332577f7e9dc80af34233a20dbe55a776f25cbf4dfa0f0f06cbf42357ebe58481
|
data/CHANGELOG-TECHNICAL.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.10
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **`PodfileHelper.warn_legacy_inline_firebase_settings` (DEF-083, #83),
|
|
7
|
+
called from `configure_build_settings` for every `<Bt>-<flavor>`
|
|
8
|
+
configuration.** A Runner project that predates the tooling can carry
|
|
9
|
+
hand-written inline `GOOGLE_APP_ID` / `REVERSED_CLIENT_ID`.
|
|
10
|
+
`configure_build_configuration` copies the stock config's settings into each
|
|
11
|
+
new per-flavor configuration, and an inline setting always beats the same
|
|
12
|
+
key from the config's base xcconfig, so the generated `REVERSED_CLIENT_ID`
|
|
13
|
+
was silently ignored and a stale `GOOGLE_APP_ID` (read by Crashlytics'
|
|
14
|
+
upload-symbols phase) survived a Firebase project change. The check prints
|
|
15
|
+
a warning when (a) an inline literal `REVERSED_CLIENT_ID` exists (flagged
|
|
16
|
+
stale when it also differs from the flavor's `GoogleService-Info` plist),
|
|
17
|
+
or (b) an inline literal `GOOGLE_APP_ID` differs from the plist's.
|
|
18
|
+
Warn-only by design: the project's values are never edited, and
|
|
19
|
+
`GOOGLE_APP_ID` is not written by this plugin. Values containing `$(` are
|
|
20
|
+
build-setting references and skipped; an unreadable or missing plist skips
|
|
21
|
+
only the comparison. The plist path comes from
|
|
22
|
+
`IosResolution.firebase_config_path` (same source `configure_firebase`
|
|
23
|
+
uses).
|
|
24
|
+
|
|
3
25
|
## 0.4.9
|
|
4
26
|
|
|
5
27
|
### Fixed
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.10
|
|
4
|
+
|
|
5
|
+
**Added:** `pod install` now warns when an older Xcode project still has hand-written `GOOGLE_APP_ID` or `REVERSED_CLIENT_ID` settings on the Runner target. Those override the values this tool generates, so they go stale when the app's Firebase project changes. The warning names the configuration and says what to delete; your project file is never changed.
|
|
6
|
+
|
|
3
7
|
## 0.4.9
|
|
4
8
|
|
|
5
9
|
**Fixed:** A `version_code` (or any other integer field) written with a leading zero, like `000010`, was silently misread as an octal number — `000010` became `8` instead of `10`. Integers now always parse the way they're written; a leading zero no longer changes the value.
|
|
@@ -147,6 +147,7 @@ module AnnFlavorCocoapods
|
|
|
147
147
|
|
|
148
148
|
print_build_info = spec.debug_config.nil? || spec.debug_config.print_build_and_flavor_info != false
|
|
149
149
|
swift_version = ios.default.sdk&.swift_version
|
|
150
|
+
generated_dir = detect_project_layout(project_root)[:generated_dir]
|
|
150
151
|
|
|
151
152
|
touched_projects = []
|
|
152
153
|
|
|
@@ -196,6 +197,11 @@ module AnnFlavorCocoapods
|
|
|
196
197
|
target, user_project, xcode_config, xcconfig_path,
|
|
197
198
|
icon_name, entitlements_path, info_plist_path
|
|
198
199
|
)
|
|
200
|
+
|
|
201
|
+
warn_legacy_inline_firebase_settings(
|
|
202
|
+
target, xcode_config, xcconfig_path,
|
|
203
|
+
firebase_plist_file(project_root, ios, flavor_key, bt, generated_dir)
|
|
204
|
+
)
|
|
199
205
|
end
|
|
200
206
|
|
|
201
207
|
configure_scheme(target, user_project, flavor_key)
|
|
@@ -600,6 +606,69 @@ module AnnFlavorCocoapods
|
|
|
600
606
|
CODE_SIGN_ENTITLEMENTS
|
|
601
607
|
].freeze
|
|
602
608
|
|
|
609
|
+
# Absolute path of the generated GoogleService-Info plist for one flavor x
|
|
610
|
+
# build type, or nil when that flavor has no Firebase config.
|
|
611
|
+
def self.firebase_plist_file(project_root, ios, flavor_key, build_type, generated_dir)
|
|
612
|
+
rel = AnnFlavorCore::IosResolution.firebase_config_path(
|
|
613
|
+
ios, flavor_key, build_type, generated_dir: generated_dir
|
|
614
|
+
)
|
|
615
|
+
rel && File.join(project_root, rel)
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# Warn-only (DEF-083, #83). A Runner project that predates this tooling can
|
|
619
|
+
# carry hand-written inline GOOGLE_APP_ID / REVERSED_CLIENT_ID settings.
|
|
620
|
+
# configure_build_configuration copies them into every new <Bt>-<flavor>
|
|
621
|
+
# configuration, and an inline setting always beats the same key coming from
|
|
622
|
+
# the configuration's base xcconfig -- so the generated REVERSED_CLIENT_ID
|
|
623
|
+
# is silently ignored and a stale GOOGLE_APP_ID (read by Crashlytics'
|
|
624
|
+
# upload-symbols phase) survives a Firebase project change. Nothing here
|
|
625
|
+
# edits the user's project: the values are theirs, so we only report.
|
|
626
|
+
# Values that are build-setting references (e.g. "$(inherited)") are not
|
|
627
|
+
# literals and are skipped.
|
|
628
|
+
def self.warn_legacy_inline_firebase_settings(target, xcode_config, xcconfig_path, plist_file)
|
|
629
|
+
config = target.build_configuration_list[xcode_config]
|
|
630
|
+
return if config.nil?
|
|
631
|
+
|
|
632
|
+
plist = {}
|
|
633
|
+
if plist_file && File.exist?(plist_file)
|
|
634
|
+
begin
|
|
635
|
+
plist = read_plist(plist_file)
|
|
636
|
+
rescue StandardError
|
|
637
|
+
plist = {}
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
reversed = config.build_settings['REVERSED_CLIENT_ID']
|
|
642
|
+
if inline_literal?(reversed)
|
|
643
|
+
expected = plist['REVERSED_CLIENT_ID']
|
|
644
|
+
detail = if expected && expected != reversed
|
|
645
|
+
" It also differs from the Firebase file (#{expected}), so it is stale."
|
|
646
|
+
else
|
|
647
|
+
''
|
|
648
|
+
end
|
|
649
|
+
puts "ann-flavor-cocoapods WARNING: [#{xcode_config}] the Runner target sets " \
|
|
650
|
+
"REVERSED_CLIENT_ID inline (#{reversed}). An inline build setting overrides " \
|
|
651
|
+
"the value from #{xcconfig_path}, so the generated REVERSED_CLIENT_ID is ignored." \
|
|
652
|
+
"#{detail} Delete the inline REVERSED_CLIENT_ID from the Runner target's " \
|
|
653
|
+
"'#{xcode_config}' configuration (Build Settings, or ios/Runner.xcodeproj/project.pbxproj)."
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
app_id = config.build_settings['GOOGLE_APP_ID']
|
|
657
|
+
expected_app_id = plist['GOOGLE_APP_ID']
|
|
658
|
+
if inline_literal?(app_id) && expected_app_id && app_id != expected_app_id
|
|
659
|
+
puts "ann-flavor-cocoapods WARNING: [#{xcode_config}] the Runner target sets " \
|
|
660
|
+
"GOOGLE_APP_ID inline (#{app_id}), but the Firebase file for this flavor has " \
|
|
661
|
+
"#{expected_app_id}. Crashlytics' upload-symbols phase reads GOOGLE_APP_ID, so " \
|
|
662
|
+
"symbols would go to the wrong Firebase project. Delete the inline GOOGLE_APP_ID " \
|
|
663
|
+
"from the Runner target's '#{xcode_config}' configuration, or set it to the " \
|
|
664
|
+
"value in the Firebase file."
|
|
665
|
+
end
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
def self.inline_literal?(value)
|
|
669
|
+
value.is_a?(String) && !value.empty? && !value.include?('$(')
|
|
670
|
+
end
|
|
671
|
+
|
|
603
672
|
def self.configure_build_configuration(target, user_project, xcode_config, xcconfig_path, icon_name, entitlements_path = nil, info_plist_path = nil)
|
|
604
673
|
config_list = target.build_configuration_list
|
|
605
674
|
config = config_list[xcode_config]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ann-flavor-cocoapods
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ANN Solutions
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cocoapods
|