• Stars
    star
    2,601
  • Rank 17,613 (Top 0.4 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

All new design. Inspect your iOS application at runtime.

Peek Site

Carthage Version License Language Platform

Peek: All new design

Peek 5 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.

Watch the Promo to see it in action.

Unified Inspectors

All inspectors and attributes have now been unified into a single window, making inspection simpler and faster than ever before.

Collapsible Groups

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!

Nested Inspectors

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.

Previews

Views, images, colours and more can now provide snapshot previews to help you better identify what you’re inspecting.

Reporting

An all new reporting system allows you to export screenshots, metadata and even suggested values using the iOS native share sheet.

Accessibility

Peek itself is now more accessible with Dynamic Type, but Peek can also surface accessibility details from your application.

Search

You can now search within Peek, making it easier than ever to inspect your apps.

Less Code & Dependencies

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.

Ready to get started?

Designers & Testers

  • 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!

Developers

Device

The simplest way to integrate Peek into your project is to use Cocoapods or Carthage:

# Cocoapods
pod 'Peek', :configurations => ['Debug']

# Carthage
github "shaps80/Peek" ~> 5.1.0

You only need 1 line of code to enable Peek in your application:

window?.peek.enabled = true

Simulator

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.

Contributing

Contributions to Peek are welcomed and encouraged!

It is easy to get involved. Please see the Contributing guide for more details.

A list of contributors is available through GitHub.

To give clarity of what is expected of our community, Peek has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and I think it articulates my values well. For more, see the Code of Conduct.

What is Peek?

Peek on Vimeo

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.

How does Peek work?

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!

Demo

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!

Configuring 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" ]
}

Safety First

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 :)

Supported Platforms and Versions

Peek is officially supported (and tested) with the following configurations:

  • iOS 9.0+ (Swift and Objective-C)

Note: if you're having issues with Swift versions when using Cocoapods, try adding the following to your Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "Peek" then
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
    end
end

Swift Versions

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'


Attribution

Original concept, code and app design by @shaps

Icons in the demo app found on The Noun Project. Artwork by Vitaliy Gorbachev

More Repositories

1

SwiftUIBackports

A collection of SwiftUI backports for iOS, macOS, tvOS and watchOS
Swift
940
star
2

InkKit

Drawing and Geometry made easy on iOS - now in Swift 3.0
Swift
373
star
3

iMessageStyleReveal

Adds iMessage style timestamp support. Written in Swift!
Swift
147
star
4

MarkdownText

A native SwiftUI view for rendering Markdown text in an iOS or macOS app
Swift
142
star
5

GraphicsRenderer

A drop-in UIGraphicsRenderer port -- CrossPlatform, Swift 4, Image & PDF
Swift
109
star
6

Warrant

Data validation made easy. In code and from Interface Builder.
Swift
54
star
7

Stack

A Type-Safe, Thread-Safe-ish approach to CoreData in Swift
Swift
48
star
8

SwiftUIPlus

SwiftUI additions and helpers that are missing from the official implementation.
Swift
24
star
9

Color

A Swifty type-safe abstraction around color models
Objective-C
23
star
10

Feedback

Familiar, easy state-driven haptics, audio and more
Swift
22
star
11

ColumnView

A column-view navigation controller that behaves similarly to Files and Finder
Swift
21
star
12

Logging

Apple's SwiftLog + OSLog style StringInterpolation
Swift
16
star
13

Objective-C-Style-Guide

Objective-C Style Guide
15
star
14

SwiftUIBackportsDemo

A collection of Demo's for the SwiftUI Backports.
Swift
15
star
15

SwiftBackports

A collection of Swift backports for earlier versions of iOS, macOS, tvOS and watchOS
Swift
13
star
16

Abracadabra

A truly plug 'n' play solution for securing your code.
Objective-C
12
star
17

Snaply

Drop-in snapping behaviour for any scroll/collection/table/view using arbitrary points!
Swift
9
star
18

CornerMasking

SPXMasking is category on CALayer that allows you to specify different a corner radius for each corner of a CALayer.
Objective-C
8
star
19

MarkdownTextDemo

A demo app for showcasing the MarkdownText library.
Swift
7
star
20

SVGRenderer

An SVG renderer using the familiar GraphicsRenderer API.
Swift
6
star
21

ActivityView

Moved to SwiftUI-Plus/ActivityView
5
star
22

Storage

Moved to SwiftUI-Plus/DefaultStorage
5
star
23

Media

Moved to SwiftUI-Plus/Media
5
star
24

ghost-app-extract

Allows you to create better excerpt's in your Ghost blog posts.
JavaScript
4
star
25

AppManifest

Swift
4
star
26

SwiftLayout

A Swift library for programmatically dealing with AutoLayout
Swift
4
star
27

FlowLayout-Demo

A high-performance flow layout that provides global headers, footers, section backgrounds and various configurations.
Swift
4
star
28

Endpoints

A generic Swift networking library inspired by SwiftUI APIs
Swift
4
star
29

Analytics

Swift
3
star
30

PhotoLibrary

Photo library picker for iOS
Swift
2
star
31

primo

The first script to install a newly installed Mac! This will install common terminal utilities & applications.
Shell
2
star
32

Whos-Who

Who's Who sample code for job interview.
Objective-C
2
star
33

SPXLayout

AutoLayout the programmatic way
Objective-C
2
star
34

SPXSubscripting

This is a library for adding subscripting support to various Foundation classes. It also adds some interesting solutions to working with NSString's, NSAttributedString's and their attributes.
Objective-C
2
star
35

SPXDataSources

DataSource implementations for UITableView and UICollection, plus more...
Objective-C
2
star
36

Populate

Data providers for populating your data views.
Swift
2
star
37

bash

Various bash scripts I've written to simply my development and sometimes just to make me smile.
Shell
2
star
38

DownloadService

A Swift service for handling downloads and their associated resources.
Swift
1
star
39

SwiftHelpDemo

A demo project for showcasing SwiftHelp
Swift
1
star
40

SwiftHelp

A SwiftUI library for building interactive help systems in your apps
Swift
1
star
41

Development-Environment

All files, settings and configurations I use for my Development Environment's
1
star
42

FlowLayout

A high-performance flow layout that provides global headers, footers, section backgrounds and various configurations.
Swift
1
star
43

SPXCacheManager

A highly configurable and reusable library for handling caching in your iOS apps. Not only for images!!
Objective-C
1
star
44

SPXKeychain

My iOS Keychain Wrapper
Objective-C
1
star
45

PGTest-XCTest

Swift
1
star
46

ScaledMetric

A SwiftUI dynamic property wrapper (a back-port) that scales a numeric value. iOS, macOS, tvOS, watchOS
Swift
1
star
47

Snippex

My own personal library of reusable code that compiles and standardises some classes across iOS and OSX.
Objective-C
1
star
48

CellProvider

A generic cell provider implementation in Swift
Shell
1
star