Changes screen gamma on iOS, no jailbreak required

Related tags

Image GammaThingy
Overview

GammaThingy

Changes screen gamma on iOS, no jailbreak required

RIP official sideload f.lux (https://justgetflux.com/sideload/) 😢

With the new Night Shift feature on iOS 9.3, this is pretty much obsolete. Unfortunately 32-bit devices can't use Night Shift, so this project might still be useful to some.

Important Information

This project is in no way associated with f.lux.

I talked with Britta Gustafson about this idea/project at jailbreakcon 2015, and she felt that I should contact the developers of f.lux before publicly releasing anything to do with changing the screen temperature. I know they don't have a monopoly on it, but they care very deeply about what they work on and have poured their lives into a piece of software which they feels improves the lives of others (which it does). Aside from that, f.lux has a home on practically every jailbroken phone, and I wouldn't want to hurt the feelings of anyone so important to the jailbreaking community by making a cheap knockoff of their work just for fun. Besides all that, this is not nearly as complex or well-designed as the actual f.lux application and most likely will never come close. The developers of f.lux have spent a lot of time perfecting what they do.

License

I don't know which license matches this so I'm going to write it out. You can do what you want with the code, but do not distribute compiled copies of the app, especially on mass download sites.

Compiling

This can't be compiled for or run in the simulator so don't try it, it won't work.

Troubleshooting

If you find the display glitching while GammaThingy is enabled, ensure that you have disabled Reduce White Point in iOS Settings / General / Accessibility / Increase Contrast

URL Scheme Support

GammaThingy supports URL schemes to switch the orangeness.
For the base URL gammathingy://orangeness/switch those (optional) parameters are available:

  • enable to toggle orangeness on / off (for values 1/0), if not provided, the orangeness is just switched
  • x-source to supply a protocol to open after switching orangeness (e.g. to switch back to another app)
  • close to make the app quit after the action was executed if its value is 1

Examples:
gammathingy://orangeness/switch?enable=1&x-source=prefs enables orangeness and then attempts to open the Preferences.app
gammathingy://orangeness/switch?close=1 switches orangeness and closes the app afterwards

Comments
  • Today Widget

    Today Widget

    I'm having trouble with Background App Refresh triggering, in addition to an URL scheme as suggested by another user can help alleviate the issue perhaps a slider widget in the Today section of Notification Center can also help quick management.

    I know as the night goes on I like to make the screen warmer and warmer, so a Today widget would also help in that regard.

    Thanks so much for open-sourcing this. My eyeballs and sleep cycle are grateful!

    opened by ylor 19
  • Background Refresh

    Background Refresh

    Added preparations for background refresh without depending on the iOS background refreshing using this solution.

    This solution could also enable a transition animation equally to f.lux.

    Also a small design change: App is now longer named "GammaTest" on SpringBoard but "Gamma Thingy"

    opened by ANGOmarcello 18
  • Automatic change of color

    Automatic change of color

    Would it be possible to include automatic change of color based on user location? solar.c from redshift source (GPLv3) should help in implementation of this function.

    opened by tymmej 11
  • Background Fetch Alternative

    Background Fetch Alternative

    Recently I saw some discussion here on this problem. Right now we use background refresh to check if the screen temperature must change, however this isn't very reliable, because it requires the screen to be enabled to change the colour. Now the latest problems with battery of the Facebook app set me thinking. What if we let the background fetch determine whether it's time to switch, and as soon it's time to switch we enable 'Audio background' playing. This allows the app to change the screen colour as soon as the device is unlocked, because it can continuously run in the background. We disable the 'Audio background' thereafter to keep the battery usage to a minimum. I might be wrong on this idea, because I've never played around with the 'Audio background' mode. What do you think?

    opened by CasperCL 9
  • URL Scheme support?

    URL Scheme support?

    It would be awesome if the app could support URL schemes, so we can automate dimming with Workflow/Launch Center Pro!

    (Disclosure: I'm not an iOS dev, no idea how easy this would be but I think it would be a perfect addition! Also, this would be a nice place to say: my eyes thank you for the app, it's great! :) )

    opened by jeffreykuiken 7
  • No non-expired provisioning profiles were found?

    No non-expired provisioning profiles were found?

    Hello,

    I'm new to this so sorry if it is a stupid question, but when I open GammaTest.xcodeproj in Xcode 7.0.1, I get a yellow triangle with an exclamation point that said "Applications using launch screen files and targeting iOS 7.1 and earlier need to also include a launch image in an asset catalog." I have OSX 10.10.5 and am trying to install GammaThingy on an iOS 9.0.2 device. I also get another warning, an exclamation point in a stop sign, reading "No provisioning profiles found: No non-expired provisioning profiles were found." It then says "Failed to code sign" when I attempt to build on the device, prompting me to "Fix Issue". It goes through a loading screen and then says "An App ID with Identifier 'me.thomasfinch.GammaThingy' is not available. Please enter a different string." and does not complete the build. How can I resolve this issue? Thanks for your time and for building this.

    opened by athyman 5
  • Not obsolete for people with older ipad/ipod/iphone

    Not obsolete for people with older ipad/ipod/iphone

    I just discover with iOs 9.3 beta 5 that the Redshift option is not available on my first generation ipad mini!!!! Seems it will not be available on any older 32bit tablet/phone because of a performance issue!!! I never add performance issue with Flux or Gammathingy... Apple marketing...

    opened by dantahoua 4
  • No IOMobileFramebuffer

    No IOMobileFramebuffer

    ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/PrivateFrameworks' ld: framework not found IOMobileFramebuffer clang: error: linker command failed with exit code 1 (use -v to see invocation)

    opened by oc-tk 4
  • Today Extension using App Groups

    Today Extension using App Groups

    #33 introduced a basic widget. I've been looking into a full widget. Since this required quite a bit of more work, I made this a new PR.

    alt text

    UI and functions are simple but it's a good base to work from. I've been running this for a few days and it's quite stable.

    Main Changes

    App Groups

    Extension and host app live in separate processes. They can only talk by using App Groups. Changing to app groups requires a bit of work:

    • Enabling App Group Capability for both host and extension.
    • Adding a group identifier, usually group.<main bundle ID>.

    Problem: As with the main bundle ID, it seems we can’t share a group ID. Everyone has their own. The best I came up with:

    • Adding a project setting APP_GROUP_IDENTIFIER for everybody to set their group ID.
    • In code, getting the identifier from the Info.plist.
    NSUserDefaults
    • To share defaults, now use [[NSUserDefaults alloc] initWithSuiteName:<group ID>] instead of standardUserDefaults. I added a category so we can just call [NSUserDefaults groupDefaults].
    • Call [defaults synchronize] when making changes.
    • It seems NSUserDefaultsDidChangeNotification won't get delivered between widget and app.
    GammaController

    App and widget have their own GammaController class which write to their own gammatable.dat file. This leads to the problem where the widget initializes its file with already modified gamma data instead of the default screen values (or vice versa). It will then use this wrong data as the base level for adjustments.

    I changed it to write the gammatable.dat into the shared app group space. Works for now but is not protected against concurrent writes. Although it's unlikely widget and app will write at the same time, this should be resolved. Maybe there is a better solution altogether that does not clutter GammaController with app group related stuff.

    Problem

    The group ID stuff increases the barrier to entry for users who just want to install the thing. You now have to: (see linked screenshots)

    I'm open for contributions and happy to change stuff as needed.

    See also #14, #33.

    opened by arthurhammer 4
  • Crash when enabling GammaThingy.

    Crash when enabling GammaThingy.

    App is crashing when checking "Enabled".

    Crash reports below.

    Running iOS 9.2 on iPhone 6S.

    This is very similar to crash in GammaThingy fork GoodNight reported here.

    opened by ghost 3
  • Activating after reboot

    Activating after reboot

    When enabled is set to 1 and you reboot and open Gamma Thingy again the enabled switch is active but the effect is not present.

    Workaround: Turning enabled off and on again does help for now.

    Possible solution: Adding logic at application launch that checks for the state of enabled.

    opened by ANGOmarcello 3
  • URL for Darkroom Mode?

    URL for Darkroom Mode?

    Any chance that there'll be a URL added to enable/disable Darkroom Mode? I ask because I saw that there's now an orangeness URL to enable/disable the orange filter.

    opened by ds284 0
  • UI clarification

    UI clarification

    I'm sorry if this is a silly question, but I feel it's warranted despite the simplicity of the app: if I turn on the scheduled activation will it only work if I manually hit the enabled switch? It would appear so whenever I enable the schedule. It often doesn't yellow the screen until I manually enable the app, regardless of the time of day.

    opened by tophneal 6
  • Unable to run since last commit

    Unable to run since last commit

    Thanks for your work on this :)! I was able to use it previously, but since your latest commit, I'm getting an "EXC_BAD_ACCESS" on this line and am unable to use the app: error = IOMobileFramebufferGetGammaTable(fb, data);

    In GammaController.m. Can you look into this?

    opened by Wysie 3
  • Permanent orange filter after deleting app

    Permanent orange filter after deleting app

    After installing on my iPhone and deleting the app the orange filter still remains.

    Powering off and restarting the phone returns the screen to normal but as soon as I reinstalled the app and tuned on the filter again, it was like I had two filters on at the same time, one permanent and the other controlled by the app.

    The result is that, using the app, I can increase the orange level up to extremely orange but I am not able to turn it off.

    Is there a way to undo this and return the app and my phone to normal behaviour?

    opened by paul31 4
  • Red Tint after disabling orangeness

    Red Tint after disabling orangeness

    Even after disabling the tweak there is a light red tint that covers the whole screen ( which is different from the orange tint). (iPhone 6+ 9.0.2) Maybe a mixup with restoring the original gamma tables?

    opened by atomikpanda 0
