Chartboost Plugin Crashes iOS 9 Devices

Chartboost is causing a runtime error for me on iOS 9 devices. It works fine on iOS 14 and iOS 12, but consistently gives the following error on iOS 9:

NSInvalidArgumentException: - 
[_NCSFLocale usesMetricSystem]:
unrecognized selector sent to instance 0x165a0b00

The error message goes on and on but does mention Chartboost specifically: _ZN16ChartboostPlugin4initEP9lua_Stat + 2410

Fortunately, you can include the plugin without causing iOS 9 devices to crash. The problem doesn’t occur until Charboost is initialized, so you can still use Chartboost on iOS builds if you do something like put Chartboost inside an if-then statement along the lines of:

if ( system.getInfo( "targetAppStore" ) == "apple" and tonumber( string.sub( system.getInfo( "platformVersion" ), 1, 1 ) ~= 9 ) then
-- All your Chartboost stuff here
end

I don’t know if the root problem is worth fixing/can be fixed, but I bring this up for folks who use Chartboost and aren’t in the habit of testing on iOS 9 devices.

Just curious, why do you need to support iOS 9? Do you have any numbers on how many of your users are on an OS version that old?

I had around 10,000 play sessions on iOS 9 devices last month. It’s not a significant portion of my total pool of players, but it’s more support emails and one-star reviews than I want to deal with if I push out an update that bricks the app for everyone who is hanging on to an old iPad. :grin:

1 Like