Top

iOS File Sharing

Kommentare

5 Kommentare

  • Le-Trong-Nghia HUYNH

    Hello Apurva

    The file sharing is not officially supported yet so that's why you have no documentation for the moment. However, this is actually enabled.

    The error message is saying that you are passing a NSURL * instead of a File * type.

    I guess you are using the following method :

    -(Message *) sendMessage:(NSString *) message fileAttachment:(File *) file to:(Conversation *) conversation completionHandler:(ConversationsManagerServiceSendMessageCompletionHandler) completionHandler attachmentUploadProgressHandler:(ConversationsManagerAttachmentProgressionHandler) progressHandler;

    You can use this code to get a File * from a NSURL * of the file :

            NSData *data = [NSData dataWithContentsOfURL:url];

            File *file = [[ServicesManager sharedInstance].fileSharingService createTemporaryFileWithFileName:[url lastPathComponent] andData:data andURL:url];

    Regards,

    Nghia

     

     

    0
    Aktionen für Kommentare Permalink
  • Apurva DONGRE

    Thank you for the help :)

    0
    Aktionen für Kommentare Permalink
  • Apurva DONGRE

    I am now able to send the files and the files are showing on the android side , but it is not showing on the IOS side . i am using this.. 

    if(self.attachment && self.attachment.thumbnailData){

        self.attachmentPreview.image = [UIImage imageWithData:message.attachment.thumbnailData];

        self.attachmentPreview.hidden = NO;

      }

    any suggestions?

    0
    Aktionen für Kommentare Permalink
  • Le-Trong-Nghia HUYNH

    Hello

    Do you have something in message.attachment.thumbnailData ?

    Is your self.attachmentPreview.image well set after your code?

    Nghia

    0
    Aktionen für Kommentare Permalink
  • Apurva DONGRE

    The issue is resolved.

    Thanks.

    0
    Aktionen für Kommentare Permalink

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

  • Fragen Sie die Gemeinschaft

    Brauchen Sie Hilfe? Stellen Sie Ihre Fragen in der Community, um Antworten von anderen Rainbow-Benutzern zu erhalten.

    Nachricht posten