revealdirectoryinfiles.mm 613 B

12345678910111213141516171819202122
  1. /*
  2. * revealdirectoryinfiles.mm, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "revealdirectoryinfiles.h"
  11. #import <UIKit/UIKit.h>
  12. namespace iOS_utils
  13. {
  14. void revealDirectoryInFiles(QUrl dirUrl)
  15. {
  16. auto urlComponents = [NSURLComponents componentsWithURL:dirUrl.toNSURL() resolvingAgainstBaseURL:NO];
  17. urlComponents.scheme = @"shareddocuments";
  18. [UIApplication.sharedApplication openURL:urlComponents.URL options:@{} completionHandler:nil];
  19. }
  20. }