Hi guys, so I have and option that user can click on it and navigate to App settings on IOS in order to turn on notification.
So here is a quick view of my native code
#define onMainThread(_lambda) \
if([NSThread isMainThread]){ \
_lambda \
} else { \
dispatch_async(dispatch_get_main_queue(), ^{ \
_lambda \
}); \
}
const void _showNotificationSettings()
{
onMainThread({
NSURL * url = [NSURL URLWithString: UIApplicationOpenSettingsURLString];
if([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
};);
}
Whenever this code is execute it bring me to the app settings correctly but also causing my application crashes.
If anyone had done this please help me out.