microsoftconnect / ms-intune-app-sdk-ios

Intune App SDK for iOS enables data protection and mobile app management features in iOS mobile apps with Microsoft Intune
91 stars 27 forks source link

openURL SwiftUI delegate function is not called for deep links #482

Closed viwod closed 1 day ago

viwod commented 1 month ago

Describe the bug: The openUrl SwiftUI delegate function is not called in SDK version 20.1.0+ in response to deep links

To Reproduce Steps to reproduce the behavior:

  1. Deep link to app
  2. Observe that openUrl on SwiftUI lifecycle is not called
  3. Observe that openUrlContexts on SceneDelegate is called

Expected behavior:

  1. Deep link to app
  2. Observe that openUrl on SwiftUI lifecycle is called

Screenshots and logs: N/A (not captured in Intune console diagnostics logs)

Smartphone (please complete the following information):

Intune App SDK for iOS (please complete the following information):

Additional context: We have an Intune SDK integrated app and a non-Intune version of the app. The openUrl function is currently being called as expected on the non-Intune version of the app, and was called in previous SDK versions on our Intune app. We have only observed this problem on the Intune version of the app on SDK versions 20.1.0+.

pmod2 commented 1 month ago

@viwod The Intune MAM SDK ios version 20.1.0+ is intended for applications compiled with Xcode 16. App developers should NOT integrate this version if compiling with Xcode 15 and should instead integrate the latest 19.x release. Could you confirm your Xcode version.

viwod commented 1 month ago

Thanks for following up @pmod2, we are currently using Xcode 16.

viwod commented 1 month ago

Another bit of strange behavior we observed while testing our deep link flows, the SwiftUI delegate openUrl function is called on cold starts, while the SceneDelegate openUrlContexts function is not. On warm starts however, the SwiftUI delegate openUrl function is not called, while the SceneDelegate openUrlContexts function is.

pmod2 commented 4 weeks ago

Could you provide below information- the openURL sample, the openURL SwiftUI delegate function script sample, the MAM logs Microsoft Intune App SDK for iOS developer guide - Appendix | Microsoft Learn

pmod2 commented 1 day ago

Closing as stale issue. Re-open with above artifacts if required.