[healthStore requestAuthorizationToShareTypes:shareObjectTypes readTypes:readObjectTypes completion:^(BOOL success, NSError *error) {//Nice Fat Block O Code}];
//Blocks.h
@interface HealthAuthResult: NSObject {
}
@property BOOL issuccess;
@property BOOL didtry;
-(void) healthAuthCallbackResult:(BOOL)success andError:(NSError *) error;
//@property (nonatomic,retain) void (^healthAuthBlock)(BOOL, NSError *);//void (^healthAuthBlock)(BOOL, NSError *);
@end
//////////////#import "Blocks.h"
@implementation HealthAuthResult
-(void) healthAuthCallbackResult:(BOOL)success andError:(NSError *) error{ self.didtry = YES; if(success == YES) { self.issuccess = YES; } else { self.issuccess = NO; }}
//-(void) configureBlock{// self.healthAuthBlock = ^(BOOL success, NSError *error){// //[self healthAuthCallbackResult:success andError:error];// NSLog(@"Hello This is block");// };//}
void (^healthAuthBlock)(BOOL, NSError *);
@end
[DEBUG] --------------------------------------------------------------------------------
[DEBUG] __call__() configureBlock 0x101a2190 0x7c248870
[DEBUG] --> want to call configureBlock ()
[DEBUG] --> return def is ('v', '8', None)
[DEBUG] --> args def is [('@', '0', None), (':', '4', None)]
[DEBUG] - [0] class instance 0x7c248870
[DEBUG] - selector is 0x101a1d26
[DEBUG] --------------------------------------------------------------------------------
[DEBUG] signature ensure_method --> configureBlock ('v', '8', None)
[DEBUG] pre-zip signature: [('@', '0', None), (':', '4', None)]
[DEBUG] array signature zip: [('@', '0', None), (':', '4', None)]
[DEBUG] input for type_encoding_to_ffitype(type_encoding=v, str_in_union=False)
[DEBUG] argument ==> ('@', '0', None) 2
[DEBUG] input for type_encoding_to_ffitype(type_encoding=@, str_in_union=False)
[DEBUG] argument ==> (':', '4', None) 2
[DEBUG] input for type_encoding_to_ffitype(type_encoding=:, str_in_union=False)
[DEBUG] --- really call configureBlock with args () (signature is [('@', '0', None), (':', '4', None)])
[DEBUG] > 0: 2081754344
[DEBUG] > 1: 2081754348
[INFO] return signature v
Request Auth
[DEBUG] --------------------------------------------------------------------------------
[DEBUG] __call__() healthAuthBlock 0x101a2190 0x7c248870
[DEBUG] --> want to call healthAuthBlock ()
[DEBUG] --> return def is ('@?', '8', None)
[DEBUG] --> args def is [('@', '0', None), (':', '4', None)]
[DEBUG] - [0] class instance 0x7c248870
[DEBUG] - selector is 0x101a1d46
[DEBUG] --------------------------------------------------------------------------------
[DEBUG] signature ensure_method --> healthAuthBlock ('@?', '8', None)
[DEBUG] pre-zip signature: [('@', '0', None), (':', '4', None)]
[DEBUG] array signature zip: [('@', '0', None), (':', '4', None)]
[DEBUG] input for type_encoding_to_ffitype(type_encoding=@?, str_in_union=False)
Exception Exception: Exception("Missing encoding for '@?'",) in 'pyobjus.pyobjus.type_encoding_to_ffitype' ignored
[DEBUG] argument ==> ('@', '0', None) 2
[DEBUG] input for type_encoding_to_ffitype(type_encoding=@, str_in_union=False)
[DEBUG] argument ==> (':', '4', None) 2
[DEBUG] input for type_encoding_to_ffitype(type_encoding=:, str_in_union=False)
What's going on here? It looks like the type encoding isn't set right??? Does that mean that pyobjus needs to have some type of block / namespace encoding?
Has anyone solve this yet?