Add “Edit in Excel” or “Edit photo” extension

The only way to communicate with other iOS apps “locally” is using what is called URLSchemes. This is the documentation to use URLScheme with the MSOffice apps. https://msdn.microsoft.com/en-us/library/office/dn911482.aspx Answering the specific question: How to check if file (image, xls, doc or any other) can be opened to edit? You can use the UIApplication method called … Read more

Returning method object from inside block

You can’t. Embrace the fact that what you’re trying to do is asynchronous and add a completion block parameter to your getMyData method which is called when the inner completion handler is called. (And remove the return from the method signature): – (void)getMyDataWithCompletion:(void(^)(NSData *data))completion { MyUIDocument *doc = [[MyUIDocument alloc] initWithFileURL:fileURL]; [doc openWithCompletionHandler:^(BOOL success) { … Read more

tech