LocalizationScheme

public enum LocalizationScheme

Configure your SynchronizationManager instance with a localization scheme to define which data should be saved to your persistent store. The LocalizationScheme.default scheme will save entities representing data only for the default locale of your space, while the LocalizationScheme.all will save data for all locales.

  • Use the .default scheme to save only for the default locale for your space.

    Declaration

    Swift

    case `default`
  • one

    Specify that data should be saved for only one locale using this scheme. For example the scheme, LocalizationScheme.one("es-MX"), will configure this library to only save data for Mexican Spanish. Not that an assertionFailure will be thrown if Mexican Spanish is not a valid locale on your space.

    Declaration

    Swift

    case one(LocaleCode)
  • all

    Require that data for all locales be saved to your persistent store. Remember to specify a predicate that includes pattern matching for the localeCode property of your Persistable model classes when fetching from your local database.

    Declaration

    Swift

    case all