user1676978
user1676978

Reputation: 25

How Can I use functions in SpringBoard-Class.h?

In SpringBoard-Class.h I found the functions such as these:

-(void)_powerDownNow;
-(void)_rebootNow;
-(void)reboot;
-(void)powerDown;

I am trying to use them. My iPhone is jailbroken.

I use [[[SpringBoard alloc] init] reboot], but the compiling result is:

Undefined symbols for architecture armv6: "_OBJC_CLASS_$_SpringBoard", referenced from: objc-class-ref in RootViewController.mm.o ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status.

Upvotes: 2

Views: 1749

Answers (1)

YllierDev
YllierDev

Reputation: 571

I'm assuming that you are developing a tweak which hooks into SpringBoard. If you don't have the headers present, you can always use

[objc_getClass("SpringBoard") sharedApplication] methodToUse];

This will produce a warning... but it will be fine.

You can't call SpringBoard's methods from an app, because SpringBoard is not a library you can link to. It is an app itself.

Upvotes: 3

Related Questions