Fix build on other platforms

This commit is contained in:
Cheng Zhao 2018-01-10 17:39:16 +09:00
parent 839df0ee5a
commit a883d3d50d
2 changed files with 3 additions and 1 deletions

View file

@ -51,6 +51,7 @@ namespace atom {
namespace api {
#if defined(OS_MACOSX)
// static
mate::Handle<InAppPurchase> InAppPurchase::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new InAppPurchase(isolate));
@ -86,6 +87,7 @@ void InAppPurchase::OnTransactionsUpdated(
const std::vector<in_app_purchase::Transaction>& transactions) {
Emit("transactions-updated", transactions);
}
#endif
} // namespace api

View file

@ -63,7 +63,7 @@ using InAppTransactionCallback =
*
* @param transaction - The transaction to pass to the callback.
*/
- (void)runCallback:(NSArray<SKPaymentTransaction*>*)transactions {
- (void)runCallback:(NSArray*)transactions {
// Convert the transaction.
std::vector<in_app_purchase::Transaction> converted;
converted.reserve([transactions count]);