diff --git a/.changeset/kind-trains-smoke.md b/.changeset/kind-trains-smoke.md new file mode 100644 index 00000000..d056e8e2 --- /dev/null +++ b/.changeset/kind-trains-smoke.md @@ -0,0 +1,5 @@ +--- +"@react-native-documents/picker": patch +--- + +Fix iOS picker cancelled error code to match JS expected value diff --git a/packages/document-picker/ios/swift/PromiseWrapper.swift b/packages/document-picker/ios/swift/PromiseWrapper.swift index 0fcd2764..e780c69a 100644 --- a/packages/document-picker/ios/swift/PromiseWrapper.swift +++ b/packages/document-picker/ios/swift/PromiseWrapper.swift @@ -7,7 +7,7 @@ class PromiseWrapper { private var promiseReject: RNDPPromiseRejectBlock? private var nameOfCallInProgress: String? - private let E_DOCUMENT_PICKER_CANCELED = "E_DOCUMENT_PICKER_CANCELED" + private let E_DOCUMENT_PICKER_CANCELED = "OPERATION_CANCELED" private let ASYNC_OP_IN_PROGRESS = "ASYNC_OP_IN_PROGRESS" func setPromiseRejectingPrevious(_ resolve: @escaping RNDPPromiseResolveBlock,