Posts

Post not yet marked as solved
2 Replies
449 Views
I am attempting to create a public speaking app with a timer and have a viewer that displays PDFs and other types of documents like *.pages or *.docx. However, I am only able to select and open PDF documents. I have an entry for PDF in my plist, but can't find what the correct values are for iWorks Pages documents, etc. Is there a place I can find these? func application(_ app: UIApplication, open inputURL: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {         // Ensure the URL is a file URL         guard inputURL.isFileURL else { return false }         // Reveal / import the document at the URL         guard let documentBrowserViewController = window?.rootViewController as? DocumentBrowserViewController else { return false }         documentBrowserViewController.revealDocument(at: inputURL, importIfNeeded: true) { (revealedDocumentURL, error) in             if let error = error {                 // Handle the error appropriately                 print("Failed to reveal the document at URL \(inputURL) with error: '\(error)'")                 return             }             // Present the Document View Controller for the revealed URL             documentBrowserViewController.presentDocument(at: revealedDocumentURL!)         }         return true     } I am pretty sure I need to tweak this - but not sure how: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array/> <key>CFBundleTypeName</key> <string>PDFs</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>com.adobe.pdf</string> </array> </dict> </array>
Posted Last updated
.
Post not yet marked as solved
3 Replies
847 Views
Hello, I have a simple app that uses a tab layout. I have made no changes to the app. It still targets iOS 13. For the first time I imported into the xCode Beta 5 now that the iOS is a little more stable on this beta. When I click on the third tab in the simulator, the app hangs, When I debug it, I end up in an infinite loop in the viewDidLayoutSubviews method. (void)viewDidLayoutSubviews; {     [super viewDidLayoutSubviews]; self.view.bounds.size.width);     if(nil == self.colorPicker){         CRColorPicker *picker = [[CRColorPicker alloc] initWithFrame:CGRectMake(self.view.bounds.size.width/2 - 160, self.view.bounds.size.height - 65, self.view.bounds.size.width - 10, 50)];         [self.view addSubview:picker];         self.colorPicker = picker;         [self.colorPicker layoutSubviews];         picker.delegate = self; }     [self.view addSubview:self.colorPicker];     [self.view bringSubviewToFront:self.colorPicker];     self.colorPicker.currentColor = [UIColor orangeColor]; } I am unsure what is going on, or how to fix it. Is this a bug, or has something changed in the processing order? Thanks! EDIT - Even if I comment out the entire controller, this seems to get stuck in a loop opening the third tab. I am unable to access it.
Posted Last updated
.
Post not yet marked as solved
0 Replies
294 Views
I really don’t like that iOS decides which contacts appear right at the top of the new share sheet. Is there a way to turn that off or configure who you want? If not then it’s too easy to select the wrong person as they shift around.
Posted Last updated
.