Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miquido/accessibility-identifier-checker
The project was made by Miquido. https://www.miquido.com/
https://github.com/miquido/accessibility-identifier-checker
Last synced: 20 days ago
JSON representation
The project was made by Miquido. https://www.miquido.com/
- Host: GitHub
- URL: https://github.com/miquido/accessibility-identifier-checker
- Owner: miquido
- License: apache-2.0
- Created: 2018-02-05T09:29:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T08:25:41.000Z (almost 7 years ago)
- Last Synced: 2024-11-09T11:34:57.951Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 106 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AccessibilityIdentifierChecker
A small library that warns you about missing accessibility identifiers
### Installation
**CocoaPods**
Add the line `pod "AccessibilityIdentifierChecker", :git => "https://github.com/miquido/accessibility-identifier-checker.git"` to your `Podfile`
### Basic usage
To use just put following code in your `application(_:didFinishLaunchingWithOptions:)`:
```swift
#if DEBUG
let checker = AccessibilityIdentifierChecker()
checker.start()
#endif
```By default the key window will be traversed every 5 seconds and for every view with empty or nil accessibilityIdentifier following message will be printed out in the console:
```Missing accessibilityIdentifier: >```
### How to find view
To easilly find view in your running app:
1. Copy address of view from the Console
2. Open "Debug View Hierarchy"
3. Select "Debug Navigator" tab
4. Paste address into filter textbox![Alt text](how_to_find_view_by_address.png "How to find view by address")
### Advanced configuration
You can configure AccessibilityIdentifierChecker behaviour by passing following parameters in init:
- `rootViewProvider` - the root view provider callback which will be called every check to get root view
- `viewLogger` - the callback that will be called every time checker finds a view with empty or nil accessibilityIdentifier
- `scheduler` - the scheduler used to schedule check call
- `interval` - the interval between checks
- `customViewClasses` - an array of your custom view classes you want to take into account during check