diff --git a/FirebaseInAppMessaging/CHANGELOG.md b/FirebaseInAppMessaging/CHANGELOG.md index e8825c0ee6a..82a46fddf1e 100644 --- a/FirebaseInAppMessaging/CHANGELOG.md +++ b/FirebaseInAppMessaging/CHANGELOG.md @@ -1,3 +1,6 @@ +# 10.22.0 +- [fixed] Fixed an `objc_retain` crash. (#12393) + # 10.17.0 - [deprecated] All of the public API from `FirebaseInAppMessagingSwift` can now be accessed through the `FirebaseInAppMessaging` module. Therefore, diff --git a/FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m b/FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m index 7c4e4bcc3e1..37f24531edd 100644 --- a/FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m +++ b/FirebaseInAppMessaging/Sources/Flows/FIRIAMMessageClientCache.m @@ -126,7 +126,9 @@ - (void)setupAnalyticsEventListening { } - (BOOL)hasTestMessage { - return self.testMessages.count > 0; + @synchronized(self) { + return self.testMessages.count > 0; + } } - (nullable FIRIAMMessageDefinition *)nextOnAppLaunchDisplayMsg { @@ -135,7 +137,7 @@ - (nullable FIRIAMMessageDefinition *)nextOnAppLaunchDisplayMsg { - (nullable FIRIAMMessageDefinition *)nextOnAppOpenDisplayMsg { @synchronized(self) { - // always first check test message which always have higher prirority + // always first check test message which always have higher priority if (self.testMessages.count > 0) { FIRIAMMessageDefinition *testMessage = self.testMessages[0]; // always remove test message right away when being fetched for display