aliyun / aliyun-oss-react-native

MIT License
148 stars 99 forks source link

yarn ios 报错 #92

Open SummerHenry opened 1 year ago

SummerHenry commented 1 year ago

yarn ios的时候报错 pod install 安装的aliyun-oss-react-native (1.0.0-alpha.7) 和 AliyunOSSiOS (2.10.16)

ios/Pods/Headers/Private/AliyunOSSiOS/OSSCompat.h:18:12: error: cannot find interface declaration for 'OSSClient' @interface OSSClient (Compat)

The following build commands failed: CompileC xxxx/Library/Developer/Xcode/DerivedData/xxx/Objects-normal/x86_64/RNAliyunOSS+OBJECT.o xxx/node_modules/aliyun-oss-react-native/ios/RNAliyunOSS+OBJECT.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'aliyun-oss-react-native' from project 'Pods')

simasesa commented 1 year ago

i have same issue...

jiangsongh commented 1 year ago

i have same issue...

zxxTiny commented 1 year ago

i have the same issue. React-native 0.70.6

zxxTiny commented 1 year ago

i fixed it. find the error file "OSSCompat.h". add import: #import "OSSClient.h" . [

image

](url)

forthenature commented 1 year ago

This problem is caused by the order of the header files in OSSService.h.

Just move this headers to the bottom and it will be resolved.

import "OSSGetObjectTaggingRequest.h"

import "OSSGetObjectTaggingResult.h"

import "OSSPutObjectTaggingRequest.h"

import "OSSPutObjectTaggingResult.h"

import "OSSDeleteObjectTaggingRequest.h"

import "OSSDeleteObjectTaggingResult.h"