为 Xamarin iOS 创建 Aviary SDK 绑定
Posted
技术标签:
【中文标题】为 Xamarin iOS 创建 Aviary SDK 绑定【英文标题】:Creating Aviary SDK Binding for Xamarin iOS 【发布时间】:2014-06-27 07:58:03 【问题描述】:我对 Xamarin ios 有足够的了解,但我对 Monotouch Bindings 很幼稚。 我需要在我的项目中使用 Aviary SDK,我通过阅读了解我需要遵循以下步骤:
-
在 Xcode 中创建一个静态项目,链接 Aviary SDK。
创建胖二进制文件
在 Xamarin 中创建绑定项目
添加 ApiDefinition.cs 和 StructsAndEnums.cs
在绑定项目中添加静态库(胖二进制文件)
等等。
但问题是,我被困在最初的一步。 我遵循了这个Setup Guide,但问题是,我认为我遵循了这些步骤,在导入时,我收到了这个错误:
未找到 AviarySDK/AviarySDK.h 文件
我已经下载了我从here 下载的 AviarySDK 4.0.1。
编辑 谢谢 Jonathan Peppers,我已按照您的步骤操作,但是对于 ApiDefinition.cs,按照 from 中的步骤,我知道我需要从 Objective Sharpie 生成 ApiDefinition.cs,但我收到此错误。
你能帮我解决这个问题吗?
In file included from /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:8:
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorProduct.h:17:8: error: unknown type name 'NSString'
static 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: error: unknown type name 'NSString'
static 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: error: cannot find interface declaration for 'NSObject', superclass of '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: error: unknown type name 'NSString'
@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:44:1: error: property with 'copy' attribute must be of object type
@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: error: unknown type name '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: error: property with 'copy' attribute must be of object type
@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: error: unknown type name '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: error: property with 'copy' attribute must be of object type
@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: error: unknown type name '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: error: cannot find protocol declaration for 'NSObject'
@protocol AFInAppPurchaseManagerDelegate <NSObject>
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:40:4: error: expected a type
- (NSString *)inAppPurchaseManager:(id<AFInAppPurchaseManager>)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: error: expected ':'
- (NSString *)inAppPurchaseManager:(id<AFInAppPurchaseManager>)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: error: cannot find protocol declaration for 'NSObject'
@protocol AFInAppPurchaseManager <NSObject>
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:62:72: error: expected ';' at end of declaration list
@property (nonatomic, weak) id<AFInAppPurchaseManagerDelegate> delegate DEPRECATED_ATTRIBUTE;
^
;
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:62:73: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
@property (nonatomic, weak) id<AFInAppPurchaseManagerDelegate> delegate DEPRECATED_ATTRIBUTE;
^~~~~~~~~~~~~~~~~~~~
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFInAppPurchaseManager.h:70:73: error: unknown type name '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: error: cannot declare variable inside @interface or @protocol
@property (nonatomic, weak) id<AFInAppPurchaseManagerDelegate> delegate DEPRECATED_ATTRIBUTE;
^
1 warning and 18 errors generated.
Error while processing /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: error: cannot find interface declaration for 'NSObject', superclass of 'AFOpenGLManager'
@interface AFOpenGLManager : NSObject
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFOpenGLManager.h:34:40: error: expected a type
+ (void)setPurgeGPUMemoryWhenPossible:(BOOL)purgeGPUMemory;
^
2 errors generated.
Error while processing /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: error: cannot find interface declaration for 'NSObject', superclass of '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: error: unknown type name 'CGSize'
@property (nonatomic, assign, readonly) CGSize size;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:48:60: error: unknown type name 'BOOL'
@property (nonatomic, assign, readonly, getter=isCanceled) BOOL canceled;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:51:60: error: unknown type name 'BOOL'
@property (nonatomic, assign, readonly, getter=isModified) BOOL modified;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorContext.h:58:41: error: unknown type name '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: error: unknown type name 'UIImage'
- (void)render:(void (^)(UIImage *result))completion;
^
6 errors generated.
Error while processing /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: error: unknown type name 'NSString'
extern NSString *const kAFEnhance; /* Enhance */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:15:8: error: unknown type name 'NSString'
extern NSString *const kAFEffects; /* Effects */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:16:8: error: unknown type name 'NSString'
extern NSString *const kAFStickers; /* Stickers */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:17:8: error: unknown type name 'NSString'
extern NSString *const kAFOrientation; /* Orientation */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:18:8: error: unknown type name 'NSString'
extern NSString *const kAFCrop; /* Crop */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:19:8: error: unknown type name 'NSString'
extern NSString *const kAFAdjustments; /* Adjustments */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:20:8: error: unknown type name 'NSString'
extern NSString *const kAFSharpness; /* Sharpness */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:21:8: error: unknown type name 'NSString'
extern NSString *const kAFDraw; /* Draw */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:22:8: error: unknown type name 'NSString'
extern NSString *const kAFText; /* Text */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:23:8: error: unknown type 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: error: unknown type name 'NSString'
extern NSString *const kAFWhiten; /* Whiten */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:25:8: error: unknown type name 'NSString'
extern NSString *const kAFBlemish; /* Blemish */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:26:8: error: unknown type 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: error: unknown type name 'NSString'
extern NSString *const kAFFrames; /* Frames */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:28:8: error: unknown type name 'NSString'
extern NSString *const kAFFocus; /* TiltShift */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:29:8: error: unknown type name 'NSString'
extern NSString *const kAFSplash; /* ColorSplash */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:31:8: error: unknown type name 'NSString'
extern NSString *const kAFLeftNavigationTitlePresetCancel; /* Cancel */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:32:8: error: unknown type name 'NSString'
extern NSString *const kAFLeftNavigationTitlePresetBack; /* Back */
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorCustomization.h:33:8: error: unknown type name 'NSString'
extern NSString *const kAFLeftNavigationTitlePresetExit; /* Exit */
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Error while processing /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: error: unknown type name 'NSString'
static 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: error: unknown type name 'NSString'
static 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: error: cannot find interface declaration for 'NSObject', superclass of '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: error: unknown type name 'NSString'
@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:44:1: error: property with 'copy' attribute must be of object type
@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: error: unknown type name '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: error: property with 'copy' attribute must be of object type
@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: error: unknown type name '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: error: property with 'copy' attribute must be of object type
@property (nonatomic, copy, readonly) NSString *internalProductIdentifier;
^
10 errors generated.
Error while processing /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/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: error: unknown type name 'NSString'
extern NSString *const AFPhotoEditorSessionCancelledNotification;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:16:35: error: cannot find interface declaration for 'NSObject', superclass of '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: error: unknown type name '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: error: unknown type name 'BOOL'
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:32:60: error: unknown type name 'BOOL'
@property (nonatomic, assign, readonly, getter=isModified) BOOL modified;
^
/Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h:44:51: error: expected a type
- (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: error: expected a type
- (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: error: expected a type
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image maxSize:(CGSize)size;
^
8 errors generated.
Error while processing /Users/ramnathiyer/Documents/Projects/Aviary-iOS-SDK/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/AFPhotoEditorSession.h.
sharpie-clang-parser exited with error code: 1
System.Exception: sharpie-clang-parser exited with error code: 1
at Sharpie.ObjC.Parser.Parse (System.IO.TextWriter sexpWriter, System.Collections.Generic.List`1 stderrLines) [0x00000] in <filename unknown>:0
at Sharpie.Mac.MainWindowController+<GenerateBinding>c__AnonStorey3.<>m__B (System.Object o) [0x00000] in <filename unknown>:0
【问题讨论】:
【参考方案1】:如果您从他们的网站(而不是 Github)下载 SDK,步骤 1 和 2 已经为您完成。
在 zip 文件中,有一个 AviarySDK.framework
文件夹。这是 Obj-C 库有时驻留的地方。 Versions/A/AviarySDK
中的文件需要重命名为 AviarySDK.a
并添加到 Xamarin 绑定项目中。
您还需要将AviarySDKResources.bundle
中的所有文件添加到您的项目中,否则该库可能无法正常工作。
【讨论】:
非常感谢您的回复,我已按照您的步骤进行操作,但是对于 ApiDefinition.cs,按照from 中的步骤,我知道我需要从 Objective 生成 ApiDefinition.cs Sharpie,但我得到这个错误。你能帮我解决这个问题吗?以上是关于为 Xamarin iOS 创建 Aviary SDK 绑定的主要内容,如果未能解决你的问题,请参考以下文章
如何在 Xamarin for iOS 中呈现具有不同导航的 viewController
可以使用 Xamarin 为原生 iOS 和 Android 应用程序创建客户端 sdk 吗?
Xamarin 表单视频缩略图:尝试在 IOS 13.1.3 设备上创建视频缩略图表单本地存储时出错