Skip to content

After Sonia 14.1, PlayTools needs another way to change frame. #125

@Ryu-ga

Description

@Ryu-ga

In PlayTools/Controls/PTFakeTouch/NSObject+Swizzle.m

[objc_getClass("FBSSceneSettings") swizzleInstanceMethod:@selector(frame) withMethod:@selector(hook_frameDefault)];
[objc_getClass("FBSSceneSettings") swizzleInstanceMethod:@selector(frame) withMethod:@selector(hook_frame)];

These methods make app crash.
I guess there is something changed in FrontBoardServices structure.
If I comment out these methods, PlayTools works but cannot change frame obviously.

/* Generated by RuntimeBrowser in Sonoma 14.1 betas
   Image: /System/Library/PrivateFrameworks/FrontBoardServices.framework/Versions/A/FrontBoardServices
 */

@interface FBSSceneSettings : FBSSettings <FBSSceneSettings, NSCopying, NSMutableCopying> {
    NSSet * _ignoreOcclusionReasons;
}

@property (nonatomic, readwrite) BOOL activityMode;
@property (getter=isBackgrounded, nonatomic, readonly) BOOL backgrounded;
@property (getter=isClientFuture, nonatomic, readwrite) BOOL clientFuture;
@property (nonatomic, readonly, copy) FBSDisplayConfiguration *displayConfiguration;
@property (nonatomic, readonly, copy) FBSDisplayIdentity *displayIdentity;
@property (getter=isForeground, nonatomic, readonly) BOOL foreground;
@property (nonatomic, readonly) struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; } frame;
@property (nonatomic, readonly) long long interfaceOrientation;
@property (nonatomic, readonly) long long interruptionPolicy;
@property (nonatomic, readwrite) BOOL jetsamMode;
@property (nonatomic, readonly) double level;
@property (getter=isOccluded, nonatomic, readwrite) BOOL occluded;
@property (nonatomic, readwrite) BOOL prefersProcessTaskSuspensionWhileSceneForeground;

+ (Class)_baseClass;
+ (Class)_diffClass;
+ (Class)_mutableClass;
+ (id)_settingsExtensionsForSceneExtension:(Class)arg1;
+ (id)settings;
+ (Class)subclassExtension;

- (void).cxx_destruct;
- (void)_appendToDescriptionBuilder:(id)arg1;
- (BOOL)_hasAdditionalDescription;
- (BOOL)_isEmptyForCoding:(BOOL)arg1;
- (BOOL)_isEqualToSettings:(id)arg1;
- (struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })bounds;
- (id)displayIdentity;
- (id)ignoreOcclusionReasons;
- (id)initWithSettings:(id)arg1;
- (BOOL)isBackgrounded;
- (BOOL)isIgnoringOcclusions;
- (id)transientLocalSettings;

@end

@interface FBSSceneSettingsCore : FBSCoreSettingsExtension <FBSSceneSettings>

@property (nonatomic, readwrite) BOOL activityMode;
@property (getter=isClientFuture, nonatomic, readwrite) BOOL clientFuture;
@property (nonatomic, readwrite, copy) FBSDisplayConfiguration *displayConfiguration;
@property (getter=isForeground, nonatomic, readwrite) BOOL foreground;
@property (nonatomic, readwrite) struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; } frame;
@property (nonatomic, readwrite) long long interfaceOrientation;
@property (nonatomic, readwrite) long long interruptionPolicy;
@property (nonatomic, readwrite) BOOL jetsamMode;
@property (nonatomic, readwrite) double level;
@property (getter=isOccluded, nonatomic, readwrite) BOOL occluded;
@property (nonatomic, readwrite) BOOL prefersProcessTaskSuspensionWhileSceneForeground;

+ (id)descriptionOfValue:(id)arg1 forSetting:(id)arg2;
+ (id)protocol;

- (BOOL)activityMode;
- (id)displayConfiguration;
- (struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })frame;
- (void)frame:(struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })arg1;
- (long long)interfaceOrientation;
- (long long)interruptionPolicy;
- (BOOL)isClientFuture;
- (BOOL)isForeground;
- (BOOL)isOccluded;
- (BOOL)jetsamMode;
- (double)level;
- (BOOL)prefersProcessTaskSuspensionWhileSceneForeground;
- (void)setActivityMode:(BOOL)arg1;
- (void)setClientFuture:(BOOL)arg1;
- (void)setDisplayConfiguration:(id)arg1;
- (void)setForeground:(BOOL)arg1;
- (void)setInterfaceOrientation:(long long)arg1;
- (void)setInterruptionPolicy:(long long)arg1;
- (void)setJetsamMode:(BOOL)arg1;
- (void)setLevel:(double)arg1;
- (void)setOccluded:(BOOL)arg1;
- (void)setPrefersProcessTaskSuspensionWhileSceneForeground:(BOOL)arg1;

@end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions