Fix function name for iOS
This commit is contained in:
parent
da7e903d3b
commit
25e1611a0b
@ -3,7 +3,7 @@ import { NativeModules } from "react-native";
|
||||
const { DirectoryPicker } = NativeModules;
|
||||
|
||||
const selectDirectory = () => {
|
||||
return DirectoryPicker.selectDirectory();
|
||||
return DirectoryPicker.pickFolder();
|
||||
};
|
||||
|
||||
export { selectDirectory };
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
//
|
||||
// DirectoryPicker.m
|
||||
// GitShark
|
||||
//
|
||||
// Created by Corbin Crutchley on 6/27/20.
|
||||
// Copyright © 2020 OceanBit. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "React/RCTBridgeModule.h"
|
||||
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
//
|
||||
// DirectoryPicker.swift
|
||||
// GitShark
|
||||
//
|
||||
// Created by Corbin Crutchley on 6/27/20.
|
||||
// Copyright © 2020 OceanBit. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import MobileCoreServices
|
||||
|
||||
@ -34,7 +26,7 @@ class DirectoryPicker: NSObject, UIDocumentPickerDelegate {
|
||||
self.topMostViewController()?.present(documentPicker, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc
|
||||
fileprivate func topMostViewController() -> UIViewController? {
|
||||
var ret: UIViewController? = UIApplication.shared.keyWindow?.rootViewController
|
||||
@ -47,7 +39,7 @@ class DirectoryPicker: NSObject, UIDocumentPickerDelegate {
|
||||
} while(true)
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
@objc
|
||||
static func requiresMainQueueSetup() -> Bool {
|
||||
return true
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
"name": "react-native-directory-picker",
|
||||
"version": "0.0.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
@ -26,8 +27,5 @@
|
||||
"peerDependencies": {
|
||||
"react-native": ">=0.57.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-native": "^0.62.2"
|
||||
},
|
||||
"homepage": "https://github.com/crutchcorn/react-native-immersive-bars#readme"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user