I'm trying to get all data from .docx .pages files like this: (i need to extract phone number, picture and some more information)
NSString* path = [[NSBundle mainBundle] pathForResource:@"FileName" ofType:@"pages"];
NSString *fileContents = [NSString stringWithContentsOfFile:path encoding:NSISOLatin1StringEncoding error:NULL];
for (NSString *line in [fileContents componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]) {
NSLog(@"%@", line);
}
Can someone help me to solve this isue?