Merge pull request #62 from krispypen/patch-2

Add install step for Objective-C in the README.md
This commit is contained in:
Rex Raphael 2019-10-17 15:09:44 +02:00 committed by GitHub
commit ebcfb0cfa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -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`.