Schoolwork + Document based app

In order to be able to integrate our app with Schoolwork, we implemented Open in place logic.
Is there any way to collect data that will tell us which document was opened from Schoolwork?
Answered by sergiusz in 616461022
when someone opens a document in place, this method is being called:
Code Block
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options

and here you can see the open in place flag
Code Block
options[UIApplicationOpenURLOptionsOpenInPlaceKey]

so my question is: is there any way I can check if the document was opened from Schoolwork?
The [Files and Storage] tag may be more suitable for this question. To clarify, is your question whether there is API to determine if a specific file was opened by a specific app (in this case, Schoolwork)?
Accepted Answer
when someone opens a document in place, this method is being called:
Code Block
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options

and here you can see the open in place flag
Code Block
options[UIApplicationOpenURLOptionsOpenInPlaceKey]

so my question is: is there any way I can check if the document was opened from Schoolwork?
There isn't API to check if the document was opened from Schoolwork.
Schoolwork &#43; Document based app
 
 
Q