Go Back   MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 11, 2012, 04:43 PM   #1
sencersoylu
macrumors newbie
 
Join Date: Oct 2012
HOOK SBApplicationIcon Launch Get displayName

Hello,

I hooked Launch but i didnt get displayName. Please help me.

Mycode is
Code:
#import <SpringBoard/SpringBoard.h>
%hook SBApplicationIcon
 
-(void)launch
{
   
 
 
 
NSString *app= [self displayName];
 
NSString *message = [NSString stringWithFormat:@"The app %@ has been launched", app, nil];
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:sword message:message delegate:self cancelButtonTitle:sword otherButtonTitles:nil];
    [alert show];
    [alert release];
 
%orig;
 
 
}
%end
sencersoylu is offline   0 Reply With Quote
Old Oct 11, 2012, 05:40 PM   #2
truehybridx
macrumors member
 
Join Date: Dec 2010
What do you get instead?
truehybridx is offline   0 Reply With Quote
Old Oct 13, 2012, 05:35 AM   #3
sencersoylu
Thread Starter
macrumors newbie
 
Join Date: Oct 2012
Quote:
Originally Posted by truehybridx View Post
What do you get instead?
Code:
Tweak.xm:10: warning: no '-displayName' method found
Tweak.xm:10: warning: (Messages without a matching method signature
Tweak.xm:10: warning: will be assumed to return 'id' and accept
Tweak.xm:10: warning: '...' as arguments.)
Tweak.xm:13: error: 'sword' was not declared in this scope
I gimme that error code.
sencersoylu is offline   0 Reply With Quote
Old Oct 20, 2012, 05:05 PM   #4
truehybridx
macrumors member
 
Join Date: Dec 2010
Quote:
Originally Posted by sencersoylu View Post
Code:
Tweak.xm:10: warning: no '-displayName' method found
Tweak.xm:10: warning: (Messages without a matching method signature
Tweak.xm:10: warning: will be assumed to return 'id' and accept
Tweak.xm:10: warning: '...' as arguments.)
Tweak.xm:13: error: 'sword' was not declared in this scope
I gimme that error code.
Oops.. well i believe i answered it over at ifans, but ill answer it here too lol

Since you are dynamic linking, the compiler has no idea displayName exists as a function.

Heres the easiest way, just declare an interface before your hooks
Code:
@interface SBApplicationIcon : NSObject
 
- (NSString*)displayName;
 
@end
 
%hook SBApplicationIcon
 
- (void)launch {
 
NSString *name = [self displayName];
 
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:name message:@"Launch Been Hooked" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
    [alert show];
    [alert release];
 
 
%orig;
 
}
 
%end
OR you could include the SBAppIcon.h BUT you may have to fix that header file to make the compiler happy, and possibly fix file after file, so its easiest to just declare what you need in a sort of pseudo-interface and let the runtime figure it out
truehybridx is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How long did it take Mophie to launch the case after launch? pilot1226 iPhone Accessories 9 Sep 13, 2013 09:07 PM
Imac hd hook up 2011myzen iMac 4 Sep 10, 2013 12:27 AM
iPad Mini Launch Attracting Shorter Lines on Launch Day MacRumors MacRumors.com News Discussion 244 Nov 4, 2012 01:15 AM
An odd connection between color and 4 launch/5 launch thadoggfather iPhone 0 Sep 27, 2012 12:43 AM
iPad: How to hook ipad to tv firemedicmark Jailbreaks and iOS Hacks 7 Jun 26, 2012 06:31 AM

Forum Jump

All times are GMT -5. The time now is 08:08 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC