ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.
http://sabintsev.com/
MIT License
4.27k stars 409 forks source link

Siren.shared.wail { results not triggered #288

Closed ergunkocak closed 5 years ago

ergunkocak commented 5 years ago

Hello, As always first of all thanks for the library. Before Migrating to 5.x i did not have this problem. My apps version on app store is 3.5.9 and my local build has the version number 3.5.9. But siren is alerting me that there is a new version 3.5.9 ???

Here is the code :

    let siren = Siren.shared
    siren.apiManager = APIManager(countryCode: "DE")
    siren.rulesManager = RulesManager(majorUpdateRules: .default,
                                      minorUpdateRules: .default,
                                      patchUpdateRules: .default,
                                      revisionUpdateRules: Rules(promptFrequency: .daily, forAlertType: .none))
    siren.wail { results in
        print("blaaaaa")
        switch results {
        case .success(let updateResults):
            lapp.l("Siren: UpdateType \(updateResults.updateType.rawValue)")

        case .failure(let error):
            lapp.w(error.localizedDescription)
        }
    }

I put a debug breakingpoint in print line but it never enters in closure. I created a new version in appStore 3.6.0 but it is not released yet. I mean it is not even sent to app review.

ArtSabintsev commented 5 years ago

Thanks for the message!

That is quite strange!

What is your bundleID?

Sent with GitHawk

ergunkocak commented 5 years ago

@ArtSabintsev emailed

ArtSabintsev commented 5 years ago

Thanks.

I logged out the results of the model in the completion handler and here is what I see:

 Model(appID: 965186246, currentVersionReleaseDate: "2019-05-02T05:55:34Z", minimumOSVersion: "9.3", releaseNotes: Optional("Während Sie nach weiteren Trading-Chancen suchen kümmern wir uns darum, die nextmarkets Erfahrung besser zu machen.\nEgal wo der Markt gerade steht, nextmarkets ist an Ihrer Seite.\n\nFür Feedback wenden Sie sich bitte an service@nextmarkets.com oder benutzen Sie die integrierte Feedback-Funktion in der App."), version: "3.5.9.")

Says 3.5.9 is the newest version, so I've confirmed that what you are seeing is correct.

This is definitely a bug. I will look at it as soon as I can.

ArtSabintsev commented 5 years ago

ok, I found the bug, but need to spend a little but of time thinking about how to fix it.

ArtSabintsev commented 5 years ago

Closing this issue as #289 fixes this issue. Will merge it in and release as v5.1.0 shortly.