Closed AlexPerathoner closed 9 months ago
Just noticed while debugging with Xcode the following warning is shown:
However directUpload(files:uploadType:store:metadata:uploadSignature:_:_:)
is only called by:
directUpload(files:store:metadata:uploadSignature:_:_:)
, which calls it with uploadType = .backgrounddirectUploadInForeground(files:store:metadata:_:_:)
, which calls it with uploadType = .foreground, but is internal and isn't used by any public methodLooks like it was indeed because of this runtime issue. Setting the body to nil solved it. Similar to https://github.com/google/GoogleUtilities/pull/114 I'll create a PR
Question
I'm trying to upload a local image to Uploadcare using the Swift Api inside of a Finder Extension. Calling
directUpload(files:store:metadata:uploadSignature:_:_:)
brings the following errors:The Image is simply read from disk with
Data(contentsOf: fileURL)
. The Extension target has the App Sandbox + Outgoing Connections + Hardened Runtime Capabilities. Doing simpleURLRequest
is possible and works without errors. Public and Secret keys work, too: the python example in the docs works just fine - the swift doesn't even compile.Running on macOS 14.3; Swift 5.9.2;
Am I missing something? Are the docs for swift completely out-of-date? Am I supposed to add some capability?