Update uYouPlus.xm

This commit is contained in:
aricloverEXALT 2025-01-14 17:20:31 -06:00 committed by GitHub
parent 163599f0f6
commit 4867db8002
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,6 +17,34 @@ NSBundle *uYouPlusBundle() {
NSBundle *tweakBundle = uYouPlusBundle();
//
// activities API
@import ActivityKit;
@interface NoActivityAttributes : NSObject <ActivityAttributes>
@end
@implementation NoActivityAttributes
@end
NoActivityAttributes *attributes = [[NoActivityAttributes alloc] init];
Activity<NoActivityAttributes *> *activity = [Activity<ActivityContent<NoActivityAttributes *> > createActivityWithAttributes:attributes];
[activity startWithContent:[[ActivityContent alloc] init] completion:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to start Live Activity: %@", error);
} else {
NSLog(@"Live Activity started successfully");
}
}];
[activity endWithCompletion:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to end Live Activity: %@", error);
} else {
NSLog(@"Live Activity ended successfully");
}
}];
// Notifications Tab appearance
UIImage *resizeImage(UIImage *image, CGSize newSize) {
UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0);