Hello
I'm trying to get a rise event call from objective C to a b4i sub
This works:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
However, trying the same within the implementation of a class, doesnt
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Whats the correct way to handle this?
already tried raiseEventFromDifferentThread, raiseEvent...same result
Thanks
			
			I'm trying to get a rise event call from objective C to a b4i sub
This works:
			
				B4X:
			
		
		
		Sub nsdata_sub(x As NativeObject)
Dim NSS As String = x
end sub
#If ObjC
- (void)test{
        uint8_t bytes[] = {1,2,3,6,7,8,11,12,13};
        NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
        [self.bi raiseUIEvent:nil event:@"nsdata_sub:" params:@[data]];    
}
#end ifHowever, trying the same within the implementation of a class, doesnt
			
				B4X:
			
		
		
		@end
#import <Foundation/Foundation.h>
#import <CoreNFC/CoreNFC.h>
typedef void(^CompletionHandler)(NSError *error);
@interface B4INFC:NSObject <NFCTagReaderSessionDelegate>
@end
@implementation B4INFC
- (void)test{
  NSData *data = nil;
   // [B4IObjectWrapper raiseEvent:self :@"nsdata_sub:" params:@[data]];
    [B4IObjectWrapper raiseUIEvent:self :@"nsdata_sub:" :@[data]];
    //compiles ok but does nothing
}Whats the correct way to handle this?
already tried raiseEventFromDifferentThread, raiseEvent...same result
Thanks
 
				 
 
		 
 
		 
 
		 
 
		 
 
		