Peek 5.0 with an all new design and all new features. Whether you're a developer, designer or QA/tester, Peek can help you at all stages of your development process.
All inspectors and attributes have now been unified into a single window, making inspection simpler and faster than ever before.
Feeling overwhelmed with all the information Peek has to offer? Simply tap the header to expand/collapse any section. Peek will even remember your choice across launches!
Peek now supports nested Inspectors. This powerful feature allows Peek to surface even more detail about your application. In fact Peek 5.0 more than doubles the number of attributes it can inspect.
Views, images, colours and more can now provide snapshot previews to help you better identify what you’re inspecting.
An all new reporting system allows you to export screenshots, metadata and even suggested values using the iOS native share sheet.
Peek itself is now more accessible with Dynamic Type, but Peek can also surface accessibility details from your application.
You can now search within Peek, making it easier than ever to inspect your apps.
Thanks to an all new architecture Peek is also now smaller. Providing more features with much less code, leaving a very small footprint on your application.
- Simply press one of your volume key(s) to show & hide Peek
- Now tap or drag your finger across the screen
- Tap the inspectors button (or double tap anywhere on the screen) to show the Inspectors for the selected view
You can't get simpler than that!
The simplest way to integrate Peek into your project is to use Cocoapods
:
pod 'Peek', :configurations => ['Debug']
You only need 1 line of code to enable Peek in your application:
window?.peek.enabled = true
When running in the Simulator you'll need a couple of extra lines:
// Your AppDelegate
override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {
// iOS 8/9 requires device motion handlers to be on the AppDelegate
window?.peek.handleShake(motion)
}
or
// Your ViewController
override var canBecomeFirstResponder: Bool {
return true
}
override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {
// iOS 10 now requires device motion handlers to be on a UIViewController
UIApplication.shared.keyWindow?.peek.handleShake(motion)
}
Now you can press CMD+CTRL+Z
(or use the Menu option) to show/hide Peek in your Simulator.
Peek is an open source framework that provides runtime inspection of your application while its running on your device (or Simulator).
- Developers can use Peek to inspect their user interfaces at runtime.
- Designers can verify that the applications meets their design specifications.
- Testers and QA can check accessibility identifiers, validate behaviour and report issues.
Peek is a tool to aide you at all stages of your development process.
Peek scans your entire user interface on the screen then provides overlays with layout information and attribute inspectors.
Peek includes an intelligent filtering system to best determine which views you care about while ignoring those you are not likely to be interested in.
For example, by default Peek will not show you many of Apple's system components unless they are subclassed.
Peek presents itself in its own window that sits directly on top of your own app's user interface to ensure that it doesn't interfere with normal functionality.
Peek also allows you to test all supported orientations on both iPhone and iPad.
Most importantly Peek doesn’t interfere with your applications logic or user interface in anyway. It provides read-only inspection to guarantee you’re seeing live-values only!
If you're not ready to integrate Peek into your own project, You can simply download this repo and run the sample project included :)
Its a small app that perfectly demonstrates the power of Peek!
Peek allows many options to be configured, allowing you more control over how Peek is configured as well as reporting options:
window?.peek.enableWithOptions { options in
options.theme = .black
options.activationMode = .auto
options.shouldIgnoreContainers = true
/*
Sometimes it can also be useful to include additional metadata with each report.
*/
options.metaData = [ "Environment": "UAT" ]
}
Peek is designed to be as safe as possible. Peek will never retain objects from your application. It will never use a background thread. Peek won't even run unless you explicitly enable it!
Go ahead, take a Peek at your app now :)
Peek is officially supported (and tested) with the following configurations:
- iOS 9.0+ (Swift and Objective-C)
Swift 4.x
Currently supported by version Peek v4.0 – v5.0
Swift 3.x
Not officially supported. Its recommended you update to Swift 4 and Peek 5.0
Swift 2.3
If you need Swift 2.3 support, update your Podfile as such:
pod 'Peek', '2.3'
Swift 2.2
If you need Swift 2.2 support, update your Podfile as such:
pod 'Peek', '2.0'
- All new design
- Unified Inspectors:
- Collapse/Expand Groups
- Nested Inspectors
- Previews
- Revamped Reporting
- Accessibilty, StackViews & More
- Removed InkKit & SwiftLayout dependencies
- and more
Note: Dropped support for iOS 8.x.
Just a Swift compatibility update. Minor changes as per Swift APIs but no functional changes to Peek.
Swift 3.x unfortunately broke some of the compatilibity issues I required to work with the runtime. Please use the Swift 4 version instead.
- Slack integration
- Email reports
- Screenshot upload block (for Slack)
- NSAttributedString support, including paragraph styles
- Enable with options
- Force shake gesture on device
- Allow container selection
- Absolute layout overlay
- Multiple inspectors
- Swift Support
- iOS 8.3 Support
Original concept, code and app design by @shaps
Icons in the demo app found on The Noun Project. Artwork by Vitaliy Gorbachev