尝试为iOS远程编译Google Mobile Ads框架时,出现此错误:
: In file included from D:\Program Files\Epic Games\UE_4.21\Engine\Intermediate\UnzippedFrameworks\ThirdParty\IOS\Google\GoogleMobileAds.embeddedframework\GoogleMobileAds.framework\Headers\GoogleMobileAds.h:38:
LogPlayLevel: Error: D:\Program Files\Epic Games\UE_4.21\Engine\Intermediate\UnzippedFrameworks\ThirdParty\IOS\Google\GoogleMobileAds.embeddedframework\GoogleMobileAds.framework\Headers\GADMediaContent.h:21:1: error: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Werror,-Wobjc-property-no-attribute]
LogPlayLevel: @property(nonatomic, nullable) UIImage *mainImage;
LogPlayLevel: ^
这样的文件非常简单:
//
// GADMediaContent.h
// Google Mobile Ads SDK
//
// Copyright 2019 Google Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// Provides media content information. Interact with instances of this
class on the main queue
/// only.
@interface GADMediaContent : NSObject
/// Media content aspect ratio (width/height). The value is 0 when there's
no media content or the
/// media content aspect ratio is unknown.
@property(nonatomic, readonly) CGFloat aspectRatio;
/// The main image to be displayed when the media content doesn't contain video.
@property(nonatomic, nullable) UIImage *mainImage;
@end
NS_ASSUME_NONNULL_END
所以这不是我的代码,来自Google。我正在从Windows计算机上使用Unreal Engine iOS远程编译