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

How to setup App update using RestfulVersionarteProvider #8

Open
Tarhex opened this issue Jan 13, 2025 · 1 comment
Open

How to setup App update using RestfulVersionarteProvider #8

Tarhex opened this issue Jan 13, 2025 · 1 comment

Comments

@Tarhex
Copy link

Tarhex commented Jan 13, 2025

I am trying to setup the system where the app can make a call to an API and check for details. I have the following code as below:

// Header
Map<String, String> requestHeaders = {
  'Content-type': 'application/json',
  'Accept': 'application/json',
};

final result = await Versionarte.check(
  versionarteProvider: RestfulVersionarteProvider(
    url: Api.apiAddress() + '/getVersioning',
    headers: requestHeaders,
  ),
);


if (result.status == VersionarteResult.forcedUpdate) {
  final Map<TargetPlatform, String?> downloadUrls =
      result.storeVersioning!.downloadUrls;

  await Versionarte.launchDownloadUrl(downloadUrls);
}

forcedUpdate is undefined in result.status == VersionarteResult.forcedUpdate. What else am I missing?

@kamranbekirovyz
Copy link
Owner

Hi. What do you mean by forcedUpdate is not defined? Are you using the latest version of the package?

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

2 participants