mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
feat(native): a capability handshake between the app binary and the server's UI
The UI ships with the server and the binary through the stores, so the two drift. TrekShell.getCapabilities now reports the binary's shell API, version and native features by name (iOS and Android), and the UI turns each native feature on only where the binary has it; a binary from before the handshake counts as shell API 1 with none. The other way round, the server names the oldest binary its UI works with (minNativeShellApi), and an app below it is asked to update with a link to its store.
This commit is contained in:
@@ -70,6 +70,10 @@ export class FeaturesController {
|
||||
// routes, the shell bridge in the served UI). Raised only for a change an
|
||||
// older app cannot follow; the app refuses a server below its minimum.
|
||||
nativeApi: 1,
|
||||
// The other way round: the oldest app binary this server's UI works with,
|
||||
// as the shell API the app reports (TrekShell.getCapabilities). An app
|
||||
// below it is asked to update instead of running native calls it lacks.
|
||||
minNativeShellApi: 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user