Skip to content
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

File upload does not work in "Release mode" only in Debug on OS X. #3

Open
lm2s opened this issue Dec 8, 2015 · 0 comments
Open

File upload does not work in "Release mode" only in Debug on OS X. #3

lm2s opened this issue Dec 8, 2015 · 0 comments

Comments

@lm2s
Copy link

lm2s commented Dec 8, 2015

When running in Release mode the SDK is not capable of upload any file. In Debug mode it works properly but not in Release. (See Edit Scheme > Run or Archive and run)

The method that results in failure:

- (CLDTransfer *)uploadItem:(CLDItem *)item
            shouldOverwrite:(BOOL)overwrite
             cellularAccess:(BOOL)cellularAccess
                   priority:(CLDTransferPriority)priority
                resultBlock:(void (^)(CLDItem *))resultBlock
               failureBlock:(void (^)(NSError *))failureBlock

By inspecting the request I've found that when in Release mode, the call to the API has a Content Length of 0. While in Debug mode, it's Content Length is not 0.

The error output of the SDK:

The operation couldn’t be completed. (pt.sapo.osx.meocloudsdk.ErrorDomain error 115.)

115 -> CLDErrorCodeInvalidParameters, which matches the wrong request content length.

EDIT:
Further investigation of this issue (and thanks to @p4checo), resulted in the attribution of this issue to the usage of NSAssert throughout the codebase. Which when build in Release mode, triggers the stripping of those NSAssert's, taking with them the method called inside some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant