{"id":39140049,"url":"https://github.com/butterflynetwork/imagingsdk-ios","last_synced_at":"2026-05-15T21:01:44.741Z","repository":{"id":244851400,"uuid":"811143398","full_name":"ButterflyNetwork/ImagingSDK-iOS","owner":"ButterflyNetwork","description":"Butterfly Imaging SDK for iOS apps development","archived":false,"fork":false,"pushed_at":"2026-03-02T20:58:25.000Z","size":2537,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-03-02T23:58:30.435Z","etag":null,"topics":["ios-sdk","swift","ultrasound"],"latest_commit_sha":null,"homepage":"https://butterflynetwork.com/ai-developers","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ButterflyNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-06T02:52:53.000Z","updated_at":"2026-03-02T20:58:30.000Z","dependencies_parsed_at":"2025-01-07T19:50:19.174Z","dependency_job_id":"41a7a21a-0329-4702-832a-06fb73b32e1f","html_url":"https://github.com/ButterflyNetwork/ImagingSDK-iOS","commit_stats":null,"previous_names":["butterflynetwork/imagingsdk-ios"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ButterflyNetwork/ImagingSDK-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterflyNetwork%2FImagingSDK-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterflyNetwork%2FImagingSDK-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterflyNetwork%2FImagingSDK-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterflyNetwork%2FImagingSDK-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ButterflyNetwork","download_url":"https://codeload.github.com/ButterflyNetwork/ImagingSDK-iOS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterflyNetwork%2FImagingSDK-iOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33080346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ios-sdk","swift","ultrasound"],"created_at":"2026-01-17T21:30:00.215Z","updated_at":"2026-05-15T21:01:44.734Z","avatar_url":"https://github.com/ButterflyNetwork.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Butterfly Imaging SDK\n\nThe Butterfly Imaging SDK allows you to quickly integrate Butterfly Network's imaging probes into your iOS app, enabling you to:\n* Read B-mode, Color Doppler, and M-Mode images from the Butterfly iQ probes.\n* Change the preset, mode, depth, and gain of the Butterfly iQ probes.\n\nFor a full list of capabilities that can be leveraged in your app, please reference the header files in the project (⌃⌘ + click on an object or property).\n\nThe project also contains a sample app to demonstrate its usage and help you get started quickly.\n\n## Description\n\nThe SDK consists of a few key objects:\n* **`ButterflyImaging`** - This is the main object you use to initiate the SDK and control the probe. From here, you can start or stop imaging, and change presets, gain, and depth. The status of the probe and images are read from this object via a callback closure, which is called whenever there is a new `ImagingState` available.\n* **`ImagingState`** - With every change in the state of the probe, you receive a new imaging state (via the callback closure set in the `ButterflyImaging` object). This includes access to scanned images, imaging settings, probe state, battery status, etc.\n* **`ButterflyImage`** - Within the `ImagingState` object, the `bModeImage` and `mModeImage` properties represent the latest image/frame from the probe. These include the image data and metadata.\n* **`ImagingPreset`** - Every imaging session is set with an Imaging Preset, a predefined set of imaging parameter values for different clinical procedures such as Abdomen, Bladder, Cardiac, etc.\n* **`UltrasoundMode`** - The different imaging modes supported in the SDK: B-Mode, M-Mode, and Color Doppler.\n\n## Requirements\n\n* Built and tested using Xcode 16.2 and macOS Sequoia 15.6.1.\n* Available for iOS 18.0 or newer.\n* Apps developed using the SDK should only be installed on [Butterfly supported devices](https://support.butterflynetwork.com/hc/en-us/sections/360004521832-Mobile-Devices).\n* Not compatible with beta software.\n* Internet connectivity is required for the initial setup of the SDK on a device, for periodic validation every 30 days, and for use on the iOS Simulator.\n* The SDK does not save images collected by your app, but basic usage of the SDK is monitored.\n\n## Installation\n\nTo start using the SDK, please follow these steps:\n\n1. Add your [Butterfly Access Token](Docs/AccessToken.md) to your Mac.\n1. In your project, open the menu: **File** \u003e **Add Package Dependencies**, and enter our package's GitHub URL:\n   ```\n   https://github.com/ButterflyNetwork/ImagingSDK-iOS\n   ```\n1. Tap **Add Package**. If Xcode prompts for access to the keychain, enter your Mac’s password and tap **Always Allow**.\n1. In the **Choose Package Products** prompt, ensure that the correct app target is selected for the **ButterflyImagingKit** package product. Then tap **Add Package** to finish.\n1. Go to your target's **Info** tab, add a new row, and enter the key **Supported external accessory protocols**. Open the array's drop-down and set the first row (**Item 0**) with the value `com.butterflynetinc.umap.v3` like so:\n\n   \u003cimg width=\"500\" alt=\"Supported External Accessory Protocols\" src=\"Docs/Resources/UISupportedExternalAccessoryProtocols.png\"\u003e\n\n## Troubleshooting\n\nIf you encounter any issues during the integration of the SDK, please refer to the [Troubleshoot](Docs/Troubleshoot.md) page.\n\n## Quick Start\n\nHere's a brief guide to quickly get started with imaging using SwiftUI Previews. Follow these five key steps:\n\n1. Set up the callback closure.\n1. Initialize the SDK with your client key.\n1. Establish a connection.\n1. Start the imaging session.\n1. Display the results.\n\n```swift\nimport ButterflyImagingKit\nimport SwiftUI\n\nprivate let imagingSDK = ButterflyImaging.shared\nprivate var didStart = false\n\nstruct QuickStartView: View {\n    @State var image: UIImage\n    var body: some View {\n        Image(uiImage: image)\n            .onAppear {\n                Task { await quickStart() }\n            }\n    }\n\n    func quickStart() async {\n        // 1. Set up callback closure to handle state changes.\n        imagingSDK.states = { state, stateChanges in\n            Task {\n                guard !didStart else { return }\n                didStart = true\n\n                // 3. Connect the simulated probe.\n                await imagingSDK.connectSimulatedProbe()\n\n                // 4. Start imaging.\n                try? await imagingSDK.startImaging()\n            }\n\n            // 5. Present image.\n            guard stateChanges.bModeImageChanged, let bModeImage = state.bModeImage?.image else { return }\n            image = bModeImage\n        }\n\n        // 2. Start the SDK with your client key.\n        try? await imagingSDK.startup(clientKey: \"CLIENT KEY\")\n    }\n}\n\n#Preview {\n    QuickStartView(image: .remove)\n}\n```\n\n\u003e [!NOTE]\n\u003e When using a physical probe instead of the simulated one, ensure the probe is ready and presets are available before calling `startImaging` by checking: `state.probe.state == .ready \u0026\u0026 !state.availablePresets.isEmpty`. The connection is automatically established by plugging the probe into your iOS device.\n\n## Sample App\n\nExplore more advanced usage via the [example project](Example). It showcases the setup described above, a basic workflow for starting the SDK, reading images, and controlling the probe's capabilities.\n\nTo run the sample app:\n\n1. Make sure you have followed our [instructions](Docs/AccessToken.md) for adding your Butterfly Access Token to your Mac.\n1. Set your client key in **ButterflyImagingKitExampleApp.swift**.\n1. Set your development team and a bundle identifier:\n\n   \u003cimg width=\"400\" alt=\"Bundle Identifier\" src=\"Docs/Resources/BundleIdentifier.png\"\u003e\n\n\u003cbr\u003e\nAnd you should be good to go!\n\n\u003cimg width=\"350\" alt=\"Example App\" src=\"Docs/Resources/ExampleApp.png\"\u003e\n\n## License\n\nCopyright 2012-2025 (C) Butterfly Network, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutterflynetwork%2Fimagingsdk-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbutterflynetwork%2Fimagingsdk-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutterflynetwork%2Fimagingsdk-ios/lists"}