| 
																	
																	
																		
																	
																	
																 | 
																@@ -27,7 +27,7 @@ | 
															
														
														
													
														
															
																 | 
																 | 
																- (void) setParent: (FileChooser::Native*) ptr;
 | 
																 | 
																 | 
																- (void) setParent: (FileChooser::Native*) ptr;
 | 
															
														
														
													
														
															
																 | 
																 | 
																@end
 | 
																 | 
																 | 
																@end
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																@interface FileChooserDelegateClass : NSObject<UIDocumentPickerDelegate>
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																@interface FileChooserDelegateClass : NSObject<UIDocumentPickerDelegate, UIAdaptivePresentationControllerDelegate>
 | 
															
														
														
													
														
															
																 | 
																 | 
																- (id) initWithOwner: (FileChooser::Native*) owner;
 | 
																 | 
																 | 
																- (id) initWithOwner: (FileChooser::Native*) owner;
 | 
															
														
														
													
														
															
																 | 
																 | 
																@end
 | 
																 | 
																 | 
																@end
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																		
																	
																 | 
																@@ -42,7 +42,6 @@ namespace juce | 
															
														
														
													
														
															
																 | 
																 | 
																//==============================================================================
 | 
																 | 
																 | 
																//==============================================================================
 | 
															
														
														
													
														
															
																 | 
																 | 
																class FileChooser::Native final : public FileChooser::Pimpl,
 | 
																 | 
																 | 
																class FileChooser::Native final : public FileChooser::Pimpl,
 | 
															
														
														
													
														
															
																 | 
																 | 
																                                  public detail::NativeModalWrapperComponent,
 | 
																 | 
																 | 
																                                  public detail::NativeModalWrapperComponent,
 | 
															
														
														
													
														
															
																 | 
																 | 
																                                  public AsyncUpdater,
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																                                  public std::enable_shared_from_this<Native>
 | 
																 | 
																 | 
																                                  public std::enable_shared_from_this<Native>
 | 
															
														
														
													
														
															
																 | 
																 | 
																{
 | 
																 | 
																 | 
																{
 | 
															
														
														
													
														
															
																 | 
																 | 
																public:
 | 
																 | 
																 | 
																public:
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -86,16 +85,9 @@ public: | 
															
														
														
													
														
															
																 | 
																 | 
																       #endif
 | 
																 | 
																 | 
																       #endif
 | 
															
														
														
													
														
															
																 | 
																 | 
																    }
 | 
																 | 
																 | 
																    }
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    void handleAsyncUpdate() override
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    {
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        pickerWasCancelled();
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    }
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
														
															
																 | 
																 | 
																    void didPickDocumentsAtURLs (NSArray<NSURL*>* urls)
 | 
																 | 
																 | 
																    void didPickDocumentsAtURLs (NSArray<NSURL*>* urls)
 | 
															
														
														
													
														
															
																 | 
																 | 
																    {
 | 
																 | 
																 | 
																    {
 | 
															
														
														
													
														
															
																 | 
																 | 
																        cancelPendingUpdate();
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        const auto isWriting =  controller.get().documentPickerMode == UIDocumentPickerModeExportToService
 | 
																 | 
																 | 
																        const auto isWriting =  controller.get().documentPickerMode == UIDocumentPickerModeExportToService
 | 
															
														
														
													
														
															
																 | 
																 | 
																                             || controller.get().documentPickerMode == UIDocumentPickerModeMoveToService;
 | 
																 | 
																 | 
																                             || controller.get().documentPickerMode == UIDocumentPickerModeMoveToService;
 | 
															
														
														
													
														
															
																 | 
																 | 
																        const auto accessOptions = isWriting ? 0 : NSFileCoordinatorReadingWithoutChanges;
 | 
																 | 
																 | 
																        const auto accessOptions = isWriting ? 0 : NSFileCoordinatorReadingWithoutChanges;
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -223,12 +215,14 @@ private: | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																        [controller.get() setDelegate: delegate.get()];
 | 
																 | 
																 | 
																        [controller.get() setDelegate: delegate.get()];
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        if (auto* pc = [controller.get() presentationController])
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																            [pc setDelegate: delegate.get()];
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																        displayNativeWindowModally (fileChooser.parent);
 | 
																 | 
																 | 
																        displayNativeWindowModally (fileChooser.parent);
 | 
															
														
														
													
														
															
																 | 
																 | 
																    }
 | 
																 | 
																 | 
																    }
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    void passResultsToInitiator (Array<URL> urls)
 | 
																 | 
																 | 
																    void passResultsToInitiator (Array<URL> urls)
 | 
															
														
														
													
														
															
																 | 
																 | 
																    {
 | 
																 | 
																 | 
																    {
 | 
															
														
														
													
														
															
																 | 
																 | 
																        cancelPendingUpdate();
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        exitModalState (0);
 | 
																 | 
																 | 
																        exitModalState (0);
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																        // If the caller attempts to show a platform-native dialog box inside the results callback (e.g. in the DialogsDemo)
 | 
																 | 
																 | 
																        // If the caller attempts to show a platform-native dialog box inside the results callback (e.g. in the DialogsDemo)
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -310,7 +304,7 @@ private: | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
														
															
																 | 
																 | 
																    FileChooser& owner;
 | 
																 | 
																 | 
																    FileChooser& owner;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    NSUniquePtr<NSObject<UIDocumentPickerDelegate>> delegate;
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    NSUniquePtr<NSObject<UIDocumentPickerDelegate, UIAdaptivePresentationControllerDelegate>> delegate;
 | 
															
														
														
													
														
															
																 | 
																 | 
																    NSUniquePtr<FileChooserControllerClass> controller;
 | 
																 | 
																 | 
																    NSUniquePtr<FileChooserControllerClass> controller;
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																    //==============================================================================
 | 
																 | 
																 | 
																    //==============================================================================
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -351,14 +345,6 @@ std::shared_ptr<FileChooser::Pimpl> FileChooser::showPlatformDialog (FileChooser | 
															
														
														
													
														
															
																 | 
																 | 
																    ptr = parent->weak_from_this();
 | 
																 | 
																 | 
																    ptr = parent->weak_from_this();
 | 
															
														
														
													
														
															
																 | 
																 | 
																}
 | 
																 | 
																 | 
																}
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																- (void) viewDidDisappear: (BOOL) animated
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																{
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    [super viewDidDisappear: animated];
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    if (auto nativeParent = ptr.lock())
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        nativeParent->triggerAsyncUpdate();
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																}
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																@end
 | 
																 | 
																 | 
																@end
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																@implementation FileChooserDelegateClass
 | 
																 | 
																 | 
																@implementation FileChooserDelegateClass
 | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -393,4 +379,10 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE | 
															
														
														
													
														
															
																 | 
																 | 
																        owner->pickerWasCancelled();
 | 
																 | 
																 | 
																        owner->pickerWasCancelled();
 | 
															
														
														
													
														
															
																 | 
																 | 
																}
 | 
																 | 
																 | 
																}
 | 
															
														
														
													
														
															
																 | 
																 | 
																
 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																- (void) presentationControllerDidDismiss: (UIPresentationController *) presentationController
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																{
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    if (owner != nullptr)
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        owner->pickerWasCancelled();
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																}
 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
 | 
															
														
														
													
														
															
																 | 
																 | 
																@end
 | 
																 | 
																 | 
																@end
 |