iosxcodewebtrends

Xcode with WebTrends - NSCFBoolean hasPrefix: unrecognized selector sent to instance


I made a game in Unity, and built it for iOS devices. The clients asked if we could implement WebTrends into the game, and so I followed this getting started guide for instructions on how to install it.

I was able to set it up, and got to Step 5, which suggests the following:

Lifecycle events can be logged automatically by setting the wt_dc_automatics_enabled config setting to true

This is where I got stumped. I then added the above setting to my webtrends.plist, so it now looks like this:

enter image description here

When attempting to build and run that, I get an error in Xcode, and the game refuses to run:

Uncaught exception: NSInvalidArgumentException: -[__NSCFBoolean hasPrefix:]: unrecognized selector sent to instance 0x11294d238

This guide suggests setting wt_dc_enabled to true instead of wt_dc_automatics_enabled.

But even after replacing that in the plist, it returns the same error.

Notably, the project runs fine if I remove the wt_dc_automatics_enabled / wt_dc_enabled from the plist file, though it doesn't sent any logs, to my knowledge.

Is there anything else I can do?


Solution

  • Can you trying making wt_dc_automatics_enabled as String type and not boolean type and add its value as YES. Because your error says somewhere in the code hasPrefix method is called on Boolean value. hasPrefix method is defined in String class and there is no such method in Boolean class.