Calling one delegate method causes a crash (randomly) with pyobjc bridge.
our app is 32-bit/64-bit
I just read the docs and I couldn't find example how I can do this a 3rd party library, where it has a BOOL parameter and it seems the bridge is trying to pass in an NSNumber object int the 2 examples here below.
Question: So I need to find a way to tell/decorate the 2 methods somehow in python so that pyobjc bridge knows that it is a BOOL parameter?
I look at the following docs. http://pyobjc.readthedocs.io/en/latest/core/typemapping.html https://pythonhosted.org/pyobjc/api/module-objc.html
More detailed info.
this is the Objc delegate method:
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
in my python class I wrote this:
def feedParametersForUpdater_sendingSystemProfile_(self, updater, showProfileInfo):
calling it from objc like this:
if ([delegate respondsToSelector:@selector(feedParametersForUpdater:sendingSystemProfile:)]) parameters = [parameters arrayByAddingObjectsFromArray:[delegate feedParametersForUpdater:self sendingSystemProfile:sendingSystemProfile]];
The strange thing is that this worked fine for a few times but sometimes it crashes, I have the impression it because the last argument is a BOOL.
also calling the setter method.
doesn't work all the time.