larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
531 stars 262 forks source link

itunes result debug #315

Closed humanolaranja closed 11 months ago

humanolaranja commented 12 months ago

The problem: When using app flavors, you should have different app flavors with different app ids, so, maybe com.example.dev will be not available at the store, but com.example will. The problem is, when running com.example.dev, your log is flooded with this error, that is a valid error because the app id is not valid, but should not be displayed. I tried just init the upgrader if kReleaseMode, but this don't solve the issue, since the call is executed by UpgraderAlert build.

image

This PR will hide this logs the same way as in play_store_search_api and itunes_search_api:class ITunesSearchAPI

codecov[bot] commented 12 months ago

Codecov Report

Patch coverage has no change and project coverage change: -0.10% :warning:

Comparison is base (db563d2) 92.38% compared to head (21ec352) 92.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #315 +/- ## ========================================== - Coverage 92.38% 92.28% -0.10% ========================================== Files 11 11 Lines 1037 1037 ========================================== - Hits 958 957 -1 - Misses 79 80 +1 ``` | [Files Changed](https://app.codecov.io/gh/larryaasen/upgrader/pull/315?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Larry+Aasen) | Coverage Δ | | |---|---|---| | [lib/src/itunes\_search\_api.dart](https://app.codecov.io/gh/larryaasen/upgrader/pull/315?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Larry+Aasen#diff-bGliL3NyYy9pdHVuZXNfc2VhcmNoX2FwaS5kYXJ0) | `78.87% <0.00%> (-1.41%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

larryaasen commented 11 months ago

@humanolaranja Thanks for this PR. I appreciate the issue you are trying to solve, but I don't like the approach of adding a new static variable. In fact, those methods in ITunesResults should not be static anyway. I've made a change to address this and will push it into the next release. Thanks.