Hi everyone,
1. Create my own file item provider, follow the protocol NSItemProviderReading.
2. override method readableTypeIdentifiersForItemProvider, register UTI of iWorks files which are com.apple.iwork.pages.sffpages, com.apple.iwork.numbers.sffnumbers and com.apple.keynote.key. I got those UTI from [[NSWorkspace sharedWorkspace] typeOfFile:filePath error:nil]
3. override + (instancetype)objectWithItemProviderData:(NSData *)data typeIdentifier:(NSString *)typeIdentifier error:(NSError * _Nullable __autoreleasing*)outError
4. implement canHandleSession of UIDropInteractionDelegate and return [session canLoadObjectsOfClass:[DTFileItemProvider class]]
I do the same thing on office files, and it work very well, I can get file's data in performDrop. But iWorks file are not.
So did I set the wrong UTI or something?