iosunit-testingios7localytics

Implementing Localytics SDK prevents unit tests from building


I have recently implemented Localytics to get a better understanding of how our users are using our app.

The integration guide is pretty straight forward. However the unit tests can't be built any longer, when I run them.

enter image description here

The error is familiar to me. This error usually happens if the tested class is not part of the test target membership.

enter image description here

But the SDK _OBJC_CLASS_$_LocalyticsSession provides only a .h file. In order to make it part of the target membership, I needed the .m file, which I don't have.

Has anyone else utilised Localystics and can advice me how to proceed this regarding? Thanks

UPDATE

coneybeare's answer has actually made me try this:

enter image description here

The test target is set to None. But if I change it to target the app itself:

enter image description here

Then it works. However everytime I intend to run the unit tests the whole app has to start in the simulator, which is very irritating (and slow). Am I missing something? How else can I associate the .a code libraries with the test targets?


Solution

  • I don't use Localytics, but inspecing the SDK downloads shows a few .a code libraries. Ensure those are associated with the test targets.