PinpointKitis an open-source iOS library in Swift that lets your testers and users send feedback with annotated screenshots and logs using a simple gesture.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.0.0+ is required to build PinpointKit.
To integrate PinpointKit into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! pod 'PinpointKit', '~> 0.9'
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update $ brew install carthage
To integrate PinpointKit into your Xcode project using Carthage, specify it in your Cartfile
:
github "Lickability/PinpointKit" ~> 0.9
carthage update
to build the framework. PinpointKit.framework
from the Carthage build folder into the “Embedded Binaries” section. If you prefer not to use either of the aforementioned dependency managers, you can integrate PinpointKit into your project manually.
cd
into your top-level project directory, and run the following command if your project is not initialized as a git repository: $ git init
$ git submodule add -b master https://github.com/Lickability/PinpointKit.git
Open the new PinpointKit/PinpointKit
folder, and drag the PinpointKit.xcodeproj
into the Project Navigator of your application’s Xcode project.
It should appear nested underneath your application’s blue project icon. Whether it is above or below all the other Xcode groups does not matter.
Select the PinpointKit.xcodeproj
in the Project Navigator and verify the deployment target matches that of your application target.
+
button under the “Embedded Binaries” section. PinpointKit.xcodeproj
folders each with two different versions of the PinpointKit.framework
nested inside a Products folder. Select the top PinpointKit.framework
for iOS.
And that’s it!
The PinpointKit.framework
is automatically added as a target dependency, linked framework and embedded framework in a “Copy Files” build phase which is all you need to build on the simulator and a device.
Once PinpointKit is installed, it’s simple to use.
To display a feedback view controller, add the following code where you want the feedback to display, passing the view controller from which PinpointKit should present:
PinpointKit.defaultPinpointKit.show(fromViewController: viewController)
If you want to have the feedback view display from a shake gesture, simply do the following in your UIApplicationDelegate
class:
lazy var window: UIWindow? = return ShakeDetectingWindow(frame: UIScreen.mainScreen().bounds)
If you don't want to use defaultPinpointKit
you can specify both Configuration
and PinpointKitDelegate
instances on initialization of PinpointKit
.
The Configuration
struct allows you to specify how the feedback view looks and behaves, while the PinpointKitDelegate
instance provides hooks into the state of the feedback being sent.
PinpointKit uses a protocol-oriented architecture which allows almost everything to be customized. Here are some examples of what’s possible:
JIRASender
that conforms to Sender
, allowing users to send feedback directly into your bug tracker. LogCollector
LogViewer
. For more information on what you can customize, take a peek the documentation of Configuration
.
PinpointKit is available under the MIT license. See the LICENSE
file for more information.
PinpointKit is built and maintained by Lickability , a small software studio in New York that builds apps for clients and customers. If you or your team need help building or updating an app, say hello@lickability.com . We’d love to hear more about your project.
Huge thanks to our othercontributors, including Kenny Ackerson , Paul Rehkugler , and Caleb Davenport .