I have some settings/properties and fit contributions that I have used in a workout app, but now I would like to use some of those in a data field as well. I'm hoping to keep all the shared string resources (and code) in a barrel that each project will reference.
I'm able to successfully load my barrel string resources from my app code like this:
var emailStr = WatchUi.loadResource(MyBarrel.Rez.Strings.lbl_user_email);
but I'm not having the same luck with my xml.
I've tried this:
<setting propertyKey="@Properties.user_email_prop" title="@MyBarrel.Strings.lbl_user_email"> <settingConfig type="email" /> </setting>
and this:
<setting propertyKey="@Properties.user_email_prop" title="@MyBarrel.Rez.Strings.lbl_user_email"> <settingConfig type="email" /> </setting>
I'm not even sure what else to try.
As a workaround, I'm defining my shared string resources in three places: the app, the data field, and the barrel (this is necessary because my barrel also references the strings). For me this isn't a big deal right now (I only have a half a dozen shared strings), but I can see this easily becoming a bigger deal for me in the future.