如何给Xamarin.iOS StoreKit框架引用或忽略需要

问题描述 投票:1回答:1

我为Flurry Analytics构建了Xamarin.iOS绑定库。效果很好,除了我无法在发布模式下构建。它说

Native linking failed, undefined Objective-C class: SKPaymentQueue. The symbol '_OBJC_CLASS_$_SKPaymentQueue' could not be found in any of the libraries or frameworks linked with your application. (MT5211)

在Flurry.h文件中,我看到它需要StoreKit

/*!
 *  @brief Records an Apple Store transaction.
 *  @since 7.8.0
 *
 *  This method needs to be called before a transaction is finished and finalized.
 *  @note: Needs a 'required' dependency on StoreKit for this API to function correctly.
 *
 *  @param transaction an SKPaymentTransaction.
 *  @param statusCallback a callback gettign called when the status of  ID that is associated with the event
 *
 */
+ (void) logPaymentTransaction:(nonnull SKPaymentTransaction *)transaction
                statusCallback:(nullable void(^)(FlurryTransactionRecordStatus))statusCallback;

但是我永远不会调用该方法。我没有在ApiDefinition.cs中添加它。

有没有一种方法可以构建应用程序,并让Xamarin知道我真的不需要StoreKit?或者,即使我不使用它,也可以轻松地包含StoreKit.framework参考吗?

谢谢!

xamarin xamarin.ios
1个回答
1
投票
[assembly: LinkWith ("XXXX", .... , Frameworks="StoreKit")]

re:LinkWithAttribute.Frameworks

© www.soinside.com 2019 - 2024. All rights reserved.