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

Drag and drop sometimes calls the proper methods and sometimes does not

Open ryanbland opened this issue 3 years ago • 18 comments

Describe the bug: When doing a drag and drop into the app sometimes the correct methods are called and sometimes they are not, specifically we see the call to func tableView(_ tableView: UITableView, dropSessionDidEnter session: UIDropSession) is called but then the other calls to func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UITableViewDropProposal func tableView(_ tableView: UITableView, performDropWith coordinator: UITableViewDropCoordinator) {

These functions are in a base class as an extension and are written is swift.

To Reproduce Steps to reproduce the behavior: try to do a drag and drop with these methods in a base class.

Expected behavior: I expect all the methods to be called but right now only the dropSessionDidEnter and dropSessionDidEnd methods are called

Screenshots and logs:

  • If applicable, add screenshots to help explain your problem.
  • If your app is experiencing an issue during build, do you have app logs for the crash itself?
  • If your app is experiencing an issue post build, do you have app logs for the crash itself?

Smartphone (please complete the following information): iphone or ipad on latest os, with latest intune sdk

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? 15.3

  • What platform is your app based in (native, Xamarin based, Cordova, etc)? Native Swift

  • Do you see a trend with it only being reproduced on a specific device? no any device

Additional context: Add any other context about the problem here.

ryanbland avatar Feb 17 '22 16:02 ryanbland

Hey @ryanbland! Those methods will not be called if drop is blocked. What policy setting do you have for "Receive Data from other Apps" ?

vigavadi avatar Feb 17 '22 17:02 vigavadi

they are now set to allow all apps. However my account keeps getting an error on sign in stating that checking the policies took longer than the timeout (do you know how to fix this)?

Prior to my issue logging into intune from the app, I did go in and move them to the class rather than a parent and all but the func tableView(_ tableView: UITableView, performDropWith coordinator: UITableViewDropCoordinator), however the policy was set to managed apps at that time

ryanbland avatar Feb 17 '22 18:02 ryanbland

@ryanbland Can you try a fresh install? Do you get this sign in issue every time?

vigavadi avatar Feb 17 '22 19:02 vigavadi

I got the issue every time on the device, i deleted the app and tried again, same issue, then removed intune from the device restarted it and installed it again and I still faced the same issue. On a different device i was able to login successfully, I know its not the original issue but do you have any clue as to why it would work on one device but not another?

ryanbland avatar Feb 17 '22 20:02 ryanbland

also after doing a signout from the device that worked im now seeing the same error on that device, so now both my test devices will not work with intune

ryanbland avatar Feb 17 '22 21:02 ryanbland

@ryanbland Maybe the enrollment fails due to some reason. Would you be able to share logs? You can send them to [email protected].

Also, for the device where you could login successfully, were you able to check if the drop methods were being called with "Receiving data for other apps" set to "All apps" or trying to drag from a managed app if receiving is set to "Policy Managed apps"?

vigavadi avatar Feb 17 '22 21:02 vigavadi

@ryanbland The CompanyPortal logs wouldn't contain any Intune SDK related info. Would you be able to implement IntuneMAMDiagnosticConsole.display()? That would bring up a diagnostic console that should allow you to share Intune logs.

vigavadi avatar Feb 17 '22 21:02 vigavadi

ok so i did a login and it gave the failed due to timeout issue then i just let it sit, it gave that same login error again unprompted then gave the successful login prompt and restarted

ryanbland avatar Feb 17 '22 21:02 ryanbland

Ah so enrollment would have been failing due to timeout. Are you able to get policies for both devices now?

vigavadi avatar Feb 17 '22 21:02 vigavadi

so what could cause this timeout then? Ive never had this happen

ryanbland avatar Feb 17 '22 21:02 ryanbland

That if the service takes longer than expected to return. Could be network related.

vigavadi avatar Feb 17 '22 21:02 vigavadi

@vigavadi thank you for the help with this, Im waiting for more info from my customer but the info you have given me makes sense.

ryanbland avatar Feb 18 '22 19:02 ryanbland

So Our customer confirmed to us that they have receive data set to All Apps, is there a reason that this would happen when that setting is set to all apps?

ryanbland avatar Mar 11 '22 16:03 ryanbland

@vigavadi so the customer had the values set that you told me but still said the issue occurs, i was unable to reproduce within my intune environment. Is there any other settings that could cause that to happen?

ryanbland avatar Apr 15 '22 14:04 ryanbland

is there any other reason for this to occur?

ryanbland avatar Jun 08 '22 16:06 ryanbland

@ryanbland I apologize for the late response, I completely missed this. The only time you would run into this is if drop is blocked or if the app hasn't implemented the UITableViewDropDelegate methods. You mentioned that you weren't able to repro this. Is it possible to send logs from the customer? I could confirm if the policies are set correctly.

vigavadi avatar Jun 08 '22 21:06 vigavadi

@vigavadi: where would i send those?

ryanbland avatar Jul 06 '22 15:07 ryanbland

@ryanbland You can send the logs to [email protected].

vigavadi avatar Jul 06 '22 15:07 vigavadi