From 4867db80024f60bdd1a3271371f60e0eb4955e89 Mon Sep 17 00:00:00 2001 From: aricloverEXALT <157071384+aricloverEXALT@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:20:31 -0600 Subject: [PATCH] Update uYouPlus.xm --- Sources/uYouPlus.xm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 255665a..c3f71d1 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -17,6 +17,34 @@ NSBundle *uYouPlusBundle() { NSBundle *tweakBundle = uYouPlusBundle(); // +// activities API +@import ActivityKit; + +@interface NoActivityAttributes : NSObject +@end + +@implementation NoActivityAttributes +@end + +NoActivityAttributes *attributes = [[NoActivityAttributes alloc] init]; +Activity *activity = [Activity > 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);