Skip to content

Commit

Permalink
v.1.0-1
Browse files Browse the repository at this point in the history
- Fix crash due to over-release
- Fix indexOutOfBounds: on functions with no args (thx kritana)
  • Loading branch information
Muirey03 committed Feb 20, 2020
1 parent 7e85f11 commit 7110700
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions MRYIPCCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,17 @@ -(void)_messageReceived:(NSNotification*)notification
invocation.selector = method.selector;
NSDictionary* args = notification.userInfo[@"args"];
NSString* replyUUID = notification.userInfo[@"replyUUID"];
[invocation setArgument:&args atIndex:2];
if (args)
[invocation setArgument:&args atIndex:2];
[invocation invoke];

//send reply:
if (replyUUID.length)
{
id returnValue = nil;
__unsafe_unretained id weakReturnValue = nil;
if (strcmp(signature.methodReturnType, "v") != 0)
[invocation getReturnValue:&returnValue];
[invocation getReturnValue:&weakReturnValue];
id returnValue = weakReturnValue;
NSDictionary* replyDict = returnValue ? @{@"returnValue" : returnValue} : @{};
NSString* replyMessageName = [self _messageReplyNameForSelector:method.selector uuid:replyUUID];
[_notificationCenter postNotificationName:replyMessageName object:nil userInfo:replyDict];
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# MRYIPC
### Easy-to-use iOS IPC without the need for RocketBootstrap

MRYIPC is an easy-to-use IPC (inter-process communication) mechanism for jailbroken devices (although it will also work on unjailbroken devices) that eliminated the need for RocketBootstrap.
MRYIPC is an easy-to-use IPC (inter-process communication) mechanism for jailbroken devices (although it will also work on unjailbroken devices) that eliminates the need for RocketBootstrap.

`MRYIPCCenter` is similar in API to `CPDistributedMessagingCenter`, so it shouldn't be too challenging to replace current `CPDistributedMessagingCenter` implementations with `MRYIPCCenter`.

## How to use
To use MRYIPC, copy `MRYIPCCenter.h` to `$THEOS/include` and `usr/lib/libmryipc.dylib` to `$THEOS/lib`. Then you can add `XXX_LIBRARIES = mryipc` to your Makefile and `#import "MRYIPCCenter.h"` into any source files you want to use it in.
To use MRYIPC, copy `MRYIPCCenter.h` to `$THEOS/include` and `usr/lib/libmryipc.dylib` to `$THEOS/lib`. Then you can add `XXX_LIBRARIES = mryipc` to your Makefile and `#import <MRYIPCCenter.h>` into any source files you want to use it in. Then add `Depends: com.muirey03.libmryipc` to your control file.

An example usage can be seen in ExampleClient and ExampleServer in this repository.

Expand All @@ -31,7 +31,7 @@ Then, go ahead and call any method you like:
Again, start by creating a sever center with the same name as the client (you'll need to store a reference somewhere to stop it being deallocated):

MRYIPCCenter* center = [MRYIPCCenter centerNamed:@"com.muirey03.MRYExampleServer"];

Then register any methods you want to make external:

[center addTarget:self action:@selector(addNumbers:)];
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.muirey03.libmryipc
Name: libMRYIPC
Version: 1.0
Version: 1.0-1
Architecture: iphoneos-arm
Description: Easy-to-use, RocketBootstrap-less iOS IPC
Maintainer: Muirey03
Expand Down
Binary file modified usr/lib/libmryipc.dylib
Binary file not shown.

0 comments on commit 7110700

Please sign in to comment.