Owner
Thomas Finch
Thomas Finch
The first non-jailbroken iOS (and macOS) application to adjust the screen temperature, brightness, and color!

GoodNight Project name thanks to @Emu4iOS. Based off of Thomas Finch's GammaThingy. GoodNight is an app that allows you to directly access the screen'

Anthony Agatiello 558 Nov 3, 2022
Screen translator for macOS with Apple Vision API and IBM Watson, Google Cloud Translator

Swifty-OCR-Translator Screen translator for macOS with Apple Vision API and IBM Watson, Google Cloud Translator Usage Select Translator Fill in the AP

Kwangmin Bae 21 Sep 13, 2022
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

Adnan Yousaf 11 Jan 10, 2022
A simple Image full screen pop up

CLImageViewPopup Description A simple UIImageView for easy fullscreen image pop up. No matter where your UIImageView may be. Image pops up from where

Vineeth Vijayan 36 Apr 29, 2021
Swift image slideshow with circular scrolling, timer and full screen viewer

?? ImageSlideshow Customizable Swift image slideshow with circular scrolling, timer and full screen viewer ?? Example To run the example project, clon

Petr Zvoníček 1.7k Dec 21, 2022
Roll marbles into set positions on screen

Marble-Tilt Roll Marbles into set positions on screen Paul Hudson Hacking with Swift - project 26 - Took most of the code and created my own spin on i

