My sincere apologies it took us so long to fix that bug. The fix is waiting for review and we’ll push it to Turtle builders ASAP so you can rebuild your iOS apps to see the bug fixed.
Let me at least explain what was the problem.
Let’s start with what’s included in every Expo Client or a standalone app at the moment:
- an unversioned core, containing Kernel (services helping all the experiences access some specific devices’ APIs, like permissions or sensors manager) and ExpoKit, a central dispatch station for all the events that should be passed to different experiences (that is different applications running on Expo Client, eg.)
- an unversioned SDK
- a couple of versioned SDKs included in the runtime as pods (see eg.
Podfile section for SDK29).
To be able to compile different versions of the SDK in one project, when a new SDK is released, we prefix files/classes/constants names with
ABI_29_0_0. This way the compiler doesn’t complain about duplicate symbols and what not.
However, there are some constants values that shouldn’t change from version to version — they should be shared for all SDKs. An example of such constant would be
This is the name of the notification that is posted by
- application:didRegisterForRemoteNotificationsWithDeviceToken: is called on
AppDelegate, so all interested parties (in that case all remote notification permissions managers) know that the user allowed the app to receive remote notifications.
The way we ensured that this constant will be left as it is by the versioning script was an
EX_UNVERSIONED macro which did… nothing. See definition, usage example and versioned example.
The problem that caused this bug is that when moving
Permissions API to a universal module we forgot about versioning that happens automatically when we release a new SDK version. In SDK 29’s
EXAppDidRegister… was prefixed with
Permissions was listening on NSNotificationCenter for
ABI29_0_0EXAppDidRegister… which was posted there.
The solution was to ensure that the names match in every SDK version. To ensure this doesn’t happen in the future I’ve added
EXAppDidRegisterForRemoteNotificationsNotification in all versioned and unversioned code. The versioning script won’t bother us anymore!
Sorry for the problems, everyone! I’ll let you know when we release the fix to the builders.