From c0190f9170d818ab142dff44674657b07676f9d4 Mon Sep 17 00:00:00 2001 From: Kris Pypen Date: Thu, 17 Oct 2019 13:44:57 +0200 Subject: [PATCH] Add install step for Objective-C in the README.md This fixes #47 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 20e7af9..4432044 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,17 @@ IOS will export unity project to `ios/UnityExport`. ```swift InitArgs(CommandLine.argc, CommandLine.unsafeArgv) +``` +Or when using Objective-C your `main.m` should look like this: +``` +#import "UnityUtils.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + InitArgs(argc, argv); + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} ``` 5. Opt-in to the embedded views preview by adding a boolean property to the app's `Info.plist` file with the key `io.flutter.embedded_views_preview` and the value `YES`.