The UIWidgets engine for iOS can only be built on Mac.
### Preliminaries
There is a special settings, namely "Enable bitcode" we need set properly when building an ios native plugin.
Generally, the program is possible to run faster when "Enable bitcode" is true while the size of the plugin
will also become bigger.
You can choose to build the library with enabled or disabled "Enable bitcode" using different build commands as
shown in the following two sections.
You can also build UIWidgets engine with enabled or disabled "Enable bitcode" by changing the value of
"ios_bitcode_enabled" in "Build.bee.cs". Note that the value is set to false by default.
You can also change the setting of "Enable bitcode" in the XCode project generated by Unity. Specifically, you can
find this setting in "Build Settings/Build Options/Enable Bitcode". This value is true by default.
You should always keep the "Enable bitcode" settings the same in the built library, the UIWidgets engine and the XCode project generated by your UIWidget project.
If the compilation fails because "no available Mac SDK is found" (in flutter-1.17 the build tool will only try to find Mac 10.XX SDKs), please modify the file "/src/build/Mac/find_sdk.py" under flutter root by setting "sdks" as your current sdk, e.g., ['11.0'].
If the compilation fails because "'Foundation/NSURLHandle.h' file not found" (flutter-1.17 assumes that you are using some low iphone SDK (e.g., older than 12.2), in which some platform-dependent Macros are defined differently from new SDKs like 12.2), please modify the file "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/TargetConditionals.h" in your system by making "TARGET_OS_EMBEDDED = 1" and "TARGET_OS_MACCATALYST = 0" for arm64-iphone architecture. You can also work-around this issue by checking out a new version of flutter (e.g., "flutter-1.18-candidate.6") and run "gclient sync -D" to get dependencies on newer iphone SDKs. Then switch back and build.
### Creat symbolic
Create symbolic as follows. Flutter engine txt include skia header in this pattern 'third_party/skia/*', so without symbolic, the txt lib will include skia
header file in flutter engine, instead of headers in skia repo.
cmd
```
cd <uiwidigets_dir>\engine
cd third_party \\ create the directory if not exists