lundi 7 septembre 2020

Updating C++ Language Dialect Setting in XCode produces multiple errors in the app

We are using XCode with Objective-C to develop our app since 2012.

We have updated the FBSDKShareKit framework and now we are getting the following error:

"Photos requires C++11 or later"

The error appears on PHImageManager.h, which is part of the Photos framework. The new Facebook SDK seems to be using this framework.

The solution I found for this specific issue is to change the C++ Language Dialect setting to GNU++11. But once we change it, we're getting numerous errors like the following:

  • spaces are required between " sign and variable names.
  • variables of simple types (bool, int, float, etc.) cannot be set to nil.
  • floats cannot be implicitly set to double values.
  • enums cannot be set to numbers (casting is needed).

We'd have to refactor our code in 1000's of places across 100's of different files to get rid of all of these errors.

Is there a way to circumvent this issue, either by not updating the C++ Language Dialect setting or by ignoring specific error types?

Aucun commentaire:

Enregistrer un commentaire