我遵循的步骤:
我已经从 https://developers.aviary.com/docs/ios下载了 Aviary SDK 4.0.1
我创建了一个 iOS 绑定项目。
将 AviarySDK 文件重命名为 AviarySDK.a
将此文件添加到绑定项目中。
将 AviarySDKResources.bundle 添加到此项目。
现在根据绑定项目的文档(http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c/binding_walkthrough/offline.pdf),我尝试通过选择标题在ObjectiveSharpie中生成ApiDefinition.cs来自路径“AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/”的文件
这会产生一个错误:
在 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:8 中包含的文件中:/Users/ramnathiyer/Documents/项目/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:17:8:错误:未知类型名称'NSString'静态NSString *const kAFProductEffectsGrunge = @" com.aviary.effectpack.01"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:22:8:错误:未知类型名称'NSString'静态 NSString *const kAFProductEffectsNostalgia = @"com.aviary.effectpack.02"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK。framework/Versions/A/Headers/AFPhotoEditorProduct.h:27:8: error: unknown type name 'NSString' static NSString *const kAFProductEffectsViewfinder = @"com.aviary.effectpack.03"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:37:35:错误:找不到'接口声明NSObject','AFPhotoEditorProduct' 的超类 @interface AFPhotoEditorProduct : NSObject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/ramnathiyer/ Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:44:39:错误:未知类型名称'NSString'@property(非原子,复制, 只读) NSString *productName; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:44:1:错误:具有“复制”属性的属性必须是对象类型 @property (nonatomic, copy, readonly) NSString *productName; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:52:39:错误:未知类型名称'NSString' @property (nonatomic, copy, readonly) NSString *productDescription; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:52:1:错误:具有“复制”属性的属性必须是对象类型@property(非原子,复制,只读)NSString *productDescription; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:64:39:错误:未知类型名称'NSString' @property (nonatomic, copy, readonly) NSString *internalProductIdentifier; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:64:1:错误:具有“复制”属性的属性必须是对象类型 @property (nonatomic, copy, readonly) NSString *internalProductIdentifier; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:16:8:错误:未知类型名称'NSString' extern NSString *const kAFPhotoEditorEffectsIAPEnabledKey; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:21:43:错误:找不到'的协议声明NSObject' @protocol AFInAppPurchaseManagerDelegate ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:40:4:错误:预期一种
- (NSString *)inAppPurchaseManager:(id)manager productIdentifierForProduct:(AFPhotoEditorProduct *)product DEPRECATED_ATTRIBUTE; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:40:152:错误:预期':'
- (NSString *)inAppPurchaseManager:(id)manager productIdentifierForProduct:(AFPhotoEditorProduct *)product DEPRECATED_ATTRIBUTE; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:51:35:错误:找不到“协议声明” NSObject'@protocol AFInAppPurchaseManager ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:62:72:错误:预期';' 在声明列表的末尾@property (nonatomic, weak) id delegate DEPRECATED_ATTRIBUTE; ^ ; /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:62:73:警告:缺少类型说明符,默认为' int' [-Wimplicit-int] @property (nonatomic, weak) id delegate DEPRECATED_ATTRIBUTE; ^~~~~~~~~~~~~~~~~~~~ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A /Headers/AFInAppPurchaseManager.h:70:73: 错误:未知类型名称 'BOOL' @property (nonatomic, assign, readonly, getter=isObservingTransactions) BOOL observingTransactions; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:62:73:错误:无法在@interface 内声明变量或@protocol @property (nonatomic, weak) id delegate DEPRECATED_ATTRIBUTE; ^ 1 个警告和 18 个错误生成。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h 时出错。/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFOpenGLManager.h:28:30:错误:找不到'NSObject的接口声明','的超类
- (void)setPurgeGPUMemoryWhenPossible:(BOOL)purgeGPUMemory; ^ 2 个错误生成。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFOpenGLManager.h 时出错。/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:39:35:错误:找不到'NSObject的接口声明','AFPhotoEditorContext' 的超类 @interface AFPhotoEditorContext : NSObject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/ramnathiyer/Documents /Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:45:41:错误:未知类型名称'CGSize'@property(非原子,分配,只读)CGSize 大小;^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:48:60:错误:未知类型名称'BOOL' @property (nonatomic, assign, readonly, getter=isCanceled) BOOL 取消;^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:51:60:错误:未知类型名称'BOOL' @property (nonatomic, assign, readonly, getter=isModified) BOOL 已修改;^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:58:41:错误:未知类型名称' BOOL' @property (nonatomic, assign, readonly) BOOL hasBegunRendering; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:75:26:错误:未知类型名称'UIImage'
- (void)render:(void (^)(UIImage *result))完成;^ 产生 6 个错误。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h 时出错。/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:14:8:错误:未知类型名称“NSString”外部NSString常量 kAFEnhance; /增强 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:15:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFEffects; /效果 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:16:8: 错误:未知类型名称'NSString' 外部 NSString常量 kAFStickers; /贴纸 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:17:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFOrientation; /方向 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:18:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFCrop; /裁剪 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:19:8:错误:未知类型名称'NSString' 外部 NSString常量 kAFAdjustments; /调整 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:20:8: 错误:未知类型name 'NSString' extern NSString const kAFSharpness; /清晰度 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:21:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFDraw; /绘制 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:22:8:错误:未知类型名称'NSString' 外部 NSString常量 kAFText; /文本 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:23:8: 错误:未知类型name 'NSString' extern NSString const kAFRedeye; / Redeye */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:24:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFWhiten; /变白 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:25:8:错误:未知类型名称'NSString' 外部 NSString常量 kAFBlemish; /瑕疵 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:26:8: 错误:未知类型name 'NSString' extern NSString const kAFMeme; / Meme */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:27:8:错误:未知类型name 'NSString' extern NSString const kAFFrames; /帧 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:28:8:错误:未知类型名称'NSString' 外部 NSString常量 kAFFocus; / TiltShift */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:29:8: 错误:未知类型名称 'NSString' 外部 NSString常量 kAFSplash; / ColorSplash */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:31:8: 错误:未知类型name 'NSString' extern NSString const kAFLeftNavigationTitlePresetCancel; /取消 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:32:8:错误:未知类型名称'NSString' 外部 NSString常量 kAFLeftNavigationTitlePresetBack; /返回 */ ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:33:8: 错误:未知类型name 'NSString' extern NSString const kAFLeftNavigationTitlePresetExit; /退出 */ ^ 致命错误:发出太多错误,现在停止 [-ferror-limit=] 生成 20 个错误。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h 时出错。/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:17:8:错误:未知类型名称'NSString'静态NSString *const kAFProductEffectsGrunge = @"com.aviary.effectpack.01"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:22:8:错误:未知类型名称'NSString'静态 NSString *const kAFProductEffectsNostalgia = @"com.aviary.effectpack.02"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:27:8:错误:未知类型名称'NSString'静态 NSString *const kAFProductEffectsViewfinder = @"com.aviary.effectpack.03"; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:37:35:错误:找不到'接口声明NSObject', 'AFPhotoEditorProduct' 的超类 @interface AFPhotoEditorProduct : NSObject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/ramnathiyer/ Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:44:39:错误:未知类型名称'NSString'@property(非原子,复制, 只读) NSString *productName; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:44:1:错误:具有“复制”属性的属性必须是对象类型 @property (nonatomic, copy, readonly) NSString *productName; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:52:39:错误:未知类型名称'NSString' @property (nonatomic, copy, readonly) NSString *productDescription; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:52:1:错误:带有“副本”的属性 属性必须是对象类型 @property (nonatomic, copy, readonly) NSString *productDescription; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:64:39:错误:未知类型名称'NSString' @property (nonatomic, copy, readonly) NSString *internalProductIdentifier; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:64:1:错误:具有“复制”属性的属性必须是对象类型 @property (nonatomic, copy, readonly) NSString *internalProductIdentifier; ^ 产生 10 个错误。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK 时出错。框架/版本/A/Headers/AFPhotoEditorProduct.h。/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:10:8:错误:未知类型名称“NSString”外部NSString *const AFPhotoEditorSessionCancelledNotification; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:16:35:错误:找不到'接口声明NSObject','AFPhotoEditorSession' 的超类 @interface AFPhotoEditorSession : NSObject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/ramnathiyer/ Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:22:56:错误:未知类型名称'BOOL' @property (nonatomic, assign, readonly, getter=isOpen) BOOL open; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:27:61:错误:未知类型名称'BOOL' @property (nonatomic, assign, readonly, getter=isCancelled) BOOL 已取消;^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:32:60:错误:未知类型名称'BOOL' @property (nonatomic, assign, readonly, getter=isModified) BOOL 已修改;^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK。
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:55:51:错误:预期类型
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image maxSize:(CGSize)size; ^ /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:55:76:错误:预期类型
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image maxSize:(CGSize)size; ^ 产生 8 个错误。处理 /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h 时出错。Sharpie-clang-parser 退出并出现错误代码:1 System.Exception:sharpie-clang-parser 退出并出现错误代码:1 在 Sharpie.ObjC.Parser.Parse (System.IO.TextWriter sexpWriter, System.Collections.Generic.List` 1 stderrLines) [0x00000] in :0 at Sharpie.Mac.MainWindowController+c__AnonStorey3.<>m__B (System.Object o) [0x00000] in :0
请问有人可以帮我吗?