ms-intune-app-sdk-ios icon indicating copy to clipboard operation
ms-intune-app-sdk-ios copied to clipboard

openURL SwiftUI delegate function is not called for deep links

Open viwod opened this issue 1 year ago • 3 comments

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):

  • Device: [e.g. iPhone6] iPhone 16
  • OS: [e.g. iOS8.1] iOS 18

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

  • What version of the Intune SDK are you using? Are you using the latest version? We are using 20.1.0 (observed on 20.1.1 and 20.1.2 as well while testing)
  • What platform is your app based in (native, Xamarin based, Cordova, etc)? Native
  • For errors during build, does the app build without Intune SDK integration? N/A
  • For errors post build, does the app launch without being Intune SDK integrated? N/A
  • Who is the customer? N/A
  • Do you see a trend with it only being reproduced on a specific device? No, reproducible on any iOS device on both iOS 17/18 on SDK versions 20.1.0+

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+.

viwod avatar Oct 24 '24 16:10 viwod

@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.

pmod2 avatar Oct 24 '24 21:10 pmod2

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

viwod avatar Oct 24 '24 22:10 viwod

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.

viwod avatar Oct 24 '24 23:10 viwod

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 avatar Oct 29 '24 16:10 pmod2

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

pmod2 avatar Nov 26 '24 01:11 pmod2