Jump to content

I can't figure out how to call a function from another class? Or call a function in general


1 post in this topic

Recommended Posts

Posted

okay, I've posted something similar to this before and I need a descriptive answer that I would understand, things like [DoSomething SomethineElse] etc confuse me, so what I'm trying to do is call methods/functions from other classes, so let's say I send a message with the string "!info" that info would call a method from a different class and display the data into the message kind of like a command, so I have an example

 

@interface KikUser : NSObject
- (NSString *)groupMembersString;
@end


%hook CoreDataConversationManager

- (void) sendTextMessage:(id)command withRenderInstructionSet:(id)arg2 toConversation:(id)arg2 isSuggestedResponse:(BOOL)arg3

{
if [(command isEqualToString:@"!type")] command = groupMembersString;
return %orig;
}

%end
As you can see I'm trying to call the string from the header KikUser, and the method to send a message within Kik is on a DIFFERENT Header, and I'm trying to return the data from the groupMembersString upon typing and clicking enter with !info typed, now I have a lot more questions that I can't really phrase and it would be better to show you "live" (me screen recording) so if anyone could help me out that would be fantastic, my Kik is @a3t and my Skype is @notniro someone please help! :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines