07-21-2023, 01:39 PM
When using Xcode 9, there are some compiler warnings saying `This function declaration is not a prototype`. It suggests to add `void` to the method body, which will resolve it. The issue I am having is that those warnings are also thrown for system-API's like `UIApplication` delegate-methods:
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)())completionHandler
This could be resolved by the following:
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)(void))completionHandler
Now I am wondering if the delegate methods will still work on the long-term or Apple will insert the `void` in later iOS 11 Beta versions. I am curious because if I include the `void` body, Xcode will complain about mismatching method-selectors (which makes sense). Did someone experience the same issue so far?
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)())completionHandler
This could be resolved by the following:
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)(void))completionHandler
Now I am wondering if the delegate methods will still work on the long-term or Apple will insert the `void` in later iOS 11 Beta versions. I am curious because if I include the `void` body, Xcode will complain about mismatching method-selectors (which makes sense). Did someone experience the same issue so far?