1

I'm Using two native iOS Apps to implement Good Dynamic Framework app kinetics, for now I'm successfully able to send a consumer request, received it at producer end and send a reply form producer , received at consumer end. using

sendTo (GDServiceClient) >>>>>>>>>>>>>>> GDServiceDidReceiveFrom
GDServiceClientDidReceiveFrom <<<<<<<<<<< replyTo (GDService).

problem arise when I try to send a pdf file from producer to consumer and read it at the consumer end.

I use the "GDServiceClient sendTo" method to send the file as its attachment. seems like file received by the consumer end successfully. I can see the good

console Xcode log

GTICCConnection: Number of attachments: 1
GTICCConnection: Finished reading data from all attachments 1/1. Last file size: 273459

I received the file path from attachment as "Inbox/BundleID/....../myfile.pdf" But the Problem is GDFileManger contentsAtPath:fileInboxPath become nil and cannot read the file.

Questions

1.Can any one help me to resolve this issue. Is there a special way to read the file from GD Inbox?

  1. Why GDFileManager always need a valid NSFilePath when create a new file using createFileAtPath: ? it says it encrypt the file and file won't be at the physical path.

1 Answers1

0

I found it. I will reply with a detailed answer in few days. until that,

Before read the file content I use check for file existence like this.

if ([[GDFileManager defaultManager] fileExistsAtPath:fileInboxPath]){
        NSData   *fileData = [[GDFileManager defaultManager] contentsAtPath:fileInboxPath];
        NSLog(@"Filedata: %@",fileData);
        NSString *content  = [[NSString alloc] initWithData:fileData encoding:NSUTF8StringEncoding];
    }

but This if condition fails. After I commented out the line

[[GDFileManager defaultManager] fileExistsAtPath:fileInboxPath]

it starts working.