Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
164 stars 142 forks source link

[ABKPersistentData configureForDataVersioning] unrecognized selector sent to instance crash #324

Closed victorBaro closed 2 years ago

victorBaro commented 2 years ago

Report

Describe your environment.

Info Value
Platform Name Mac Catalyst (and maybe iOS)
Platform Version Big Sur & Monterey
SDK Version 4.3.4
Integration Method SPM
Xcode Version Xcode 13.1
Repro rate Only a few

What did you do?

Some of our users are reporting seeing the following screen when launching our Mac Catalyst app, not being able to proceed (app crashes):

Screen Shot 2021-11-10 at 13 25 37

What did you expect to happen?

App to run as expected on launch

What happened instead?

App crashed on launch. From one of our users we received this small part of a crash report: Screen Shot 2021-12-03 at 6 54 29 AM

We have received complaints from people unable to launch our iOS app as well, which may be related. At this point it is difficult to know how to reproduce. We will try to ask more users for their crash logs and report back.

lowip commented 2 years ago

Hi @victorBaro,

This error (unrecognized selector sent to class ...) is indicative that our SDK was added to your app without the linker flag -ObjC. Can you make sure that you followed our SPM documentation and verify that the -ObjC flag is set for the Other Linker Flags build setting?

Best,

victorBaro commented 2 years ago

Thank you @lowip -ObjC was added only for iPhone SDK. After adding that flag the issue seems to be resolved.