MMWormhole icon indicating copy to clipboard operation
MMWormhole copied to clipboard

Confusion about transitingType

Open ilyon opened this issue 6 years ago • 1 comments

Hi guys,

I am using your nice library to communicate watchOS and iOS, I did use it before for watchOS 1 and no problems at all, but now trying to handle from watchOS 2 on I am facing something confusion.


If I initialize with:

self.wormhole = [[MMWormhole alloc] initWithApplicationGroupIdentifier:@"xx" optionalDirectory:@"x" transitingType:MMWormholeTransitingTypeSessionMessage];

and then

id messageObject = [self.wormhole messageWithIdentifier:@"identifier"];

the messageObject is nil always.


If I initialize with:

self.wormhole = [[MMWormhole alloc] initWithApplicationGroupIdentifier:@"xx" optionalDirectory:@"x" transitingType:MMWormholeTransitingTypeSessionContext];

and then

id messageObject = [self.wormhole messageWithIdentifier:@"identifier"];

the messageObject isn't nil. But when I pass a message

[self.wormhole passMessageObject:@"x.x" identifier:@"identifier"];

Every listener's block will be called.

[self.listeningWormhole listenForMessageWithIdentifier:@"x.x" listener:^(id  _Nullable messageObject) {

}];

The example also does the same for me on my machine. Perhaps I got it wrong. Hope to get some help.

Thanks!

ilion

ilyon avatar Mar 26 '18 12:03 ilyon

Hi, Anyone know this?

thaoth58 avatar May 17 '18 03:05 thaoth58