{"id":25676379,"url":"https://github.com/socketmobile/swift-package-maraca","last_synced_at":"2026-04-28T00:32:06.889Z","repository":{"id":63920545,"uuid":"531656962","full_name":"SocketMobile/swift-package-maraca","owner":"SocketMobile","description":"Maraca establishes connections between your iOS application using our iOS CaptureSDK and a web application using our CaptureJS SDK. This enables the web application to connect with our scanners and NFC readers with the same flexibilty that our iOS SDK provides","archived":false,"fork":false,"pushed_at":"2023-06-13T13:32:44.000Z","size":1335,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-20T23:05:03.411Z","etag":null,"topics":["capturesdk","ios","javascript","scanner","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocketMobile.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-01T19:22:10.000Z","updated_at":"2022-10-03T08:57:22.000Z","dependencies_parsed_at":"2025-06-20T23:05:09.381Z","dependency_job_id":null,"html_url":"https://github.com/SocketMobile/swift-package-maraca","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SocketMobile/swift-package-maraca","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fswift-package-maraca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fswift-package-maraca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fswift-package-maraca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fswift-package-maraca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocketMobile","download_url":"https://codeload.github.com/SocketMobile/swift-package-maraca/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketMobile%2Fswift-package-maraca/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032037,"owners_count":23100048,"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":["capturesdk","ios","javascript","scanner","swift"],"created_at":"2025-02-24T14:26:11.267Z","updated_at":"2026-04-28T00:32:06.863Z","avatar_url":"https://github.com/SocketMobile.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maraca Version 1.0.10 - Swift Package Manager\n\nSocket Mobile is a leading innovator of data capture and delivery solutions for enhanced productivity.\n\nMaraca establishes connections between your iOS application using our [iOS CaptureSDK](https://github.com/SocketMobile/swift-package-capturesdk) and a web application using our [CaptureJS SDK](https://docs.socketmobile.com/capturejs/en/latest/gettingStarted.html). This enables the web application to connect with our scanners and NFC readers with the same flexibilty that our iOS SDK provides.\n\n# Devices compatibility and Maraca versions\n|       Devices                                          |          \u003c 1.0.7       |         \u003e= 1.0.7       |        1.0.10         |\n| :----------------------------------------------------: | :--------------------: | :--------------------: | :--------------------: |\n|   **SocketCam C820**                                   |          ❌            |           ✅           |           ✅           |\n|   **S720/D720/S820**                                   |          ❌            |           ❌           |           ✅           |\n|   **D600, S550, and all other barcode scanners**       |          ✅            |           ✅           |           ✅           |\n|   **S370**                                             |          ❌            |           ❌           |           ✅           |\n\n# Table of Contents\n* [Quick install notes](#quick-install-notes)\n* [Usage](#usage)\n* [Documentation](#documentation)\n* [Example](#example)\n* [License](#license)\n\n# Quick install notes\nMaraca is using [Swift Package Manager](https://www.swift.org/package-manager/).\n\nFirst, you need to install Xcode.\n\nTo include the SDK in your Xcode project you have to add a `Package Dependency` in the project's settings section and in the tab \"Package Dependencies\".\n\nAdd the url of this repository: [https://github.com/SocketMobile/swift-package-maraca](https://github.com/SocketMobile/swift-package-maraca)\n\n![Add the Package to the project](./docs/add-to-your-project.png)\n\nOnce you have added the package, you should see `Maraca` added to your Package Dependencies in Xcode's Project Navigator as follow:\n\n![Added Package to the project](./docs/added-to-your-project.png)\n\nNote: this Maraca Swift Package has as a dependency our [CaptureSDK Swift Package](https://github.com/SocketMobile/swift-package-capturesdk), as it was with Cocoapods back then.\n\n# Usage\n\nUnder the hood, Maraca is an umbrella for our iOS Capture SDK. So naturally, you need to provide credentials to get started. \n\nThe most important step is to call `observeJavascriptMessageHandlers(_:)`\nYou may provide your own Javascript Message Handler names if you're familiar with [WKUserContentController](https://developer.apple.com/documentation/webkit/wkusercontentcontroller). Otherwise, this can be nil.\nThis function enables messages containing data to be transferred from your web application using CaptureJS to your iOS application.\n\nInside the completion handler of `beging(withAppKey:appId:developerId:completion:)`, create your `WKWebView` using the public `Maraca.shared.webViewConfiguration` configuration\n\n```swift\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n\n    setupMaraca()\n}\n\nprivate func setupMaraca() {\n    \n    let appKey =        \u003cYour App Key\u003e\n    let appId =         \u003cYour App ID\u003e\n    let developerId =   \u003cYour Developer ID\u003e\n    let bundle = Bundle.main\n    \n    Maraca.shared.injectCustomJavascript(mainBundle: bundle, javascriptFileNames: [\"getInputForDecodedData\"])\n        .observeJavascriptMessageHandlers(YourOwnMessageHandlers.allCases.map { $0.rawValue })\n        .setDelegate(to: self)\n        .begin(withAppKey: appKey,\n               appId: appId,\n               developerId: developerId,\n               completion: { [weak self] (result) in\n\n                    if result == .E_NOERROR {\n                        self?.setupUI()\n                    } else {\n                        // Encountered some error, inspect result\n                    }\n        })\n}\n\n// Initialize WKWebView with Maraca.shared.webViewConfiguration after\n// setting up Maraca\nprivate var webview: WKWebView!\n\nprivate func setupUI() {\n\n    webview = {\n        let w = WKWebView(frame: .zero, configuration: Maraca.shared.webViewConfiguration)\n        w.navigationDelegate = self\n        return w\n    }()\n    \n    view.addSubview(webview)\n    \n    // Set up constraints, etc..\n    \n    let myWebApplicationURLString = .....\n    \n    guard let url = URL(string: myWebApplicationURLString) else {\n        return\n    }\n    \n    loadMyWebApplication(with: url)\n    \n}\n\n```\n\n# Documentation\n\nFull documentation can be found [here](https://docs.socketmobile.com/rumba/en/latest/maraca.html)\n\n# Example\n\nTo run the example project, go to the Example directory first.\n\n# License\n\nMaraca is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fswift-package-maraca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketmobile%2Fswift-package-maraca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketmobile%2Fswift-package-maraca/lists"}