I’m getting this error when building MoPub 4.4.0 from source with Xcode 7.3 (iOS 9.3)
mopub-ios-sdk/MoPubSDK/Internal/Utility/MPError.h:21:3: Typedef redefinition with different types (‘enum MPErrorCode’ (aka ‘MPErrorCode’) vs ‘enum MPErrorCode’)
iOS 9.3 has a new enum in MediaPlayer/MPError.h:
typedef NS_ENUM(NSInteger, MPErrorCode) {
MPErrorUnknown,
MPErrorPermissionDenied, // the user has not granted permission for this request.
MPErrorCloudServiceCapabilityMissing, // the user has not enabled this capability
MPErrorNetworkConnectionFailed, // the device could not connect to the network
MPErrorNotFound, // the id could not be found in the current storefront
MPErrorNotSupported, // the request is not supported (ex: trying to add items to a smart playlist)
} NS_ENUM_AVAILABLE_IOS(9_3);
…which conflicts with MoPub’s mopub-ios-sdk/MoPubSDK/Internal/Utility/MPError.h:
typedef enum {
MPErrorUnknown = -1,
MPErrorNoInventory = 0,
MPErrorAdUnitWarmingUp = 1,
MPErrorNetworkTimedOut = 4,
MPErrorServerError = 8,
MPErrorAdapterNotFound = 16,
MPErrorAdapterInvalid = 17,
MPErrorAdapterHasNoInventory = 18
} MPErrorCode;