Done.
10.5.2 Compose iOSREMadridMessenger.h
We’ve made use of multiple private classes and methods in previous sections, so we need to
provide their definitions to avoid any compiler warning or error. Of course, the contents of
iOSREMadridMessenger.h don’t come from nowhere, it’s composed by picking snippets from
other class-dump headers, forming a “select header”. The finalized iOSREMadridMessenger.h
looks like this:
@interface IDSIDQueryController
+ (instancetype)sharedInstance;
- (NSDictionary )_currentIDStatusForDestinations:(NSArray )arg1 service:(NSString
)arg2 listenerID:(NSString )arg3;
@end
@interface IMServiceImpl : NSObject
+ (instancetype)iMessageService;
@end
@class IMHandle;
@interface IMAccount : NSObject
- (IMHandle )imHandleWithID:(NSString )arg1 alreadyCanonical:(BOOL)arg2;
@end
@interface IMAccountController : NSObject
+ (instancetype)sharedInstance;
- (IMAccount )__ck_defaultAccountForService:(IMServiceImpl )arg1;
@end
@interface IMMessage : NSObject
+ (instancetype)instantMessageWithText:(NSAttributedString *)arg1 flags:(unsigned long
long)arg2;
@end
@interface IMChat : NSObject
- (void)sendMessage:(IMMessage *)arg1;
@end
@interface IMChatRegistry : NSObject
+ (instancetype)sharedInstance;
- (IMChat )chatForIMHandle:(IMHandle )arg1;
@end
10.5.3 Edit Tweak.xm
The finalized Tweak.xm looks like this:
#import "iOSREMadridMessenger.h"
%hook SMSApplication
%new
- (int)madridStatusForAddress:(NSString )address
{
NSString formattedAddress = nil;