Skip to content

Exception when [Parse setApplicationId:clientKey:] is called twice #159

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

Closed
wzs opened this issue Sep 2, 2015 · 3 comments
Closed

Exception when [Parse setApplicationId:clientKey:] is called twice #159

wzs opened this issue Sep 2, 2015 · 3 comments

Comments

@wzs
Copy link

wzs commented Sep 2, 2015

Recently I've found in our codebase that +[Parse setApplicationId:clientKey:] was called twice during app initialization (with same params).

It was obviously mistake, but by the way I've found that in that case SDK throws exceptions, ie:
during call to -[PFCommandURLRequestConstructor _URLRequestHeadersForCommand], dataSource became nil (it's a weak reference to ParseManager).

It'd be nice to have an assertion preventing from changing applicationId/clientKey after it's set already or cancel all ongoing operations started from the old instance of ParseManager.

@nlutsenko
Copy link
Contributor

Hey @wzs, thanks for report.
Setting applicationId and clientKey more than once is definitely not supported use case, let me put this as an enhancement and add assertion there.

PFCommandURLRequestConstructor use case is super interesting though - we should do something smarter there.

@nlutsenko
Copy link
Contributor

Implemented in #874

@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
@parse-github-assistant
Copy link

The label type:feature cannot be used in combination with type:improvement.

@parse-github-assistant parse-github-assistant bot removed the type:feature New feature or improvement of existing feature label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants