{"id":15038597,"url":"https://github.com/sebastianbaar/cordova-plugin-classkit","last_synced_at":"2026-03-17T16:39:43.125Z","repository":{"id":57207977,"uuid":"140326527","full_name":"sebastianbaar/cordova-plugin-classkit","owner":"sebastianbaar","description":"Cordova plugin for using Apple's ClassKit framework.","archived":false,"fork":false,"pushed_at":"2018-07-19T06:29:11.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T20:47:16.059Z","etag":null,"topics":["classkit","cordova-ios-plugin","cordova-plugin","ios","schoolwork","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebastianbaar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-09T18:27:42.000Z","updated_at":"2018-07-19T06:29:12.000Z","dependencies_parsed_at":"2022-09-17T12:01:50.575Z","dependency_job_id":null,"html_url":"https://github.com/sebastianbaar/cordova-plugin-classkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbaar%2Fcordova-plugin-classkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbaar%2Fcordova-plugin-classkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbaar%2Fcordova-plugin-classkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbaar%2Fcordova-plugin-classkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastianbaar","download_url":"https://codeload.github.com/sebastianbaar/cordova-plugin-classkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495495,"owners_count":20299923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classkit","cordova-ios-plugin","cordova-plugin","ios","schoolwork","swift"],"created_at":"2024-09-24T20:39:07.836Z","updated_at":"2025-12-30T16:31:34.434Z","avatar_url":"https://github.com/sebastianbaar.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cordova ClassKit Plugin\n\nPlugin to use Apple's [ClassKit](https://developer.apple.com/documentation/classkit/) framework in your Cordova apps. Manage and create [Contexts](https://developer.apple.com/documentation/classkit/advertising_your_app_s_assignable_content) and [Activities](https://developer.apple.com/documentation/classkit/recording_student_progress) and add [Activity Items](https://developer.apple.com/documentation/classkit/recording_additional_metrics_about_a_completed_task) to track the student's progress within the [Schoolwork](https://itunes.apple.com/us/app/schoolwork/id1355112526?ls=1\u0026mt=8) App.\n\n**This plugin is also available for [Ionic Native](https://ionicframework.com/docs/native/class-kit/)**.\n\n- [Prerequisites]()\n- [Supported Platform(s)]()\n- [Installation]()\n- [API]()\n    - [.initContextsFromXml(urlPrefix, success, error)]()\n    - [.addContext(urlPrefix, context, success, error)]()\n    - [.removeContexts(success, error)]()\n    - [.removeContext(identifierPath, success, error)]()\n    - [.beginActivity(identifierPath, asNew, success, error)]()\n    - [.endActivity(success, error)]()\n    - [.setProgressRange(fromStart, toEnd, success, error)]()\n    - [.setProgress(progress, success, error)]()\n    - [.setBinaryItem(binaryItem, success, error)]()\n    - [.setScoreItem(scoreItem, success, error)]()\n    - [.setQuantityItem(quantityItem, success, error)]()\n- [Add Contexts to your App]()\n    - [Static Contexts in XML File]()\n    - [Dynamic Contexts]()\n- [Deep Linking]()\n- [Contributing]()\n- [License]()\n\n## Prerequisites\n\nOnly works with Xcode 9.4 and iOS 11.4. Your Provisioning Profile must include the ClassKit capability. Read more about how to [Request ClassKit Resources](https://developer.apple.com/contact/classkit/) in this [article](https://developer.apple.com/documentation/classkit/enabling_classkit_in_your_app). \nAlso note that you can’t test ClassKit behavior in Simulator because Schoolwork isn’t available in that environment.\n\n## Supported Platform(s)\n- iOS\n\n## Installation\n1. ```cordova plugin add cordova-plugin-classkit```\n2. Turn on ```ClassKit``` in Xcode's ```Capabilities``` tab\n\nThe code is written in Swift and the [Swift support plugin](https://github.com/akofman/cordova-plugin-add-swift-support) is configured as a dependency.\n\n## API\n\n### .initContextsFromXml(urlPrefix, success, error)\nInit contexts defined in XML file `CCK-contexts.xml`\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `urlPrefix`          | `String`   |         | URL prefix to use for custom URLs to locate activities (deeplink).  |\n| `success` | `Function` |         | Is called when the api successfully initializes the contexts from XML.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while initializing the contexts from XML. |\n\n#### Example\n\n```javascript\nCordovaClassKit.initContextsFromXml(\n  \"myurlprefix://\",\n  () =\u003e {\n    console.log('success');\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n`CCK-contexts.xml` (read [Add Contexts to your App]() for more infos about the XML file)\n```xml\n\u003croot\u003e\n    \u003ccontext\n        title=\"Parent Title 1\"\n        type=\"2\"\n        displayOrder=\"1\"\n        topic=\"math\"\n        identifierPath=\"parent_title_one\"\u003e\n        \u003ccontext\n            title=\"Child 1 1\"\n            type=\"3\"\n            identifierPath=\"parent_title_one, child_one\"\u003e\u003c/context\u003e\n        \u003ccontext\n            title=\"Child 1 2\"\n            type=\"3\"\n            identifierPath=\"parent_title_one, child_two\"\u003e\n            \u003ccontext\n                title=\"Quiz 1 2 1\"\n                type=\"8\"\n                identifierPath=\"parent_title_one, child_two, child_two_quiz\"\u003e\u003c/context\u003e\n        \u003c/context\u003e\n    \u003c/context\u003e\n    \u003ccontext\n        title=\"Parent Title 2\"\n        type=\"2\"\n        displayOrder=\"0\"\n        topic=\"computerScienceAndEngineering\"\n        identifierPath=\"parent_title_two\"\u003e\n        \u003ccontext\n            title=\"Child 2 1\"\n            type=\"3\"\n            identifierPath=\"parent_title_two, child_two\"\u003e\n            \u003ccontext\n                title=\"Quiz 2 1 1\"\n                type=\"8\"\n                identifierPath=\"parent_title_two, child_two, child_one_quiz\"\u003e\u003c/context\u003e\n        \u003c/context\u003e\n    \u003c/context\u003e\n\u003c/root\u003e\n```\n\n### .addContext(urlPrefix, context, success, error)\nInit context with identifier path\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `urlPrefix`          | `String`   |         | URL prefix to use for custom URLs to locate activities (deeplink).    \n| `context`          | `Object`   |         | Context to initialize.                                     |\n| `success` | `Function` |         | Is called when the api successfully initializes the context.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while initializing the context. |\n\nAll available `context` attributes:\n\n| Attribute                      | Type     | Default                                                      | Description                                        |\n| ------------------------------ | -------- | ------------------------------------------------------------ | -------------------------------------------------- |\n| `identifierPath`  | `String[]` |  | Full identifier path from root, including the context identifier itself. |\n| `title` | `String` |  | Title of the context. |\n| `type` | `Number` |  | Optional. Type value for the context. |\n| `topic` | `String` |  | Optional. Topic value of the context. |\n| `displayOrder` | `Number` | `0` | Optional. Display order of the context. |\n\nAll available `type` values ([CLSContextType](https://developer.apple.com/documentation/classkit/clscontexttype)):\n\n| Value | Type     |\n|-------------|-----------\n| `0`  | `CLSContextType.none` | \n| `1`  | `CLSContextType.app` (Reserved for the main app context) | \n| `2`  | `CLSContextType.chapter` | \n| `3`  | `CLSContextType.section` | \n| `4`  | `CLSContextType.level` | \n| `5`  | `CLSContextType.page` | \n| `6`  | `CLSContextType.task` | \n| `7`  | `CLSContextType.challenge` | \n| `8`  | `CLSContextType.quiz` | \n| `10`  | `CLSContextType.exercise` | \n| `11`  | `CLSContextType.lesson` | \n| `12`  | `CLSContextType.book` | \n| `13`  | `CLSContextType.game` | \n| `14`  | `CLSContextType.document` | \n| `15`  | `CLSContextType.audio` | \n| `16`  | `CLSContextType.video` | \n\nAll available `topic` values ([CLSContextTopic](https://developer.apple.com/documentation/classkit/clscontexttopic?changes=_3)):\n\n| Value | Type     |\n|-------------|-----------\n| `\"math\"`  | `CLSContextTopic.math` | \n| `\"science\"`  | `CLSContextTopic.science` | \n| `\"literacyAndWriting\"`  | `CLSContextTopic.literacyAndWriting` | \n| `\"worldLanguage\"`  | `CLSContextTopic.worldLanguage` | \n| `\"socialScience\"`  | `CLSContextTopic.socialScience` | \n| `\"computerScienceAndEngineering\"`  | `CLSContextTopic.computerScienceAndEngineering` | \n| `\"artsAndMusic\"`  | `CLSContextTopic.artsAndMusic` | \n| `\"healthAndFitness\"`  | `CLSContextTopic.healthAndFitness` | \n\n#### Example\n\n```javascript\nvar context = {\n  identifierPath: [\"parent_id\", \"child_id\", \"my_context_identifier\"],\n  title: \"My Context Title\",\n  type: 2,\n  topic: \"math\",\n  displayOrder: 1\n};\n\nCordovaClassKit.addContext(\n  \"myurlprefix://\", context,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .removeContexts(success, error)\nRemove all contexts\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `success` | `Function` |         | Is called when the api successfully removes all contexts.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while removing the contexts. |\n\n#### Example\n\n```javascript\nCordovaClassKit.removeContexts(\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .removeContext(identifierPath, success, error)\nRemove context with identifier path\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `identifierPath` | `String[]` |         | Full identifier path from root, including the context identifier itself. |\n| `success` | `Function` |         | Is called when the api successfully removes the context.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while removing the context. |\n\n#### Example\n\n```javascript\nCordovaClassKit.removeContext(\n  [\"parent_id\", \"child_id\", \"my_context_identifier\"],\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .beginActivity(identifierPath, asNew, success, error)\nBegin a new activity or restart an activity for a given context\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `identifierPath` | `String[]` |         | Full identifier path from root, including the context identifier itself.               |\n| `asNew` | `Boolean` |     false    | Should a new activity be created (or an old activity be restarted).               |\n| `success` | `Function` |         | Is called when the api successfully begins or restarts an activtiy.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while beginning or restarting an activity. |\n\n#### Example\n\n```javascript\nCordovaClassKit.beginActivity(\n  [\"parent_id\", \"child_id\", \"my_context_identifier\"], true,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .endActivity(success, error)\nEnd the active activity\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `success` | `Function` |         | Is called when the api successfully ends the active activity.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while ending the active activity. |\n\n#### Example\n\n```javascript\nCordovaClassKit.endActivity(\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .setProgressRange(fromStart, toEnd, success, error)\n\u003e Adds a progress range to the active given activity.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/clsactivity/2953066-addprogressrange)\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `fromStart` | `Number` |         | The beginning of the new range to add. This should be fractional value between 0 and 1, inclusive.               |\n| `toEnd` | `Number` |         | The end of the new range to add. This should be larger than the start value and less than or equal to one.     |\n| `success` | `Function` |         | Is called when the api successfully adds a progress range.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while adding a progress range. |\n\n#### Example\n\n```javascript\nCordovaClassKit.setProgressRange(\n  0.0, 0.33,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .setProgress(progress, success, error)\n\u003e Adds a progress to the active given activity.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/clsactivity/2953057-progress)\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `progress` | `Number` |         | A measure of progress through the task, given as a fraction in the range [0, 1]. |\n| `success` | `Function` |         | Is called when the api successfully adds a progress.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while adding a progress. |\n\n#### Example\n\n```javascript\nCordovaClassKit.setProgress(\n  0.33,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .setBinaryItem(binaryItem, success, error)\n\u003e Adds activity information that is true or false, pass or fail, yes or no.\n\u003e\n\u003e Use an activity item of this type to indicate a binary condition, such as whether a student passed a test or failed it. Set the valueType property to specify how the binary condition should be reported to a teacher.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/clsbinaryitem)\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `binaryItem` | `Object` |         | The binary item to add to the activity.               |\n| `success` | `Function` |         | Is called when the api successfully adds a binary item.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while adding a binary item. |\n\nAll available `binaryItem` attributes:\n\n| Attribute                      | Type     | Default                                                      | Description                                        |\n| ------------------------------ | -------- | ------------------------------------------------------------ | -------------------------------------------------- |\n| `identifier`  | `String` |  | A unique string identifier for the activity item. |\n| `title` | `String` |  | A human readable name for the activity item. |\n| `type` | `Number` |  | A type value for the activity item. |\n| `isCorrect` | `Boolean` |  | The value that the binary activity item takes. |\n| `isPrimaryActivityItem` | `Boolean` | false | Optional. Should the activity item be added as the primary activity item. |\n\nAll available `type` values ([CLSBinaryValueType](https://developer.apple.com/documentation/classkit/clsbinaryvaluetype)):\n\n| Value | Type     |\n|-------------|-----------\n| `0`  | `CLSBinaryValueType.trueFalse` | \n| `1`  | `CLSBinaryValueType.passFail` | \n| `2`  | `CLSBinaryValueType.yesNo` | \n\n#### Example\n\n```javascript\nvar binaryItem = {\n  identifier: \"binary_item_id\",\n  title: \"My Binary Item 1\",\n  type: 0,\n  isCorrect: true,\n  isPrimaryActivityItem: false\n};\n\nCordovaClassKit.setBinaryItem(\n  binaryItem,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .setScoreItem(scoreItem, success, error)\n\u003e Adds activity information that signifies a score out of a possible maximum.\n\u003e\n\u003e Use an activity item of this type to indicate the relative success in completing a task, like the number of correctly answered questions on a quiz.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/clsscoreitem)\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `scoreItem` | `Object` |         | The score item to add to the activity.               |\n| `success` | `Function` |         | Is called when the api successfully adds a score item.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while adding a score item. |\n\nAll available `scoreItem` attributes:\n\n| Attribute                      | Type     | Default                                                      | Description                                        |\n| ------------------------------ | -------- | ------------------------------------------------------------ | -------------------------------------------------- |\n| `identifier`  | `String` |  | A unique string identifier for the activity item. |\n| `title` | `String` |  | A human readable name for the activity item. |\n| `score` | `Number` |  | The score earned during completion of a task. |\n| `maxScore` | `Number` |  | The maximum possible score, against which the reported score should be judged. |\n| `isPrimaryActivityItem` | `Boolean` | false | Optional. Should the activity item be added as the primary activity item. |\n\n#### Example\n\n```javascript\nvar scoreItem = {\n  identifier: \"total_score\",\n  title: \"Total Score\",\n  score: 0.66,\n  maxScore: 1.0,\n  isPrimaryActivityItem: true\n};\n\nCordovaClassKit.setScoreItem(\n  scoreItem,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n### .setQuantityItem(quantityItem, success, error)\n\u003e Activity information that signifies a quantity.\n\u003e\n\u003e Use an activity item of this type to associate a discrete value with a task. For example, you might use it to indicate how many times the user requested a hint while taking a quiz.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/clsquantityitem)\n\n#### Parameters\n\n| Parameter        | Type       | Default | Description                                                   |\n| ---------------- | ---------- | ------- | ------------------------------------------------------------- |\n| `quantityItem` | `Object` |         | The quantity item to add to the activity.               |\n| `success` | `Function` |         | Is called when the api successfully adds a quantity item.               |\n| `error`   | `Function` |         | Is called when the api encounters an error while adding a quantity item. |\n\nAll available `quantityItem` attributes:\n\n| Attribute                      | Type     | Default                                                      | Description                                        |\n| ------------------------------ | -------- | ------------------------------------------------------------ | -------------------------------------------------- |\n| `identifier`  | `String` |  | A unique string identifier for the activity item. |\n| `title` | `String` |  | A human readable name for the activity item. |\n| `quantity` | `Number` |  | A quantity associated with the task. |\n| `isPrimaryActivityItem` | `Boolean` | false | Optional. Should the activity item be added as the primary activity item. |\n\n#### Example\n\n```javascript\nvar quantityItem = {\n  identifier: \"quantity_item_hints\",\n  title: \"Hints\",\n  quantity: 8,\n  isPrimaryActivityItem: false\n};\n\nCordovaClassKit.setQuantityItem(\n  quantityItem,\n  () =\u003e {\n    console.log(\"success\");\n  },\n  e =\u003e {\n    console.log(\"error:\", e);\n  }\n);\n```\n\n## Add Contexts to your App\n\u003e A context [...] represents an area within your app, such as a book chapter or a game level, that teachers can assign to students as tasks. You create a hierarchy of contexts to enable teachers to browse and assign your app’s content. You provide deep links to the content that the contexts represent to help teachers guide students to your content.\n\u003e [developer.apple.com](https://developer.apple.com/documentation/classkit/advertising_your_app_s_assignable_content)\n\nThere are two different types of contexts that you are able to initialize with this plugin: __static__ (you know your contexts beforehand) and __dynamic__ (you add contexts at run time).\n\n### Static Contexts in XML File\nIf you have a lot of static contexts you want to add to your app you could either call [`addContext(context, success, error)`]() for every context or use a hierarchical XML representation of your contexts to initialize your contexts from calling [`initContextsFromXml(urlPrefix, success, error)`](). Latter will be more clear and structured (at least for me... that's the reason I added this option... ;-) ).\nTherefore the plugin adds a `CCK-contexts.xml` file to your `Resources` folder in Xcode. The structure is as follows:\n\n```xml\n\u003croot\u003e\n    \u003ccontext identifierPath=\"parent_title_one\"  title=\"Parent Title 1\" type=\"2\" displayOrder=\"1\" topic=\"math\"\u003e\n        \u003ccontext title=\"Child 1 1\" type=\"3\" identifierPath=\"parent_title_one, child_one\"\u003e\u003c/context\u003e\n        \u003ccontext title=\"Child 1 2\" type=\"3\" identifierPath=\"parent_title_one, child_two\"\u003e\n            \u003ccontext title=\"Quiz 1 2 1\" type=\"8\" identifierPath=\"parent_title_one, child_two, child_two_quiz\"\u003e\u003c/context\u003e\n        \u003c/context\u003e\n    \u003c/context\u003e\n    \u003ccontext title=\"Parent Title 2\" type=\"2\" displayOrder=\"0\" topic=\"computerScienceAndEngineering\" identifierPath=\"parent_title_two\"\u003e                \n    ...\n    \u003c/context\u003e\n    ...\n\u003c/root\u003e\n```\n\nYou have to start with __exactly one__ root node `\u003croot\u003e\u003c/root\u003e`. Now, nest all your `\u003ccontext\u003e\u003c/context\u003e` nodes in here building a hierarchical representation of all your static contexts. All available `\u003ccontext\u003e`-tag attributes are:\n\n| Attribute                      | Type     | Default                                                      | Description                                        |\n| ------------------------------ | -------- | ------------------------------------------------------------ | -------------------------------------------------- |\n| `identifierPath`  | `String[]` |  | Full identifier path from root, including the context identifier itself. |\n| `title` | `String` |  | Title of the context. |\n| `type` | `Number` |  | Optional. Type value for the context. |\n| `topic` | `String` |  | Optional. Topic value of the context. |\n| `displayOrder` | `Number` | `0` | Optional. Display order of the context. |\n\nAll available `type` values ([CLSContextType](https://developer.apple.com/documentation/classkit/clscontexttype)):\n\n| Value | Type     |\n|-------------|-----------\n| `0`  | `CLSContextType.none` | \n| `1`  | `CLSContextType.app` (Reserved for the main app context) | \n| `2`  | `CLSContextType.chapter` | \n| `3`  | `CLSContextType.section` | \n| `4`  | `CLSContextType.level` | \n| `5`  | `CLSContextType.page` | \n| `6`  | `CLSContextType.task` | \n| `7`  | `CLSContextType.challenge` | \n| `8`  | `CLSContextType.quiz` | \n| `10`  | `CLSContextType.exercise` | \n| `11`  | `CLSContextType.lesson` | \n| `12`  | `CLSContextType.book` | \n| `13`  | `CLSContextType.game` | \n| `14`  | `CLSContextType.document` | \n| `15`  | `CLSContextType.audio` | \n| `16`  | `CLSContextType.video` | \n\nAll available `topic` values ([CLSContextTopic](https://developer.apple.com/documentation/classkit/clscontexttopic?changes=_3)):\n\n| Value | Type     |\n|-------------|-----------\n| `\"math\"`  | `CLSContextTopic.math` | \n| `\"science\"`  | `CLSContextTopic.science` | \n| `\"literacyAndWriting\"`  | `CLSContextTopic.literacyAndWriting` | \n| `\"worldLanguage\"`  | `CLSContextTopic.worldLanguage` | \n| `\"socialScience\"`  | `CLSContextTopic.socialScience` | \n| `\"computerScienceAndEngineering\"`  | `CLSContextTopic.computerScienceAndEngineering` | \n| `\"artsAndMusic\"`  | `CLSContextTopic.artsAndMusic` | \n| `\"healthAndFitness\"`  | `CLSContextTopic.healthAndFitness` | \n\nEdit the `CCK-contexts.xml` file directly in the `Resources` folder in Xcode. Within your application call [`initContextsFromXml(urlPrefix, success, error)`]() to init your contexts from `CCK-contexts.xml`.\n\n### Dynamic Contexts\nTo dynamically add contexts to your application use [`addContext(context, success, error)`]().\n\n## Deep Linking\nAs Apple's documentation states you should/have to \"provide deep links to the content that the contexts represent to help teachers guide students to your content\". [developer.apple.com](https://developer.apple.com/documentation/classkit/advertising_your_app_s_assignable_content)\nThe deep linking __is not part of this plugin__! Please use your 3rd party plugin of choice here, e.g. [Ionic Deeplinks Plugin](https://github.com/ionic-team/ionic-plugin-deeplinks) or [Branch](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking).\n\n## Contributing\nThis plugin needs testing! \n\n0. Test it\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\nThis software is released under the [Apache 2.0 License][apache2_license].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbaar%2Fcordova-plugin-classkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianbaar%2Fcordova-plugin-classkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbaar%2Fcordova-plugin-classkit/lists"}