I've managed to get the lesson data populated as described (thanks, the documentation was pretty clear, although the Objective-C version still shows swift code).
When I swap to student mode, and relaunch the Schoolwork app, I can then double tap on the activity and it launches my app quite happily.
What I haven't found described so far, is how my app determines what activity or CLSContext was requested so that I can direct the student into the requested content automatically.
I'm guessing I can find it in the "launchOptions" dictionary provided to:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;Any help would be appreciated.
You basically encode the path to your context or a context id in the URL you assign to your CLSContext object.
For the app delegate details, check out how to format and handle universal links here: https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
Specifically:
After you specify your associated domains, adopt the
UIApplicationDelegate methods for Handoff (specifically application:continueUserActivity:restorationHandler:) so that your app can receive a link and handle it appropriately.-M