GithubHelp home page GithubHelp logo

michaelmkenny / ios-13-light-dark-wallpaper-app Goto Github PK

View Code? Open in Web Editor NEW
59.0 5.0 6.0 3.8 MB

A private-framework app for setting separate light and dark mode wallpapers on iOS 13.

License: MIT License

Objective-C 98.10% C 1.90%

ios-13-light-dark-wallpaper-app's Introduction

Set Light and Dark Mode Wallpapers for iOS 13

This is a proof-of-concept app that allows you to set separate light and dark wallpapers, just like the Shortcuts app allowed, before it was removed.

This was achieved through reverse-engineering Apple's private frameworks. The relevant ones were: "SpringBoardFoundation.framework", and "SpringBoardUIServices.framework".

Basically the trick that took me forever to figure out was the missing private entitlement com.apple.springboard.wallpaper-access. Because that entitlement is required, this app can't be built and signed onto a real device, only the Simulator and Jailbroken devices :(

App with light and dark wallpapers ready to be set

Installation Instructions (for jailbroken devices only):

I wasn't able to install this on a real device, as an ipa file. The only thing that seemed to work for me was to copy the .app into /Applications.

I'm not responsible for anything bad that happens to your device. Only perform these steps if you know what you are doing. I'm just trying to share my work. You have been warned.

In the following instructions please replace Your-iPhone.local with either your iPhone's name or IP address.

Before doing these steps, install AppSync Unified from the https://cydia.akemi.ai/ repo in Cydia.

  1. On your computer, unzip the downloaded release zip file containing the .app folder.

  2. scp the .app folder into /Applications folder on your device, from your local computer. Run this command in the Terminal (This is probably going to ask you for your password. By default, if you haven't changed it, it should be alpine):

    scp -rp ~/Downloads/Set\ Wallpaper.app [email protected]:/Applications/

  3. SSH into your device, and chmod the .app directory to have correct permissions. Run these lines in the Terminal:

    ssh [email protected] chmod -R g+w "/Applications/Set Wallpaper.app/"

  4. While still SSHed into your device, refresh your homescreen with the changes by running this line:

    uicache

  5. Exit your SSH session by typing

    exit

  6. Check your homescreen, launch, have fun.

If you wish to uninstall Set Wallpaper in the future just ssh back into your device and run these lines:

rm -r /Applications/Set\ Wallpaper.app/ uicache

Be very sure to copy the first line correctly, as you might blow away all your system applications, which would be very bad!

ios-13-light-dark-wallpaper-app's People

Contributors

michaelmkenny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ios-13-light-dark-wallpaper-app's Issues

Can't display Set Wallpaper

When I open "Set Wallpaper.app" with iPhone SE, I cannot see and cannot click the "Set Wallpaper" button to set the wallpaper
But "Set Wallpaper.app" works fine on iPhone 7
32ABB90B61F8FFCD1164CA28C704FE62

Disable “perspective zoom” (parallax)

Could you please compile a version of this app that doesn’t enable parallax on wallpapers, or possibly add a switch for toggling this behavior? I'm really enjoying your app, but I wish it didn’t cut off parts of my wallpaper because of this. Best regards.

Creating a Tweak on Jailbroken Device

I am trying to create a tweak in theos to utilize the SBSUIWallpaperSetImages symbol , but I get null from the dlsym function. Is there a specific entitlement required when jailbroken to get this working?

        void *sbsUILib = dlopen("/System/Library/PrivateFrameworks/SpringBoardUIServices.framework", RTLD_LAZY);
        int (*_SBSUIWallpaperSetImages)(id imageDict, id optionsDict, int locations, int interfaceStyle) = (int (*)(id imageDict, id optionsDict, int locations, int interfaceStyle)) dlsym(sbsUILib, "SBSUIWallpaperSetImages");
        _SBSUIWallpaperSetImages(@{@"light": newResizedImage, @"dark": newResizedImage},
                          @{@"light": lightOptions, @"dark": darkOptions},
                         (int)whereToApply,
                         UIUserInterfaceStyleDark);

Any help will be greatly appreciated as before iOS13, I was using the following code & it was working fine to change wallpapers, but on iOS13 this code causes the springboard to freeze/crash

          PLStaticWallpaperImageViewController *wallpaperController = [[PLStaticWallpaperImageViewController alloc] initWithUIImage:newResizedImage];

          object_setInstanceVariable(wallpaperController, "_wallpaperMode", 2);
          [wallpaperController _savePhoto];
          [wallpaperController setWallpaperForLocations:2]; 

Zoomed

Solved Was an issue. Hi no matter what I do the wallpaper is always zoomed?

Crash occurred after Set Wallpaper button

Here, this is library which found via stack overflow.
I believe this source have worked 100% prior to iOS 13 or below. Now, Trying this in iOS 16 and Xcode 14, found crash after uploading both images and click Set Wallpaper. crash occurred at below line,

  _SBSUIWallpaperSetImages(@{@"light": lightImage, @"dark": darkImage},
                             @{@"light": lightOptions, @"dark": darkOptions},
                             locations,
                             UIUserInterfaceStyleDark);

The log,

Class SBFCARendererImageRepresentation is implemented in both /Users/azeemazeez/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SpringBoardFoundation.framework/SpringBoardFoundation (0x1171f9028) and /Users/azeemazeez/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PaperBoardUI.framework/PaperBoardUI (0x115223218). One of the two will be used. Which one is undefined.

the last line from crash log says, One of the two will be used. Which one is undefined.
may be this could be reason, could you help in this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.