Skip to content

Parse initialize again #978

Closed
Closed
@mtrezza

Description

@mtrezza

Issue

As of Parse SDK 1.21.0 it is not possible to initialize the Parse SDK again.
Ergo it is not possible to change the server URL.

Changing the server URL can be necessary in an architecture that provides for server app and cname failover.

Suggested solution

I see two scenarios:
a) Connect to a different server instance with same DB.
b) Connect to a different server instance with different DB.

Because scenario b) is possible, it is not enough to only change the URL but also necessary to clear the local cache storage. So it should be possible to deinit the SDK.

There is already a Parse.destroy() method that is not exposed.
There is a test case that shows that it can be used to deinit the Parse SDK.

// Simulate reboot
Parse.destroy();
Parse.initialize(configuration, plugins);

I suggest to expose the method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions