text stringlengths 1 372 |
|---|
drag embedded app clips to above thin binary. |
<topic_end> |
<topic_start> |
step 3 - remove unneeded files |
3.1 |
in the project navigator, in the newly created app clip group, |
delete everything except info.plist and |
<app clip target>.entitlements. |
lightbulb tip |
for add-to-app users, it’s up to the reader to decide |
how much of this template to keep to invoke |
FlutterViewController or FlutterEngine APIs |
from this code later. |
move files to trash. |
3.2 |
if you don’t use the SceneDelegate.swift file, |
remove the reference to it in the info.plist. |
open the info.plist file in the app clip group. |
delete the entire dictionary entry for |
application scene manifest. |
<topic_end> |
<topic_start> |
step 4 - share build configurations |
this step isn’t necessary for add-to-app projects |
since add-to-app projects have their custom build |
configurations and versions. |
4.1 |
back in the project settings, |
select the project entry now rather than any targets. |
in the info tab, under the configurations |
expandable group, expand the |
debug, profile, and release entries. |
for each, select the same value from the drop-down menu |
for the app clip target as the entry selected for the |
normal app target. |
this gives your app clip target access to flutter’s |
required build settings. |
set iOS deployment target to at least 16.0 to take advantage of the |
15mb size limit. |
4.2 |
in the app clip group’s info.plist file, set: |
<topic_end> |
<topic_start> |
step 5 - share code and assets |
<topic_end> |
<topic_start> |
option 1 - share everything |
assuming the intent is to show the same flutter UI |
in the standard app as in the app clip, |
share the same code and assets. |
for each of the following: main.storyboard, assets.xcassets, |
LaunchScreen.storyboard, GeneratedPluginRegistrant.m, and |
AppDelegate.swift (and supporting files/main.m if using Objective-C), |
select the file, then in the first tab of the inspector, |
also include the app clip target in the target membership |
checkbox group. |
<topic_end> |
<topic_start> |
option 2 - customize flutter launch for app clip |
in this case, |
do not delete everything listed in step 3. |
instead, use the scaffolding and the iOS add-to-app APIs |
to perform a custom launch of flutter. |
for example to show a custom flutter route. |
<topic_end> |
<topic_start> |
step 6 - add app clip associated domains |
this is a standard step for app clip development. |
see the official apple documentation. |
6.1 |
open the <app clip target>.entitlements file. |
add an associated domains array type. |
add a row to the array with appclips:<your bundle id>. |
6.2 |
the same associated domains entitlement needs to be added |
to your main app, as well. |
copy the <app clip target>.entitlements file from your |
app clip group to your main app group and rename it to |
the same name as your main target |
such as runner.entitlements. |
open the file and delete the |
parent application identifiers |
entry for the main app’s entitlement file |
(leave that entry for the app clip’s entitlement file). |
6.3 |
back in the project settings, select the main app’s target, |
open the build settings tab. |
set the code signing entitlements setting to the |
relative path of the second entitlements file |
created for the main app. |
<topic_end> |
<topic_start> |
step 7 - integrate flutter |
these steps are not necessary for add-to-app. |
7.1 |
for the swift target, |
set the Objective-C bridging header |
build setting to Runner/Runner-Bridging-Header.h |
in other words, |
the same as the main app target’s build settings. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.