Created
January 5, 2022 10:42
-
-
Save dongmai/1affc92f467d4e612efe96722707367a to your computer and use it in GitHub Desktop.
Android update config with fastlane
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update social info | |
socialInfo = config["socials"] | |
fbId = "" | |
gmapId = "" | |
if socialInfo.kind_of?(Array) | |
socialInfo.each do |item| | |
if item["type"] == "google" | |
gmapId = item["gmap_id"] | |
end | |
if item["type"] == "facebook" | |
fbId = item["id"] | |
end | |
end | |
end | |
configPath = "#{placeHolderPath}/res/values/config_string.xml" | |
unless fbId.empty? | |
updateXmlConfig(filePath, { "facebook_app_id" => fbId, "fb_login_protocol_scheme " => "fb#{fbId}" }) | |
end | |
unless gmapId.empty? | |
updateXmlConfig(filePath, { "google_maps_api_key" => gmapId }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment