customerio / customerio-expo-plugin

MIT License
11 stars 9 forks source link

Unclear expected values for `region` #31

Closed euc-callum closed 1 year ago

euc-callum commented 1 year ago

I've had a little difficulty in utilising this plugin due to being unsure what values are accepted for ios.pushNotification.env.region in the plugin configuration.

The documentation does not provide an example, and the types supplied by customerio-reactnative imply that the values should be capitalised:

/**
 * Use this enum to specify the region your customer.io workspace is present in.
 * US - for data center in United States
 * EU - for data center in European Union
 */
declare enum Region {
    US = "US",
    EU = "EU"
}

However utilising 'US' would result in an error:

static var customerIORegion: Region = // "us" or "eu"
                                                                ^ expected initial value after '='

After taking a look through the source code I discovered it instead appear to do a lowercase comparison here.

If this is the case, would it be possible to either add this information to the documentation or update the string comparison to not depend on the value being lowercase? I think it'd be likely to make the setup process more seamless for others.

xtreem88 commented 1 year ago

@euc-callum Thank you for reaching out and for the good observation. I apologize for the confusion here; We are working on a release to fix this issue, and we will clarify our docs about this and other things.

xtreem88 commented 1 year ago

A release has been pushed that fixes this issue