0

I am trying to upload document file on Creative Cloud in my iOS application. It was working fine but now I am getting following uploading error.

error uploading Error Domain=AdobeAssetErrorDomain Code=2 "(null)" UserInfo={AdobeNetworkResponseHeaders={
    connection = "keep-alive";
    "content-encoding" = gzip;
    "content-length" = 90;
    "content-type" = "application/vnd.adobe.error-response+json";
    date = "Sun, 23 Apr 2017 13:33:13 GMT";
    server = APIP;
    vary = "Accept-Encoding";
    "x-request-id" = "DB0C9B95-7D84-45EA-9BFF-F04020C3796E";
}, AdobeNetworkRequestURLStringKey=https://cc-api-storage.adobe.io/files/?order=asc&orderby=name, AdobeNetworkResponseData={"reason":"bad_request","message":"A required parameter is missing or invalid"}, AdobeNetworkHTTPDebugIDKey=DB0C9B95-7D84-45EA-9BFF-F04020C3796E, AdobeNetworkHTTPStatus=400}

Below is my code.

if ([AdobeUXAuthManager sharedManager].isAuthenticated)
        {
            NSLog(@"The user has already been authenticated. User profile: %@", [AdobeUXAuthManager sharedManager].userProfile);

            AdobeAssetFolder *root = [AdobeAssetFolder getRootOrderedByField:AdobeAssetFolderOrderByName
                                                              orderDirection:AdobeAssetFolderOrderDescending];

            [AdobeAssetFile create:_fileName
                          inFolder:root
                      withDataPath:[NSURL fileURLWithPath:filePath]
                          withType:kAdobeMimeTypeRaw
               withCollisionPolicy:AdobeAssetFileCollisionPolicyAppendUniqueNumber
                        onProgress:^(double fractionCompleted) {
                            NSLog(@"Percent complete %f", fractionCompleted);
                        }
                      onCompletion:^(AdobeAssetFile *file) {

                      }
                    onCancellation:NULL
                           onError:^(NSError *error) {
                               NSLog(@"error uploading %@", error);
                           }];
        }
rmaddy
  • 314,917
  • 42
  • 532
  • 579
WasimSafdar
  • 1,044
  • 3
  • 16
  • 39

1 Answers1

0

I solved this problem. "AdobeCreativeSDKAssetModel.framework" was not linked with Embedded binaries. Deleting it and adding again in Embedded binaries solve this problem. You also need that you Adobe account is E-mail verified, otherwise you will get uploading error.

WasimSafdar
  • 1,044
  • 3
  • 16
  • 39