Skip to content
Guest Big Announcement

pop-up automatically in the Preference Bundle my Tweak?

Featured Replies

how to generate pop-up automatically in the Preference Bundle tweak me?

Solved by AnotherLurker

You wanna know how to add a UIalert in the preference bundle?

  • Author

You wanna know how to add a UIalert in the preference bundle?

 

I already know when the button is clicked, will pop up alerts, but what I want, when I first entered my bundle preference, immediately pop up. such preference bundlenya mario run in the setting.

I already know when the button is clicked, will pop up alerts, but what I want, when I first entered my bundle preference, immediately pop up. such preference bundlenya mario run in the setting.

This are all some different types of popups you can use.

 

https://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/?hl=%2Buialert 

In your PreferenceBundle.m file, you can add an implementation for the -viewDidLoad method

For example:

- (void)viewDidLoad {
    [super viewDidLoad];

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title"
                                                        message:@"Message"
                                                       delegate:nil
                                              cancelButtonTitle:@"Ok"
                                              otherButtonTitles:nil];
    [alertView show];
}
  • Author

 

In your PreferenceBundle.m file, you can add an implementation for the -viewDidLoad method

For example:

- (void)viewDidLoad {
    [super viewDidLoad];

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title"
                                                        message:@"Message"
                                                       delegate:nil
                                              cancelButtonTitle:@"Ok"
                                              otherButtonTitles:nil];
    [alertView show];
}

 

Thanks.. Worked!!!

  • Author

 

In your PreferenceBundle.m file, you can add an implementation for the -viewDidLoad method

For example:

- (void)viewDidLoad {
    [super viewDidLoad];

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Title"
                                                        message:@"Message"
                                                       delegate:nil
                                              cancelButtonTitle:@"Ok"
                                              otherButtonTitles:nil];
    [alertView show];
}

 

i have error like this

 

 

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/objc/NSObject.h:36:1: note:
      'retain' has been explicitly marked unavailable here
- (instancetype)retain OBJC_ARC_UNAVAILABLE;
^
FasterCharging.mm:10:83: error: ARC forbids explicit message send of 'retain'
  ...= [[self loadSpecifiersFromPlistName:@"FasterCharging" target:self] reta...
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.

My mm.

 

 

ARCHS = armv7 arm64
CFLAGS = -Wno-deprecated -Wno-deprecated-declarations
include $(THEOS)/makefiles/common.mk

BUNDLE_NAME = FasterCharging
FasterCharging_FILES = FasterCharging.mm $(shell find $(THEOS)/include/SCLAlertView -name '*.m')
FasterCharging_INSTALL_PATH = /Library/PreferenceBundles
FasterCharging_FRAMEWORKS = UIKit
FasterCharging_PRIVATE_FRAMEWORKS = Preferences
FasterCharging_CFLAGS = -fobjc-arc

include $(THEOS_MAKE_PATH)/bundle.mk

internal-stage::
	$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
	$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/FasterCharging.plist$(ECHO_END)

what can i do?

Updated by pxcex

  • Author

Work

 

[[self loadSpecifiersFromPlistName:@"FasterCharging" target:self] retain];
to

[self loadSpecifiersFromPlistName:@"FasterCharging" target:self];

Work  Perfectly  

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.