JubeatPlus 3.9.11
Loading...
Searching...
No Matches
SystemUtilities.h File Reference

Thin wrappers over UIKit, Core Animation, and the file system. More...

import <Foundation/Foundation.h>
import <QuartzCore/QuartzCore.h>
import <UIKit/UIKit.h>
Include dependency graph for SystemUtilities.h:

Go to the source code of this file.

Functions

NS_ASSUME_NONNULL_BEGIN CGRect GetMainScreenBounds (void)
 Returns the main screen's bounds, in points.
void PauseLayerAnimation (CALayer *pLayer)
 Freezes a layer's animations in place, the standard Core Animation "pause layer" idiom.
void ResumeLayerAnimation (CALayer *pLayer)
 Resumes a layer frozen by PauseLayerAnimation without the animation jumping.
void ExcludeUrlFromICloudBackup (NSURL *pUrl)
 Marks a file URL so that iCloud and iTunes will not back it up.
BOOL IsAppGroupContainerAvailable (void)
 Reports whether the shared App Group container directory exists on disk.
void SaveStickerToAppGroupContainer (NSString *pszFileName, id pInfo, NSData *pData)
 Writes sticker data into the shared App Group container and records it in the index.

Detailed Description

Thin wrappers over UIKit, Core Animation, and the file system.

Reconstructed from Ghidra program Jubeat (image base 0x100000000). All

Ghidra address:
values are offsets relative to that image base.

These are genuine free functions: none takes a receiver argument and none belongs to a class, so the reconstruction rules' search for an owning class is exhausted and they stay free functions. They sit consecutively in the binary and each wraps a system framework, so they are grouped here following the ImageLoading.h and Md5Utilities.h precedent. The file's name is this tree's own; no embedded __FILE__ has been located for any of them.

Function Documentation

◆ ExcludeUrlFromICloudBackup()

void ExcludeUrlFromICloudBackup ( NSURL * pUrl)

Marks a file URL so that iCloud and iTunes will not back it up.

Sets NSURLIsExcludedFromBackupKey to YES on the URL. The NSError out-parameter is written but never examined, so a failure is silent; if the URL is not a file URL, or the file does not yet exist, the attribute is simply not applied. The URL is not nil-checked. This is the standard fix for the App Store rejection about storing cache data in a backed-up directory.

Parameters
pUrlA file URL.
Ghidra address:
0x7fdcc

◆ GetMainScreenBounds()

NS_ASSUME_NONNULL_BEGIN CGRect GetMainScreenBounds ( void )

Returns the main screen's bounds, in points.

A one-liner over [UIScreen mainScreen].bounds . Reports the full screen bounds, ignoring safe-area insets and interface orientation, so on a rotated device the width and height are not swapped.

Returns
The main screen's bounds, in points.
Ghidra address:
0x7fd50

◆ IsAppGroupContainerAvailable()

BOOL IsAppGroupContainerAvailable ( void )

Reports whether the shared App Group container directory exists on disk.

Resolves the container URL for the group identifier and tests its path with -fileExistsAtPath: . If the app group is not provisioned the URL is nil, so the path is nil and the existence test returns NO ; the nil chain is never checked explicitly but degrades to the correct answer. Gates the sticker-sharing feature, which is backed by SaveStickerToAppGroupContainer .

Returns
YES if the container directory exists, NO otherwise.
Ghidra address:
0x7fe64

◆ PauseLayerAnimation()

void PauseLayerAnimation ( CALayer * pLayer)

Freezes a layer's animations in place, the standard Core Animation "pause layer" idiom.

Captures the layer's current local time with -convertTime:fromLayer: BEFORE dropping the speed to zero, because once the speed is zero the layer's local time stops advancing; the captured time is then written back through -setTimeOffset: . The exact inverse of ResumeLayerAnimation . The layer is not nil-checked; a nil layer makes every send a silent no-op.

Parameters
pLayerThe layer to freeze.
Ghidra address:
0x7fc24

◆ ResumeLayerAnimation()

void ResumeLayerAnimation ( CALayer * pLayer)

Resumes a layer frozen by PauseLayerAnimation without the animation jumping.

Reads back the stashed timeOffset , restores the speed to one, clears both timeOffset and beginTime , then shifts beginTime forward by the wall-clock time spent paused so the animation continues from where it stopped. -setBeginTime: is sent twice, first with zero and then with the real offset, because the intervening -convertTime:fromLayer: reads beginTime and it must be cleared first. Only meaningful on a layer previously passed to PauseLayerAnimation ; the layer is not nil-checked.

Parameters
pLayerThe layer to resume.
Ghidra address:
0x7fc98

◆ SaveStickerToAppGroupContainer()

void SaveStickerToAppGroupContainer ( NSString * pszFileName,
id pInfo,
NSData * pData )

Writes sticker data into the shared App Group container and records it in the index.

Writes pData into the group container under pszFileName, and on success adds a filename-to-info mapping to the shared NSUserDefaults suite that the share extension reads. The index is only touched when the write succeeds, so it never references a missing file. A failed write is silent: the caller cannot tell the sticker was not saved. The stored index is copied to an immutable dictionary before being written, because NSUserDefaults will not store a mutable container, and -synchronize is called explicitly.

Parameters
pszFileNameThe path component inside the container, which is also the index key.
pInfoThe value stored under that key. Must be a property-list type.
pDataThe payload written to disk.
Ghidra address:
0x7ff10