-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When executing Amplify.Storage.uploadFile() on an iOS share extension, the error Error Domain=NSURLErrorDomain Code=-995 "(null)" occurs. #3340
Comments
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
Hello @Aoi-Takahashi , App Extensions are currently not supported with Amplify. The error you're seeing is this one: We are marking this as a feature request and update this thread we have an update. |
@thisisabhash Oh...I see. Actually, I had a inkling of this result (that Amplify does not support File Up/Down on the Share extension)....
|
Related: #2508 |
Hello @Aoi-Takahashi You may want to look at this thread here -
This will give you access to the |
@thisisabhash @harsh62 I am currently working on a solution to this problem based on your response, but I can't think of a specific technique based on the URL you provided, I would like to know if there are any other specific tips or approaches to solving this problem: .... |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
Hi!,Firstly, I would like to express my gratitude for this wonderful framework and all the advice from everyone.
Currently, we are developing a mobile app for both iOS and Android using React Native. To share PDFs with our app in development from external sources, we are considering using the iOS Share Extension to directly upload shared PDFs to our amplify S3 setup for mobile app use. However, when we execute
Amplify.Storage.uploadFile()
inside the ShareViewController UI'sdidSelectPost()
provided by the Share Extension, the errorError Domain=NSURLErrorDomain Code=-995 "(null)"
occurs. Below is the minimum code snippet that I can provide.Steps To Reproduce
Expected behavior
The PDF selected in ShareExtension is successfully uploaded to S3.
Amplify Framework Version
2.21.3
Amplify Categories
Storage
Dependency manager
Swift PM
Swift version
5.0
CLI version
No Responce
Xcode version
Version 15.0
Relevant log output
Is this a regression?
Yes
Regression additional context
No Responce
Platforms
iOS
OS Version
Main App iOS12.4 / ShareExtention iOS17.0
Device
iPhone15 Pro
Specific to simulators
No Responce
Additional context
I have conducted my own investigation regarding this issue and confirmed that the following operations work as expected:
Amplify.Auth.SignIn()
is executed withindidSelectPost()
of the ShareViewController UI, and authentication passes.Amplify.Storage.List()
is executed withindidSelectPost()
of the ShareViewController UI, and the expected information is retrieved with access levels ofpublic/private
.Furthermore, while investigating the origin of the error using breakpoints in Xcode, I observed that the error appears to be thrown at the following location:
Amplify/Core/Support/AmplifyTask+OperationTaskAdapters.swift
The text was updated successfully, but these errors were encountered: