{"id":1834,"url":"https://github.com/electricbolt/bindkit","last_synced_at":"2026-03-09T20:05:30.931Z","repository":{"id":56903691,"uuid":"125145145","full_name":"electricbolt/bindkit","owner":"electricbolt","description":"Two-way data binding framework for iOS. Only one API to learn.","archived":false,"fork":false,"pushed_at":"2024-08-11T06:07:37.000Z","size":4830,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-11T17:51:48.948Z","etag":null,"topics":["binding","data","ios","objective-c","reactive","rxswift","swift","uikit"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electricbolt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-03-14T02:42:53.000Z","updated_at":"2024-08-11T08:55:29.000Z","dependencies_parsed_at":"2025-05-04T14:44:23.794Z","dependency_job_id":null,"html_url":"https://github.com/electricbolt/bindkit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/electricbolt/bindkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fbindkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fbindkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fbindkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fbindkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electricbolt","download_url":"https://codeload.github.com/electricbolt/bindkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fbindkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"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":["binding","data","ios","objective-c","reactive","rxswift","swift","uikit"],"created_at":"2024-01-05T20:15:56.908Z","updated_at":"2026-03-09T20:05:30.914Z","avatar_url":"https://github.com/electricbolt.png","language":"Objective-C","funding_links":[],"categories":["Reactive Programming"],"sub_categories":["Other free courses","Prototyping","Other Parsing"],"readme":"# BindKit\n\nA simple to use two-way UIKit data binding framework for iOS. **Only one API to learn**.\n\nSupports Objective-C, Swift 5.10, Xcode 15.4, iOS 13+. Distributed as a static XCFramework ready for you to link into your app (signed by Electric Bolt Limited KLCLPVKM8C).\n\n### Currently supported views\n\nThe following views and properties are directly supported by BindKit:\n\nView class | View properties\n-----------|--------------\nUIBarButtonItem | enabled\nUIButton | enabled, hidden\nUIDatePicker | date, enabled, hidden\nUIImageView | image, hidden\nUILabel | text, attributedText, hidden\nUIPageControl | currentPage, numberOfPages, enabled, hidden\nUISegmentedControl | selectedSegmentIndex, enabled, hidden\nUISlider | value, enabled, hidden\nUIStepper | value, enabled, hidden\nUISwitch | on, enabled, hidden\nUITextFieldText | text, attributedText, enabled, hidden\nUITextView | text, attributedText, editable, hidden\n\n*Don't see the property or class you're interested in?* Submit a pull request with your changes to add the property or class, or use the Vendor API to add custom functionality in your own app. See `MySearchBar.swift` in `BindingExample` for an example of custom functionality using the Vendor API.\n\n### Binding\n\nData binding is **two-way** - any changes to your models properties are automatically applied to your views properties and vice versa.\n\nThere is only one API to learn:\n\n\u003e Objective-C\n\n```objc\n[model bindObjectSel: @selector(addressStr) toView: addressTextField viewKey: UITextFieldText];\n```\n\n\u003e Swift\n\n```swift\nmodel.bindObjectKey(#keyPath(model.addressStr), toView: addressTextField, viewKey: UITextFieldText)\n```\n\n### Just a few simple rules\n\nThe following rules apply when using BindKit with Swift:\n\n1. Your model object must inherit from `NSObject`.\n2. Your models properties that participate in binding need to be marked `@objc dynamic`.\n\nSee [under the hood](#under-the-hood) for implementation details.\n\n### Example\n\n\u003e Swift\n\n```swift\nclass LogonModel: NSObject {\n\t\n\t@objc dynamic var username: String!\n\t@objc dynamic var password: String!\n\t@objc dynamic var logonEnabled: Boolean\n\t\n\toverride func boundPropertiesDidUpdate() {\n\t\tlogonEnabled = validate()\n\t}\n\n\tfunc validate() -\u003e Boolean\n\t\tguard username!.trimmingCharacters(in: CharacterSet.whitespaces).count \u003e 0 else { return false }\n\t\tguard password!.trimmingCharacters(in: CharacterSet.whitespaces).count \u003e 0 else { return false }\n\t\treturn true\n\t}\n}\n\nclass LogonController: UITableViewController {\n\n\t@IBOutlet weak var usernameTextField: UITextField!\n\t@IBOutlet weak var passwordTextField: UITextField!\n\t@IBOutlet weak var logonButton: UIButton!\n\n\tvar model = LogonModel()\n\n\toverride func viewDidLoad() {\n\t\tmodel.bindKey(#keyPath(model.username), view: usernameTextField, viewKey: UITextFieldText)\n\t\tmodel.bindKey(#keyPath(model.password), view: passwordTextField, viewKey: UITextFieldText)\n\t\tmodel.bindKey(#keyPath(model.logonEnabled), view: logonButton, viewKey: UIButtonEnabled)\n\t}\n\n}\n```\n\n## Adding BindKit to your app\n\n### Manual integration\n\n- Link `BindKit.xcframework` into your app.\n- Add the build settings `-ObjC` and `-all_load` to `Other Linker Flags`.\n\n### Swift Package Manager\n\n- Add a Swift Package Manager dependency with the URL `https://github.com/electricbolt/bindkit`.\n- Add the build settings `-ObjC` and `-all_load` to `Other Linker Flags`.\n\n### PrivacyInfo.xcprivacy\n\nThe iOS `BindKit.xcframework` includes an embedded `PrivacyInfo.xcprivacy` file. The file is effectively empty as BindKit does not have any Tracking component or use any APIs as per the Apple [privacy manifest files](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files) documentation.\n\n\u003e Current PrivacyInfo.xcprivacy file contents\n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSPrivacyTracking\u003c/key\u003e\n    \u003cfalse/\u003e\n    \u003ckey\u003eNSPrivacyTrackingDomains\u003c/key\u003e\n    \u003carray/\u003e\n    \u003ckey\u003eNSPrivacyCollectedDataTypes\u003c/key\u003e\n    \u003carray/\u003e\n    \u003ckey\u003eNSPrivacyAccessedAPITypes\u003c/key\u003e\n    \u003carray/\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n### Building\n\nWhilst the static XCFramework is prebuilt and included in the repository, if you need to rebuild then follow these steps:\n\n- Edit the `buildframework.sh` file. Comment out the `codesign` line.\n- Execute the command `./buildframework.sh`.\n\nThe rebuilt static XCFramework will be placed into the root of the project.\n\nThe build script currently assumes iOS SDK 17.5. If you are using a different Xcode build chain, tweak the `IOSSDK_VER` variable in the build script as appropriate.\n\n## Under the hood\n\n### Model\n\nModel properties that participate in binding are monitored for changes using Key-Value-Observing (KVO). For this reason model objects must inherit from `NSObject`, and if using Swift, properties must be marked with `@objc dynamic`.\n\n### View\n\nViews that participate in binding are dynamically subclassed at runtime. There is one dynamic subclass implemented for each supported view. Depending on the view, different methods for monitoring changes are required: target-action, delegation or notifications.\n\n*View not supported?* Submit a pull request with your changes to add the property or class, or use the Vendor API to add custom functionality in your own app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbolt%2Fbindkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectricbolt%2Fbindkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbolt%2Fbindkit/lists"}