Scott Mayhew 0 Dec 11, 2021
Metazoom - A virtual camera plugin to pixellatedly share your screen

MetaZoom A virtual camera plugin to pixellatedly share your screen. See LICENSE.

Sahil Lavingia 22 Jan 4, 2023
A simple Image full screen pop up

CLImageViewPopup Description A simple UIImageView for easy fullscreen image pop up. No matter where your UIImageView may be. Image pops up from where

Vineeth Vijayan 36 Apr 29, 2021
Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

Jan Gorman 601 Dec 26, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.

This project is unmaintained. Alex passed away in an accident in late 2019. His love of iOS development will always be remembered. AXPhotoViewer AXPho

Alex Hill 596 Dec 30, 2022
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

Haneke 5.2k Dec 11, 2022
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

ImageDetect ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with i

Arthur Sahakyan 299 Dec 17, 2022
A lightweight and fast image loader for iOS written in Swift.

ImageLoader ImageLoader is an instrument for asynchronous image loading written in Swift. It is a lightweight and fast image loader for iOS. Features

Hirohisa Kawasaki 293 Nov 24, 2022
Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Kanvas Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Tumblr 267 Nov 24, 2022
Lightbox is a convenient and easy to use image viewer for your iOS app

Lightbox is a convenient and easy to use image viewer for your iOS app, packed with all the features you expect: Paginated image slideshow. V

HyperRedink 1.5k Dec 22, 2022
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

Evgenii Neumerzhitckii 330 Sep 9, 2022
📸 Instagram-like image picker & filters for iOS

YPImagePicker YPImagePicker is an instagram-like photo/video picker for iOS written in pure Swift. It is feature-rich and highly customizable to match

Yummypets 4k Dec 27, 2022
High-performance animated GIF support for iOS in Swift

Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a prefecture in Japan). Install Swift Package Manager Add the fo

Reda Lemeden 2.6k Jun 21, 2021