Appwin Core

Appwin Core is the foundation every module builds on: device identity, authenticated session, network client. A person stays the same across Community, Support and the rest, and each request reaches your project from your App ID alone.

You never install Core separately: it comes with the first module, and it is always the first line of the generated setup.

What it does at startup

  • configure(projectAppId:): synchronous, called once. Sets up the device identity and the network client, and routes every request to your project.
  • It then opens the session by itself, in the background, with the first call that needs it. Nothing to call.

That is why the SDK is one URL and one configure rather than four: each module's initialize() builds on the session Core opens.

One identity, every module

Core recognises the device with no sign-up. Attach your user with identify at sign-in (the id is kept across launches), push attributes with updateUser, call logout at sign-out. They become the same person in every module and across their devices: the modules have no identity of their own.

Always pass your user id, never a session or device id: two identifiers make two people. Full picture in Identity.

Which environment it talks to

By default, Core talks to https://api.appwin.io, routed to your project by your App ID. The baseUrl parameter of configure is only for a different entry point we hand you (a staging environment, for instance).

Next