{"id":23692448,"url":"https://github.com/yext/yxtunsatisfiableconstraintsdetector","last_synced_at":"2025-09-02T20:33:04.664Z","repository":{"id":56929933,"uuid":"51078965","full_name":"yext/YXTUnsatisfiableConstraintsDetector","owner":"yext","description":"A utility for detecting unsatisfiable constraint errors and calling back to allow automated runtime handling.","archived":false,"fork":false,"pushed_at":"2023-07-17T15:40:59.000Z","size":54,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-12-25T00:45:58.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yext.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}},"created_at":"2016-02-04T13:52:06.000Z","updated_at":"2023-07-17T15:41:05.000Z","dependencies_parsed_at":"2022-08-21T00:01:12.521Z","dependency_job_id":null,"html_url":"https://github.com/yext/YXTUnsatisfiableConstraintsDetector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2FYXTUnsatisfiableConstraintsDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2FYXTUnsatisfiableConstraintsDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2FYXTUnsatisfiableConstraintsDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2FYXTUnsatisfiableConstraintsDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yext","download_url":"https://codeload.github.com/yext/YXTUnsatisfiableConstraintsDetector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231810484,"owners_count":18429999,"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":[],"created_at":"2024-12-30T03:27:52.185Z","updated_at":"2024-12-30T03:27:56.323Z","avatar_url":"https://github.com/yext.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YXTUnsatisfiableConstraintsDetector\n\n[![CI Status](https://img.shields.io/travis/yext/YXTUnsatisfiableConstraintsDetector.svg?style=flat)](https://travis-ci.org/yext/YXTUnsatisfiableConstraintsDetector)\n\nA debugging tool that catches unsatisfiable constraint errors as they appear at the console and provides call backs either directly to blocks or via NSNotificationCenter. This allows such errors to be handled at runtime.\n\nThis tool is intended for debugging only, and has not been designed for production-level performance.\n\n## Use cases\n\n* Highlighting constraint issues during development visually\n* Catching constraint problems during unit testing\n* Failing UI tests by killing the application on receipt of a constraint error.\n\n## Example Project\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\nThe example project shows a use of the detector to highlight `UIViews` with unsatisfiable constraints, displaying a red border on problem views.\n\n## Requirements\n\nYXTUnsatisfiableConstraintsDetector supports projects for iOS 7 and above.\n\n## Installation\n\n### Manual Install\n\nTo install manually, copy the files under *Pod/Classes* into your project.\n\n### CocoaPods\n\nYXTUnsatisfiableConstraintsDetector is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"YXTUnsatisfiableConstraintsDetector\"\n```\n\n## Usage\n\nTo import the detector into a given source file:\n\n    #import \"YXTUnsatisfiableConstraintsDetector.h\"\n\nYou can then instantiate an instance of `YXTUnsatisfiableConstraintsDetector` and add callback blocks using the `registerBlock:` method. When all your blocks are configured, call `beginMonitoring` to start listening for errors.\n\nIt is recommended to create a single instance of `YXTUnsatisfiableConstraintsDetector` in your AppDelegate's launch method, and to enclose this in a DEBUG check to ensure it is not called in release builds. For example, to register a callback that marks views with errors in red:\n\n    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n    {\n    #ifdef DEBUG\n        YXTUnsatisfiableConstraintsDetector *detector = [[YXTUnsatisfiableConstraintsDetector alloc] init];\n        [detector registerBlock:^(UIView *view){\n            if(view != nil){\n                dispatch_async(dispatch_get_main_queue(), ^(void){\n                    view.layer.borderColor = [UIColor redColor].CGColor;\n                    view.layer.borderWidth = 3.0;\n                });\n            }\n        }];\n        [detector beginMonitoring];\n    #endif\n        return YES;\n    }\n\nNote that `view` may be null if the problem `UIView` is not currently in the view hierarchy.\n\n## Author\n\nTom Elliott, telliott@yext.com\n\n## License\n\nYXTUnsatisfiableConstraintsDetector 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%2Fyext%2Fyxtunsatisfiableconstraintsdetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyext%2Fyxtunsatisfiableconstraintsdetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyext%2Fyxtunsatisfiableconstraintsdetector/lists"}