-
|
I'm having trouble with reading config from the Android side. The iOS path works via Relevant snippet: As you can see I have tried two approaches using Bundle.main.packageInfo and the more verbose method. Manifest meta-data example (the values coming from Skip.env): Can you advise the correct Skip-compatible way to read Android manifest meta-data at runtime? Should we be using a different API than Bundle.main.packageInfo.metaData, or is there specific wiring/config needed in Skip to expose these values? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The The more verbose technique for getting the metadata should work, however we don't do any automatic transfer of arbitrary values from In general, if you want to share configuration metadata between iOS and Android, we recommend simply doing it yourself with a shared |
Beta Was this translation helpful? Give feedback.
The
infoDictionaryapproach only works with a small set of hardwired keys. See Bundle.swift for how we do it.The more verbose technique for getting the metadata should work, however we don't do any automatic transfer of arbitrary values from
Skip.envinto theAndroidManifest.xmlplaceholders. This would be a nice feature for the future, but for right now you would need to manually duplicate the values between the manifest and theInfo.plistfiles.In general, if you want to share configuration metadata between iOS and Android, we recommend simply doing it yourself with a shared
Sources/MyModule/Resources/config.jsonfile and parsing that at runtime withJSONDecoderon the resourceBundle…