cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: SwiftyDropbox was compiled with optimization - stepping may behave oddly

SwiftyDropbox was compiled with optimization - stepping may behave oddly

Mark L.45
Collaborator | Level 8

Using Carthage to build and use Swifty DropBox. For the main part it works well, but seem to be running into an issue relating to optimization every now and again as the subject line says.

 

How can I compile without optimization and install with Carthage?

 

Thanks

6 Replies 6

Greg-DB
Dropbox Staff

Can you share the steps you took, and the full output/a screenshot showing the issue so we can make sure we follow exactly what you're seeing? Thanks in advance! 

Mark L.45
Collaborator | Level 8

Hi Greg,

 

In answer to your question, in short, no. I cannot share cause it isn't that clear cut, that said I am only using a four methods...

 

    let client = DropboxClientsManager.authorizedClient!
    _ = client.files.download(path:sourcePath)
    .response { response, error in
    if let response = response { etc etc and

 

    let client = DropboxClientsManager.authorizedClient!
    _ = client.files.getThumbnail(path: sourcePath, format: Files.ThumbnailFormat.png, size: Files.ThumbnailSize.w64h64)
    .response { response, error in
    if let response = response { etc etc

 

    let client = DropboxClientsManager.authorizedClient!
    _ = client.files.listFolder(path:sourcePath).response(queue: DispatchQueue(label: "MyCustomSerialQueue")) { re  sponse, error in
    if let response = response { etc etc 

 

    let client = DropboxClientsManager.authorizedClient!
    _ = client.sharing.createSharedLinkWithSettings(path: sourcePath).response(queue: DispatchQueue(label: "MyCustomSerialQueue")) { response, error in
    if let response = response { etc etc

 

I call list files, I call create shared links, I call thumbs... it works the first time around, but on the second pass if navigate to a different tree I call list files again it crashes. I can send you a link to a youtube video showing the behavior if you email me directly perhaps.

 

I simply want to compile and use Swifty Dropbox frameworks without optimization, installing them thru carthage? I suspect that will fix it. I hope so.

Greg-DB
Dropbox Staff

It looks like there are some potential solutions here, if you haven't already seen these:

 

https://github.com/Carthage/Carthage/issues/1135
https://stackoverflow.com/questions/32772573/project-name-was-compiled-with-optimization-stepping-ma...

 

If those don't help, feel free to open a ticket with the specifics, e.g., that video, here, and we'll take a look:

 

https://www.dropbox.com/developers/contact

Mark L.45
Collaborator | Level 8

Ok,

 

Tried this and so far so good. Works without crashing...

 

carthage update --configuration Debug --verbose --platform iOS

 

Is this good from an apps store deployment point of view, I don't know; well see.

Mark L.45
Collaborator | Level 8

Stop   stop stop

 

Just crashed with this line ..

 

source Optional(["test"]) Optional("test") /test/test.004
precondition failed: " must match pattern "\A(?:(/(.|[\r\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?))\z": file /Users/localuser/Carthage/Checkouts/SwiftyDropbox/Source/SwiftyDropbox/PlatformNeutral/StoneValidators.swift, line 9
downloading supportedImages /test/test.001.png png
2017-01-04 10:56:10.020443 slideQueue[2116:505402] precondition failed: " must match pattern "\A(?:(/(.|[\r\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?))\z": file /Users/localuser/Carthage/Checkouts/SwiftyDropbox/Source/SwiftyDropbox/PlatformNeutral/StoneValidators.swift, line 9

 

So this was in the downloading file Swifty DropBox call! This one ...

 

let client = DropboxClientsManager.authorizedClient!
_ = client.files.download(path:sourcePath)
.response { response, error in
if let response = response { etc etc and

 

Going to open a ticket on this ...

Greg-DB
Dropbox Staff
Thanks! We'll take a look and respond to your ticket soon.
Need more support?