Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing the container environment at runtime #1

Closed
2 tasks done
insidegui opened this issue Dec 23, 2021 · 2 comments
Closed
2 tasks done

Allow changing the container environment at runtime #1

insidegui opened this issue Dec 23, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@insidegui
Copy link

insidegui commented Dec 23, 2021

It is sometimes useful to be able to use the production environment in a debug build to test something. Currently, the environment is set to .development automatically for debug builds, and to .production for release builds, which I think is a great default, but it would be neat if the user of the library could override that manually if they want to.

If the idea is to replicate the CloudKit framework more closely, then this change could be provided at compile time with a flag different from DEBUG, which would take the place of the entitlement in the original framework.

Updated by Eric:

  • Dynamic environment selection via initializer
  • Dynamic environment selection via configuration
@insidegui insidegui added the enhancement New feature or request label Dec 23, 2021
edorphy added a commit that referenced this issue Dec 23, 2021
…mically

- Type cleanup and organization of Container and Database
@edorphy
Copy link
Owner

edorphy commented Dec 23, 2021

I added environment as an initializer parameter for now. Eventually I'll add another constructor that takes in a configuration that can grab from the plist.

@edorphy edorphy self-assigned this Jan 11, 2022
@edorphy
Copy link
Owner

edorphy commented Jan 11, 2022

Added to CKWSContainer.Configuration in 1c3d317

Closing out.

@edorphy edorphy closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants