@@ -4,6 +4,134 @@ title: ❓ FAQ
4
4
description : Frequently asked questions.
5
5
---
6
6
7
+ If you have questions not answered here, please ask! Both filing an issue
8
+ or asking on [ Discord] ( https://discord.gg/9hKJcWGcaB ) ) work.
9
+
10
+ ### What is "code push"?
11
+
12
+ Code push, also referred to as "over the air updates" (OTA) is a cloud service
13
+ we are building to enable Flutter developers to deploy updates directly to
14
+ devices anywhere they have shipped Flutter. We've currently shown demos using
15
+ Android, but since it's built with Flutter/Dart (and Rust) it can eventually
16
+ work anywhere Flutter works.
17
+
18
+ The easiest way to see is to watch the [ demo
19
+ video] ( https://www.youtube.com/watch?v=mmKvs0_Zu14&ab_channel=Shorebird ) .
20
+
21
+ "Code Push" is a reference to the name of a deploy feature used by the React
22
+ Native community from [ Microsoft] ( https://appcenter.ms ) and
23
+ [ Expo] ( https://expo.dev ) , neither of which support Flutter.
24
+
25
+ ### What is the roadmap?
26
+
27
+ We try to keep: https://docs.shorebird.dev/status up to date with the status
28
+ of the project.
29
+
30
+ Our project boards are also public an found at:
31
+ https://github.com/orgs/shorebirdtech/projects
32
+
33
+ ### How does this relate to Firebase Remote Config or Launch Darkly?
34
+
35
+ Code push allows adding new code / replacing code on the device. Firebase
36
+ Remote Config and Launch Darkly are both configuration systems. They allow you
37
+ to change the configuration of your app without having to ship a new version.
38
+ They are not intended to replace code.
39
+
40
+ ### How big of a dependency footprint does this add?
41
+
42
+ I haven't measured recently, but I expect the code push library to add less than
43
+ one megabyte to Flutter apps. ` flutter build apk --release ` vs.
44
+ ` shorebird build apk --release ` should give you a rough idea. We know of ways
45
+ we can make this smaller when that becomes a priority. If size is a blocker
46
+ for you, please let us know!
47
+
48
+ ### How does this relate to Flutter Hot Reload?
49
+
50
+ Flutter's Hot reload is a development-time-only feature. Code push is for
51
+ production.
52
+
53
+ Hot reload is a feature of Flutter that allows you to change code on the device
54
+ during development. It requires building the Flutter engine with a debug-mode
55
+ Dart VM which includes a just-in-time (JIT) Dart compiler.
56
+
57
+ Code push is a feature that allows you to change code on the device in
58
+ production. We will use a variety of different techniques to make this possible
59
+ depending on the platform. Current demos execute ahead-of-time compiled Dart
60
+ code and do not require a JIT Dart compiler.
61
+
62
+ ### What types of changes does Shorebird code push support?
63
+
64
+ Code push only supports changing Dart code at this time. We have plans to
65
+ support changing Flutter asset files (from pubspec.yaml) in the near future:
66
+ https://github.com/shorebirdtech/shorebird/issues/318
67
+
68
+ We do not have plans to support changing
69
+ native code (e.g. Java/Kotlin on Android or Objective-C/Swift on iOS), but we
70
+ do have plans to warn about native code changes during patch creation:
71
+ https://github.com/shorebirdtech/shorebird/issues/385
72
+
73
+ ### Does this support Flutter Web?
74
+
75
+ Code push isn't needed for Flutter web as the web already works this way. When
76
+ a user opens a web app it downloads the latest version from the server if
77
+ needed.
78
+
79
+ If you have a use case for code push with Fluter web, we'd love to know!
80
+
81
+ ### Will this work on iOS, Android, Mac, Windows, Linux, etc?
82
+
83
+ Yes.
84
+
85
+ So far we've focused on Android support, but code push will eventually work
86
+ everywhere Flutter works. We're ensuring we've built all the infrastructure
87
+ needed to provide code push reliably, safely first before expanding to more
88
+ platforms.
89
+
90
+ There are different technical restrictions on some platforms (e.g. iOS) relative
91
+ to Android, but we have several approaches we can use to solve them (Dart is an
92
+ incredibly flexible language).
93
+
94
+ ### How does this relate to the App/Play Store review process or policies?
95
+
96
+ Developers are bound by their agreements with store providers when they choose
97
+ to use those stores. Code push is designed to allow developers to update their
98
+ apps and still comply with store policies on iOS and Android. Similar to the
99
+ variety of commercial products available to do so with React Native (e.g.
100
+ [ Microsoft] ( https://appcenter.ms ) , [ Expo] ( https://expo.dev ) ).
101
+
102
+ We will include more instructions and guidelines about how to both use code push
103
+ and comply with store guidelines as we get closer to a public launch.
104
+
105
+ ### Does code push require the internet to work?
106
+
107
+ Yes. One could imagine running a server to distribute the updates separately
108
+ from the general internet, but some form of network connectivity is required to
109
+ transport updates to the devices.
110
+
111
+ ### What happens if a user doesn't update for a long time and misses an update?
112
+
113
+ Our implementation always sends an update specifically tailored for the device
114
+ that is requesting it updating the requestor always to the latest version
115
+ available. Thus if a user doesn't update for a while they will "miss"
116
+ intermediate updates.
117
+
118
+ The update server could be changed to support responding with either the next
119
+ incremental version or the latest version depending on your application's needs.
120
+ Please let us know if alternative update behaviors are important to you.
121
+
122
+ ### Why are some parts of the code push library written in Rust?
123
+
124
+ Parts of the code push ("updater") system are written in Rust:
125
+
126
+ 1 . Avoids starting two Dart VMs (one for the updater and one for the app).
127
+ 2 . Allows accessing the updater code from multiple languages (e.g. both the C++
128
+ engine as well as a Dart/Flutter application, or even Kotlin/Swift code if
129
+ needed)
130
+
131
+ See our [ Languages
132
+ Philosophy] ( https://github.com/shorebirdtech/handbook/blob/main/engineering.md#languages )
133
+ for more information as to why we chose Rust.
134
+
7
135
## How does Shorebird relate to Flutter?
8
136
9
137
Shorebird is a fork of Flutter that adds code push. Shorebird is not a
@@ -28,7 +156,7 @@ For more information about why we had to fork Flutter see
28
156
29
157
## When do updates happen?
30
158
31
- Shorebird udpater is currently hard-coded to run on app startup. It runs on
159
+ Shorebird updater is currently hard-coded to run on app startup. It runs on
32
160
a background thread and does not block the UI thread. Any updates will be
33
161
installed while the user is using the app and will be applied the next time the
34
162
app is restarted.
0 commit comments