Я создаю привязку Xamarin для WePay.iOS SDK, используя объективный маркер. https://github.com/wepay/wepay-ios
Мне удалось создать файлы APIDefinition.cs и StructsAndEnums.cs. Однако, когда я создал проект привязки, он не компилируется успешно.
[Export ("initWithSwipedInfo:")]
IntPtr Constructor (NSObject swipedInfo);
// -(instancetype)initWithEMVInfo:(id)emvInfo;
[Export ("initWithEMVInfo:")]
IntPtr Constructor (NSObject emvInfo);
Я понимаю, что мне нужно изменить NSOBject на правильный тип данных. Однако, когда я просматриваю файл Objective C. Я не могу понять, какой тип данных я должен использовать. Я ценю, если кто-то может направить меня в этом.
Класс Objective-C
@interface WPPaymentInfo : NSObject
@property (nonatomic, strong, readonly) NSString *firstName;
@property (nonatomic, strong, readonly) NSString *lastName;
@property (nonatomic, strong, readonly) NSString *email;
@property (nonatomic, strong, readonly) NSString *paymentDescription;
@property (nonatomic, readonly) BOOL isVirtualTerminal;
@property (nonatomic, strong, readonly) WPAddress *billingAddress;
@property (nonatomic, strong, readonly) WPAddress *shippingAddress;
@property (nonatomic, strong, readonly) id paymentMethod;
@property (nonatomic, strong, readonly) id swiperInfo;
@property (nonatomic, strong, readonly) id manualInfo;
@property (nonatomic, strong, readonly) id emvInfo;
- (instancetype) initWithSwipedInfo:(id)swipedInfo;
- (instancetype) initWithEMVInfo:(id)emvInfo;
- (instancetype) initWithFirstName:(NSString *)firstName
lastName:(NSString *)lastName
email:(NSString *)email
billingAddress:(WPAddress *)billingAddress
shippingAddress:(WPAddress *)shippingAddress
cardNumber:(NSString *)cardNumber
cvv:(NSString *)cvv
expMonth:(NSString *)expMonth
expYear:(NSString *)expYear
virtualTerminal:(BOOL)virtualTerminal;
- (void) addEmail:(NSString *)email;
@end