Swiftpack.co - xtone/SwiftAutoScreenShot as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by xtone.
xtone/SwiftAutoScreenShot 2024_0422_ver0.10095
Auto Screen Shot Library
⭐️ 0
🕓 3 days ago
iOS
.package(url: "https://github.com/xtone/SwiftAutoScreenShot.git", from: "2024_0422_ver0.10095")

SwiftAutoScreenShot

"SwiftAutoScreenShot" is a library for semi-automatically creating and simultaneously sending screenshots of your app to the XXX service

Features

  • Semi Automatically take screenshots of your app
  • Full Screen screenshots contains scroll of your app
  • Automatically Upload screenshot to XXX

Requirements

  • iOS 15.0+
  • Xcode 13.0+
  • Swift 5.5+

Installation

Swift Package Manager

Add the following line to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/xtone/SwiftAutoScreenShot", .branch("main")),
]

or Please select PackageDependencies and search for SwiftAutoScreenShot. Afterwards, select branch and main under Dependency Rule.

Info.pist

To save screenshots to your device, please set the Privacy - Photo Library Usage Description in your info.plist.

Usage

Setup

To use SwiftAutoScreenShot, first obtain the apiKey and project ID from the web page, and then perform the initialization process in the AppDelegate.

import SwiftAutoScreenShot

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    AutoScreenShot.shared.setup(apiKey: "your api key", projectId: "your project id")
}

TakeScreenShot

Below is a simple sample code for taking a screenshot. Please check the Usage for more details.

import SwiftAutoScreenShot
import UIKit

class SampleViewController: UIViewController {

    override func viewDidAppear() {
        super.viewDidAppear()

        AutoScreenShot.shared.takeScreenShot(self)
    }
}

Detailed references can be found here.

Tips

Tips is here

known issue

Screenshots cannot be obtained in the following cases:

There may be cases where the progress indicating the upload progress of screenshots is not displayed.

Due to a bug in Xcode, it is no longer possible to specify multiple targets. This issue has been confirmed to be fixed in Xcode 14.3. Additionally, when specifying multiple targets, please add them in the project settings under General > Frameworks, Libraries, and Embedded Content.

GitHub

link
Stars: 0
Last commit: 4 days ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

remove matching sequence
4 days ago

2024_0422_ver0.10095

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics