New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update_plist does partial updating when quotes in not used #19912
Comments
It seems like you have not included the output of |
🚫 fastlane environment 🚫Stack
System Locale
fastlane files:`./Fastfile`# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Fastlane Github Action Lane"
lane :github do
get_certificates(
development: true,
username: ENV['DEV_ACCOUNT'],
team_name: ENV['TEAM_ID']
)
sigh(
username: ENV['DEV_ACCOUNT'],
team_name: ENV['TEAM_ID'],
development: true,
app_identifier: ENV['APP_IDENTIFIER']
)
update_code_signing_settings(
use_automatic_signing: false,
path: "./Runner.xcodeproj"
)
update_plist(
plist_path: "./Runner/Info.plist",
block: proc do |plist|
plist["CFBundleURLSchemes"] = ["com.googleusercontent.apps.849342230913-r6fdhf927o1qan0mh2u7c1qh5ovr7ji4"]
end
)
build_app(
scheme: "Runner",
archive_path: "./build/Runner.xcarchive",
export_method: ENV["EXPORT_METHOD"],
output_directory: "./build/Runner"
)
firebase_app_distribution(
app: ENV["FIREBASE_APP_ID"],
groups: ENV["FIREBASE_GROUPS"],
release_notes: ENV["GITHUB_CHANGELOG"],
ipa_path: "./build/Runner/Runner.ipa",
googleservice_info_plist_path:"./build/Runner/GoogleService-Info.plist"
)
end
# desc "Set Development Plist":
# lane :plist_dev do
# copy_files(source: "test.rb", destination: "lib")
# end
desc "Fastlane Deploy To Foodsnob V0"
lane :development do
update_app_identifier(
app_identifier: 'com.foodsnob.flutter',
plist_path: './Runner/Info.plist'
)
update_plist(
plist_path: "./Runner/Info.plist",
block: proc do |plist|
urlScheme = plist["CFBundleURLTypes"].find{|scheme| scheme["CFBundleURLName"] == "Firebase"}
urlScheme["CFBundleURLSchemes"] = ["com.googleusercontent.apps.849342230913-r6fdhf927o1qan0mh2u7c1qh5ovr7ji4"]
end
)
update_plist( # Updates the CLIENT_ID and GOOGLE_APP_ID string entries in the plist-file
plist_path: "./Runner/GoogleService-Info.plist",
block: proc do |plist|
plist["API_KEY"] = "AIzaSyCTEPwQiHr85btgWWO-2SP8VWFQQxgHvQ8"
plist["BUNDLE_ID"] = "com.foodsnob.flutter"
plist["CLIENT_ID"] = "849342230913-r6fdhf927o1qan0mh2u7c1qh5ovr7ji4.apps.googleusercontent.com"
plist["GCM_SENDER_ID"] = "849342230913"
plist["GOOGLE_APP_ID"] = "1:849342230913:ios:1d14685cb0b251c312f880"
plist["PROJECT_ID"] = "silver-approach-321905"
plist["REVERSED_CLIENT_ID"] = "com.googleusercontent.apps.849342230913-r6fdhf927o1qan0mh2u7c1qh5ovr7ji4"
plist["STORAGE_BUCKET"] = "silver-approach-321905.appspot.com"
end
)
changelog = prompt(
text: "Release Notes: ",
multi_line_end_keyword: "END"
)
build_app(
scheme: "Runner",
archive_path: "./build/Runner.xcarchive",
xcargs: "-allowProvisioningUpdates",
export_method: "development",
output_directory: "./build/Runner"
)
firebase_app_distribution(
app: "1:849342230913:ios:1d14685cb0b251c312f880",
groups: "internal-testing",
release_notes: changelog,
ipa_path: "./build/Runner/Runner.ipa",
googleservice_info_plist_path:"./build/Runner/GoogleService-Info.plist"
)
end
desc "Fastlane Deploy To Foodsnob Beta"
lane :beta do
update_app_identifier(
app_identifier: 'com.foodsnob.beta',
plist_path: './Runner/Info.plist'
)
update_plist(
plist_path: "./Runner/GoogleService-Info.plist",
block: proc do |plist|
plist["API_KEY"] = "AIzaSyBZJG3gPrIcX07ckGt2tJOwKXQoaGBrtCs"
plist["CLIENT_ID"] = "761530102517-c31u3d9ie79dlk9cgoivn98sgf57hcqo.apps.googleusercontent.com"
plist["REVERSED_CLIENT_ID"] = "com.googleusercontent.apps.761530102517-c31u3d9ie79dlk9cgoivn98sgf57hcqo"
plist["GCM_SENDER_ID"] = "761530102517"
plist["BUNDLE_ID"] = "com.foodsnob.beta"
plist["PROJECT_ID"] = "foodsnob-beta"
plist["STORAGE_BUCKET"] = "foodsnob-beta.appspot.com"
plist["GOOGLE_APP_ID"] = "1:761530102517:ios:312dc715119f7a7b2b8bbc"
end
)
update_plist(
plist_path: "./Runner/Info.plist",
block: proc do |plist|
urlScheme = plist["CFBundleURLTypes"].find{|scheme| scheme["CFBundleURLName"] == "Firebase"}
urlScheme["CFBundleURLSchemes"] = ["com.googleusercontent.apps.761530102517-c31u3d9ie79dlk9cgoivn98sgf57hcqo"]
end
)
changelog = prompt(
text: "Release Notes: ",
multi_line_end_keyword: "END"
)
build_app(
scheme: "Runner",
archive_path: "./build/Runner.xcarchive",
xcargs: "-allowProvisioningUpdates",
export_method: "development",
output_directory: "./build/Runner"
)
firebase_app_distribution(
app: "1:761530102517:ios:312dc715119f7a7b2b8bbc",
groups: "beta-testers",
release_notes: changelog,
ipa_path: "./build/Runner/Runner.ipa",
googleservice_info_plist_path:"./build/Runner/GoogleService-Info.plist"
)
end
end `./Appfile`# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address
for_platform :ios do
for_lane :github do
app_identifier(ENV["APP_IDENTIFIER"])
team_id(ENV["TEAM_ID"])
end
for_lane :development do
app_identifier("com.foodsnob.flutter")
team_id("M9XNFNPUM2")
end
for_lane :beta do
app_identifier("com.foodsnob.beta")
team_id("M9XNFNPUM2")
end
end
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile fastlane gems
Loaded fastlane plugins:
Loaded gems
generated on: 2022-02-04 |
We're not having any issues here with other values, so it might be related to The following works without any issues:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The documentation of update_plist show a syntax as follows for representing keys:
plist[:CLIENT_ID]
However, we had problems with this and found out that changing the above syntax to
plist["CLIENT_ID"]
makes it work. If you can confirm this, please update the documents.The text was updated successfully, but these errors were encountered: