Skip to content

Instantly share code, notes, and snippets.

@Geri-Borbas
Last active March 19, 2021 09:20
Show Gist options
  • Select an option

  • Save Geri-Borbas/87096bd70d070f7093fd0234b187facb to your computer and use it in GitHub Desktop.

Select an option

Save Geri-Borbas/87096bd70d070f7093fd0234b187facb to your computer and use it in GitHub Desktop.
A quick way to override / extend app delegate (UIAppDelegate) in iOS Unity Player. Read more on why you should / should not use this approach at http://eppz.eu/blog/override-app-delegate-unity-ios-osx-1/
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#import "UnityAppController.h"
@interface OverrideAppDelegate : UnityAppController
@end
IMPL_APP_CONTROLLER_SUBCLASS(OverrideAppDelegate)
@implementation OverrideAppDelegate
-(BOOL)application:(UIApplication*) application didFinishLaunchingWithOptions:(NSDictionary*) options
{
NSLog(@"[OverrideAppDelegate application:%@ didFinishLaunchingWithOptions:%@]", application, options);
return [super application:application didFinishLaunchingWithOptions:options];
}
@end
@TunvirRahman
Copy link

TunvirRahman commented Jan 30, 2018

extremely helpful...just works ..thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment