the activity need to be stored in a property. So I added this in the header-file:
@property (strong) id activity;
and then used this implementation.
if ([[NSProcessInfo processInfo] respondsToSelector:@selector(beginActivityWithOptions:reason:)]) {
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:0x00FFFFFF reason:@"receiving OSC messages"];
}
Thanks to all contributors!