Extend plist support with raw text or variables
reslear opened this issue · 3 comments
hi @mlynch thx for this #52 ❤️
so i'm suggest add support use plist inlined source from variables:
for example we has:
GOOGLE_SERVICE_PLIST_RAW="<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CLIENT_ID</key> <string>3853.apps.googleusercontent.com</string> <key>REVERSED_CLIENT_ID</key> <string>com.googleusercontent.apps.38275659253</string> <key>API_KEY</key> <string>AIzaSyDAxktyU</string> <key>GCM_SENDER_ID</key> <string>3592535</string> <key>PLIST_VERSION</key> <string>1</string> <key>BUNDLE_ID</key> <string>com.app.app</string> <key>PROJECT_ID</key> <string>nomad-dev-01</string> <key>STORAGE_BUCKET</key> <string>dev.appspot.com</string> <key>IS_ADS_ENABLED</key> <false/> <key>IS_ANALYTICS_ENABLED</key> <false/> <key>IS_APPINVITE_ENABLED</key> <true/> <key>IS_GCM_ENABLED</key> <true/> <key>IS_SIGNIN_ENABLED</key> <true/> <key>GOOGLE_APP_ID</key> <string>1:\4efc2d2</string> </dict> </plist>"
vars:
GOOGLE_SERVICE_PLIST_RAW:
plist:
- replace: true
file: GoogleService-Info.plist
raw: $GOOGLE_SERVICE_PLIST_RAW
add switch/case raw
and write variable value in:
trapeze/packages/configure/src/operations/ios/plist.ts
Lines 8 to 10 in c1c7c81
Is there a reason you need to fill the GoogleService-Info.plist from a variable instead of using the copy
operation to add the file?
We had the same issue with that file and I described my workarounds at the time in #94, but now that the copy
operation is available, we just use the variables to inject paths to different GoogleService-Info.plist files for different environments and just copy the correct file.
- we exclude additional writing of scripts sh
- exclude file hits for different environments [production, staging, development]
- the file is not stored in git
- all secret data is further stored in aws kms
Ended up landing some support for this and will be in the next release after the holidays. Cheers