Skip to content

Multiple issues (return values) #8

@Randy-420

Description

@Randy-420

The method (¿sometimes?) doesn't return anything if return value not overriden (it should return %orig;)
Also, when setting an id to an int, you need to use

origValue = [NSString stringWithFormat:@"[NSNumber numberWithInteger:%@]", origValue];

Here's the code that gets generated for the different id options

#import <UIKit/UIKit.h>

%hook HGYLaunchScreenController
-  (long long)numberOfSectionsInCollectionView:(id)arg1 {
arg1 = @"B";
return %orig;
}
%end

%hook HGYLaunchScreenController
-  (long long)collectionView:(id)arg1 numberOfItemsInSection:(long long)arg2 {
arg1 = 6;
return %orig;
}
%end

%hook HGYLaunchScreenController
-  (id)collectionView:(id)arg1 cellForItemAtIndexPath:(id)arg2 {
arg2 = @"FLDate:2022-05-03T12:27:09-0400";
arg1 = [UIColor colorWithRed:255/255.0 green:127/255.0 blue:0/255.0 alpha:255/255.0];
}
%end

%hook HGYLaunchScreenController
-  (void)collectionView:(id)arg1 willDisplayCell:(id)arg2 forItemAtIndexPath:(id)arg3 {
arg1 = 6;
return %orig;
}
%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