ios - Compilation Error with NSParameterAssert with Xcode 6.3 -
i getting compilation errors anywhere nsparameterassert used. example:
-(instancetype)initforplot:(cptplot *)plot withfunction:(cptdatasourcefunction)function {     nsparameterassert([plot iskindofclass:[cptscatterplot class]]);     nsparameterassert(function);      if ( (self = [self initforplot:plot]) ) {         datasourcefunction = function;     }     return self; } the code compiles fine xcode 6.2 it's giving me following errors xcode 6.3:
 /users/xxxx/project/app/presentation/coreplot/source/cptfunctiondatasource.m:110:5: using %s directive in nsstring being passed formatting argument formatting method  
i have looked online , have not seen information on error message.
 temp fix using following:  
#undef nsparameterassert #define nsparameterassert(condition)    ({\ {\ _pragma("clang diagnostic push")\ _pragma("clang diagnostic ignored \"-wcstring-format-directive\"")\ nsassert((condition), @"invalid parameter not satisfying: %s", #condition);\ _pragma("clang diagnostic pop")\ } while(0);\ }) there should better solution though.
all have update core-plot library latest version (that worked me) because:
if go coreplot git repo (https://github.com/core-plot/core-plot/commits/master),
within commits can see:
commits on feb 15, 2015 @eskroch fixed xcode 6.3 beta build warnings. eskroch authored on feb 15 that means problem fixed since feb 15, long time before ios 8.3 release, since beta version.