Skip to content

Commit

Permalink
Merge pull request #1297 from OneSignal/user_model/enable_push_for_si…
Browse files Browse the repository at this point in the history
…mulators

[User model] enable push for simulators
  • Loading branch information
emawby authored and nan-li committed Oct 30, 2023
2 parents b710e8c + 8f4274f commit db055cb
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ class OSSubscriptionModel: OSModel {
// Set test_type if subscription model is PUSH
if type == .push {
let releaseMode: OSUIApplicationReleaseMode = OneSignalMobileProvision.releaseMode()
#if targetEnvironment(simulator)
if (releaseMode == OSUIApplicationReleaseMode.UIApplicationReleaseUnknown) {
self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseDev.rawValue
}
#endif
// Workaround to unsure how to extract the Int value in 1 step...
if releaseMode == .UIApplicationReleaseDev {
self.testType = OSUIApplicationReleaseMode.UIApplicationReleaseDev.rawValue
Expand Down

0 comments on commit db055cb

Please sign in to comment.