ShakeFeedbackKit

1.1.0

A Swift package that enables easy integration of a shake-to-feedback system in iOS apps, with Jira integration for bug reporting and feedback collection.
AAALI/ShakeFeedbackKit

What's New

v1.1.0 - Enhanced Annotation System with Persistent State

2025-08-03T10:15:25Z

🎨 Major Annotation System Improvements

This release brings significant enhancements to the annotation system with robust persistence, improved visual feedback, and better user experience.

✨ New Features

Robust Annotation System

  • Cross-session persistence - Annotations now persist when reopening the annotation view
  • Comprehensive undo functionality - Undo works for all annotations, including those from previous sessions
  • Clear all annotations with confirmation dialog and immediate visual feedback
  • Auto-navigation fallback - Ensures users don't stay on visually stale annotation screens
  • Dual-tracking system - Uses both UIBezierPath and raw points for reliable state management

Enhanced UI/UX

  • Visual feedback improvements - Immediate clearing or smooth auto-navigation
  • Distinct highlighter icon - Now uses crayon icon for better visual distinction
  • Better aspect-fit scaling - Annotations properly scale with screenshot dimensions

🔧 Improvements

  • Optimized drawing performance with efficient redraw logic
  • Improved annotation serialization to preserve all stroke data
  • Better state synchronization between stored and displayed annotations

🐛 Bug Fixes

  • Fixed annotation clearing not showing immediate visual feedback
  • Resolved state synchronization issues between stored and displayed annotations
  • Fixed undo functionality to work across annotation sessions
  • Eliminated layout constraint warnings and CoreGraphics errors
  • Improved annotation serialization to preserve all stroke data

📦 Installation

Swift Package Manager

.package(url: "[https://github.com/AAALI/ShakeFeedbackKit.git](https://github.com/AAALI/ShakeFeedbackKit.git)", from: "1.1.0")

ShakeFeedbackKit

A Swift package that enables easy integration of a shake-to-feedback system in iOS apps, with Jira integration for bug reporting and feedback collection.

Features

  • 📱 Detect device shake gestures in both UIKit and SwiftUI apps
  • 📸 Automatically capture screenshots when feedback is triggered
  • 📝 Allow users to add notes to their feedback
  • 🔄 Seamlessly integrate with Jira to create issues directly from your app
  • 📊 Include device metadata with each report (OS version, app version, device model, etc.)
  • ✨ Modern Swift API with async/await support

Requirements

  • iOS 15.0+
  • Swift 6.0+
  • Xcode 15.0+

Installation

Swift Package Manager

Add ShakeFeedbackKit to your project using Swift Package Manager:

  1. In Xcode, select File > Add Packages...
  2. Enter the repository URL: https://github.com/AAALI/ShakeFeedbackKit.git
  3. Select the version you want to use

Alternatively, add it as a dependency in your Package.swift file:

dependencies: [
    .package(url: "https://github.com/AAALI/ShakeFeedbackKit.git", from: "1.0.0")
]

Usage

Basic Setup

Initialize the ShakeFeedbackKit in your app delegate or at app startup:

import ShakeFeedbackKit

// In your app initialization code (e.g., app delegate or App struct)
ShakeFeedback.start(
    jiraDomain: "your-domain.atlassian.net",
    email: "your-jira-email@example.com",
    apiToken: "your-jira-api-token",
    projectKey: "YOUR_PROJECT"
)

With Custom Issue Type ID

If you need to specify a custom Jira issue type ID:

ShakeFeedback.start(
    jiraDomain: "your-domain.atlassian.net",
    email: "your-jira-email@example.com",
    apiToken: "your-jira-api-token",
    projectKey: "YOUR_PROJECT",
    issueTypeId: "10004"  // Custom issue type ID
)

Security Note

It's recommended to store your Jira API token securely and not hardcode it in your application. Consider using environment variables, secure storage, or a backend service to provide the token at runtime.

How It Works

When a user shakes their device:

  1. ShakeFeedbackKit detects the motion event
  2. A screenshot is automatically captured
  3. A feedback form is presented to the user
  4. The user can add notes to accompany their feedback
  5. The feedback is submitted to Jira as a new issue with the screenshot attached
  6. A confirmation toast is shown to the user

Advanced Usage

Using the Notification System

You can also listen for shake events directly:

import Combine
import ShakeFeedbackKit

// Set up a subscriber to listen for shake events
let cancellable = NotificationCenter.default
    .publisher(for: .deviceDidShake)
    .sink { _ in
        // Custom handling when shake is detected
        print("Device was shaken!")
    }

// Remember to store the cancellable reference

License

ShakeFeedbackKit is available under the MIT license. See the LICENSE file for more info.

Description

  • Swift Tools 6.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Aug 03 2025 03:34:05 GMT-0900 (Hawaii-Aleutian Daylight Time)