• Stars
    star
    371
  • Rank 112,102 (Top 3 %)
  • Language
    Swift
  • License
    The Unlicense
  • Created almost 5 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

Clip is a clipboard manager for iOS that can monitor your clipboard indefinitely in the background โ€” no jailbreak required.

Clip

Clip is a clipboard manager for iOS that can monitor your clipboard indefinitely in the background โ€” no jailbreak required.

Swift Version License: Unlicense PRs Welcome

Clip is a simple clipboard manager for iOS. Unlike other clipboard managers available in the App Store, Clip is able to monitor your clipboard indefinitely in the background. This is accomplished through a combination of hacks and workarounds, none of which would pass App Store review. For that reason, Clip is only available to download through AltStore โ€” my alternative app store for non-jailbroken devices โ€” or by compiling the source code yourself.

Features

  • Runs silently in the background, monitoring your clipboard the whole time.
  • Save text, URLs, and images copied to the clipboard.
  • Copy, delete, and share clippings.
  • Customizable history limit.

Requirements

  • Xcode 11
  • iOS 13
  • Swift 5+

Project Overview

All things considered, Clip is a very simple app. The core app target can be mentally divided up into UI and logic, while each additional target serves a specific role.

App UI

The entire UI is implemented with just two view controllers:

HistoryViewController
The main screen of Clip. A relatively straightforward UITableViewController subclass that fetches recent clippings from Clipโ€™s persistent store and displays them in a table view.

SettingsViewController
The settings screen for Clip. Another UITableViewController subclass that displays all Clip settings in a list, but is presented as a popover due to limited number of settings.

App Logic

The app logic for Clip is relatively straightforward. Most is self-explanatory, but there are two classes that serve particularly important roles:

PasteboardMonitor
As you might have guessed from the name, this class is in charge of listening for changes to the clipboard. Since UIPasteboardChangedNotification is only received when the app is in the foreground, this class uses the private Pasteboard.framework to start sending system-wide Darwin notifications whenever the clipboardโ€™s contents change. Once a change is detected, PasteboardMonitor presents a local notification that can be expanded by the user to save their clipboard to Clip.

ApplicationMonitor
This class manages the lifecycle of Clip. Specifically, it is in charge of playing a silent audio clip on loop so Clip can run indefinitely in the background, as well as presenting a local notification whenever Clip stops running (for whatever reason).

ClipKit

ClipKit is a shared framework that includes common code between Clip, ClipboardReader, and ClipBoard. Notably, it contains all model + Core Data logic, so that Clip and each app extension can access the same persistent store with all clippings.

ClipboardReader

ClipboardReader is a Notification Content app extension used to read the clipboard while Clip is running in the background. When Clip detects a change to the clipboard, it will present a local notification. If this notification is expanded, ClipboardReader will be launched and save the contents of the clipboard to disk before dismissing the now-expanded notification.


ClipboardReader in action.

ClipBoard

ClipBoard is a Custom Keyboard app extension that provides quick access to your recent clippings when editing text. This feature is still being worked on, so it is only available in beta versions of Clip for now.

Roxas

Roxas is my internal framework used across all my iOS projects, developed to simplify a variety of common tasks used in iOS development. For more info, check the Roxas repo.

Compilation Instructions

Clip is very straightforward to compile and run if you're already an iOS developer. To compile Clip:

  1. Clone the repository
    https://github.com/rileytestut/Clip.git
    
  2. Update submodules:
    cd Clip 
    git submodule update --init --recursive
    
  3. Open Clip.xcworkspace and select the Clip project in the project navigator. On the Signing & Capabilities tab, change the team from Yvette Testut to your own account.
  4. Build + run app! ๐ŸŽ‰

Licensing

Unlike my other projects, Clip uses no 3rd party dependencies. This gives me complete freedom to choose the license I want, so Iโ€™m choosing to release the complete Clip source code into the public domain. You can view the complete โ€œunlicenseโ€ here, but the gist is:

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

Contact Me

More Repositories

1

Delta

Delta is an all-in-one classic video game emulator for non-jailbroken iOS devices.
Swift
4,493
star
2

AltSign

Objective-C
298
star
3

SNES4iOS

A modification of SNES--HD- by WoozleWrangler that can now be run on non-jailbroken iPhones, iPod Touches, and iPads! This is possible thanks to Spencer Nielsen and his script removing jailbreak-specfic features (http://www.aorensoftware.com/blog/2011/05/23/play-snes-games-on-your-ipad-without-jailbreaking/)
C++
264
star
4

DeltaCore

Swift
148
star
5

AltServer-Windows

C
140
star
6

Roxas

Objective-C
119
star
7

N64iOS

n64ios
C
54
star
8

GBA4iOS-2.0-Beta

GBA4iOS rewritten from the ground up
C++
48
star
9

NDS4iOS

A Nintendo DS Emulator for iOS. Based off of angelXwind's nds4ios project (https://github.com/angelXwind/nds4ios)
Objective-C
38
star
10

ldid

Fork of saurik's ldid as used in AltStore.
C++
33
star
11

DeltaLite

Swift
30
star
12

GBADeltaCore

C++
25
star
13

SNESDeltaCore

Objective-C++
23
star
14

RSTWebViewController

A simple, yet powerful, in-app web browser for your iOS application
Objective-C
22
star
15

N64DeltaCore

Objective-C
21
star
16

GBCDeltaCore

Objective-C++
20
star
17

NESDeltaCore

C++
19
star
18

Harmony

Swift
17
star
19

MelonDSDeltaCore

Objective-C++
17
star
20

Pebble-Communicator

An iOS app that allows two-way communication between an iOS Device and its connected Pebble Watch.
Objective-C
16
star
21

libimobiledevice

C
16
star
22

GBA4vOS

Swift
15
star
23

GPGXDeltaCore

Swift
12
star
24

DSDeltaCore

Objective-C++
9
star
25

RSTWebViewController-Legacy

iOS 7 Web Browser used in GBA4iOS. Work in progress
Objective-C
8
star
26

Harmony-Dropbox

Swift
6
star
27

GPUImageGlitchSampleApp

A sample app to demonstrate a glitch in GPUImage
Objective-C
5
star
28

Harmony-Drive

Swift
4
star
29

Prime

Swift
4
star
30

Spark-iOS

Swift
3
star
31

swift-proposals

2
star
32

Quark

Project developed for HackSC 2015
Objective-C
2
star
33

RSTToastView

Objective-C
2
star
34

Shoot-Around

My very first iOS app, developed when I was 13.
Objective-C
2
star
35

Test-Git

Testing Git
2
star
36

Feast

Swift
1
star
37

Flint

Swift
1
star
38

Sweeten

Small Swift script to sanitize Xcode's automatically generated Core Data files
Swift
1
star
39

Eats

Swift
1
star
40

Sora

Swift overlay for Roxas Objective-C framework.
Swift
1
star