rwbutler / Updates

📲 Automatically detects app updates and seamlessly prompts users to upgrade.
https://medium.com/swlh/updating-users-to-the-latest-app-release-on-ios-ed96e4c76705
MIT License
289 stars 37 forks source link

Result is always none #10

Closed mobilesuperdeveloper closed 3 years ago

mobilesuperdeveloper commented 4 years ago

Describe the bug I am trying to test this SDK for my app and I tried to run the example code with my bundle ID But the result is always none in this block Updates.checkForUpdates { result in UpdatesUI.promptToUpdate(result, presentingViewController: self) self.activityIndicator.stopAnimating() } How should I test this in debug mode of my xcode?

To Reproduce Steps to reproduce the behavior:

  1. Open the example
  2. Replace the bundle id with my app and set Version to previous one(Live is 2.8 so I set it 2.7)
  3. Run the example
  4. always result is none

Expected behavior I want to see the Update Prompt in debug mode

rwbutler commented 4 years ago

Thanks for letting me know about this - the other thing worth checking is that the App Store region is being set correctly (see the countryCode field). If your app is not available in the region that's being queried for then this could happen. Are you able to share your bundle identifier / country with me so I can investigate? If you're not happy to share here feel free to e-mail github@rwbutler.com.

wesoo commented 4 years ago

I have the same problem, have u find a solution?

rwbutler commented 4 years ago

Hi @wesoo have you tried the above? If want me to take a look at your bundle id as well - feel free to e-mail it over but please ensure that you can include the App Store territory too? Thanks

wesoo commented 4 years ago

Hi @wesoo have you tried the above? If want me to take a look at your bundle id as well - feel free to e-mail it over but please ensure that you can include the App Store territory too? Thanks

Hi, I have solved in this way:

    Updates.updatingMode = .automatically
    Updates.notifying = .always
    Updates.appStoreId = "numeric_id"
    Updates.comparingVersions = .minor
    Updates.minimumOSVersion = "12.0.0"
    Updates.bundleIdentifier = "my.bundle.store"
    Updates.countryCode = "it"

    Updates.checkForUpdates { result in
        UpdatesUI.promptToUpdate(result, presentingViewController: self)
        print(result)

    }
rwbutler commented 4 years ago

@mobilesuperdeveloper Thanks for sending your bundle identifier over to me - I'll investigate this evening

nas398 commented 3 years ago

it does not work fro me.. maybe because my app is on testFlight and not on the app store? what is Udates.updating = .manually for?

Anushahrithi commented 3 years ago

I am also facing the same problem. can you please help on this.

rwbutler commented 3 years ago

Apologies for the delay on this @wesoo @nas398 @Anushahrithi @mobilesuperdeveloper please could you try using v1.2.3 - hopefully this should resolve the issue for you. If it still doesn't work for you let me know.