Created
January 5, 2022 10:41
-
-
Save dongmai/2183e5e2a7f4b34f8eb7febb146abe8d to your computer and use it in GitHub Desktop.
iOS update plist file with fastlane
This file contains hidden or 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 = "" | |
schemes = [] | |
if socialInfo.kind_of?(Array) | |
socialInfo.each do |item| | |
if item["type"] == "google" | |
schemes << { | |
"role" => "Editor", | |
"scheme" => item["id"], | |
} | |
end | |
if item["type"] == "facebook" | |
fbId = item["id"] | |
schemes << { | |
"scheme" => "fb#{fbId}", | |
} | |
end | |
end | |
end | |
if schemes.length > 0 | |
# Update URL Schemes | |
addSchemeUrls(plistPath, schemes) | |
end | |
# Update Facebook ID | |
unless fbId.empty? | |
updatePlist(plistPath, { "FacebookAppID" => fbId }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment