fix for app delegate functions in iOS