universal-tools / UTNotificationsFeedback

7 stars 0 forks source link

[ios] - How to delay the request native dialog #97

Closed takaaptech closed 5 years ago

takaaptech commented 5 years ago

Hi! In some games, I see the request permission dialog is a delay until they want to trigger. How can I do that using UTNotification? Thank so much!

yuriy-universal-ivanov commented 5 years ago

Hi @takaaptech ,

The dialog is being shown when you call UTNotifications.Manager.Instance.Initialize. So just refrain from calling that method until you're ready for a user to see that dialog.

takaaptech commented 5 years ago

Hi! @yuriy-universal-ivanov Thank so much! In the Xcode export project, should we still enable push notification in capacities tab when build?

yuriy-universal-ivanov commented 5 years ago

Hi @takaaptech ,

Sure, you still keep push notifications capacity enabled. iOS doesn't show any dialog on it's own until you ask it to. By the way, do you have manually enable that setting? UTNotifications should have taken care of enabling that capacity for you. If it didn't for some reason, can you maybe tell me you version of Unity and Xcode and send me a screenshot of your UTNotifications settings in Unity?

Thank you and best regards, Yuriy, Universal Tools team.

takaaptech commented 5 years ago

Hi @yuriy-universal-ivanov I just want to confirm how notification on iOS works. After the build, every config works fine. Saying about the config, I think the way UTNotificationsDependencies works on Android is a very healthy task. Sometimes I see the UTNotificationsDependencies "Resolver" process on android run auto and conflict with https://github.com/googlesamples/unity-jar-resolver in many ways:

Thanks! Your plugin is great and awesome!

yuriy-universal-ivanov commented 5 years ago

Hi @takaaptech,

You can be a bit surprised, but actually UTNotificationsDependencies doesn't do anything except of configuring Play Services Resolver you mentioned. We are using Play Services Resolver. The reason we're not using their XML configuration is that you can configure the desired versions of Android Support Library/Google Play Services libs to use with UTNotifications in the asset's settings. We only invoke the resolver when you click the Apply button in the appropriate UTNotifications Unity settings page.

The rest issues are caused by Play Services Resolver itself. We've already switched to a newer version of it, so hopefully its behavior will improve next time we release an update.

Best regards, Yuriy, Universal Tools team.

takaaptech commented 5 years ago

Thank @yuriy-universal-ivanov !