gpt4 book ai didi

ios - 构建平台之一时出错 : Error code 65 for command: xcodebuild with args: -xcconfig | cordova-plugin-purchase build fails

转载 作者:行者123 更新时间:2023-11-29 12:04:28 24 4
gpt4 key购买 nike

我真的被应用程序插件中的 cordova 困住了..

构建 iOS 应用程序时出现以下错误:

** BUILD FAILED **


The following build commands failed:
CompileC build/roma16.build/Debug-iphonesimulator/roma16.build/Objects-normal/i386/InAppPurchase.o roma16/Plugins/cc.fovea.cord
ova.purchase/InAppPurchase.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR building one of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/patrickhofer/Documents/Apps/roma
16/platforms/ios/cordova/build-debug.xcconfig,-project,roma16.xcodeproj,ARCHS=i386,-target,roma16,-configuration,Debug,-sdk,iphonesimul
ator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/patrickhofer/Documents/Apps/roma16/platforms/ios/build/emulator,SHARED_PRECO
MPS_DIR=/Users/patrickhofer/Documents/Apps/roma16/platforms/ios/build/sharedpch
You may not have the required environment or OS to build this project
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/patrickhofer/Documents/Apps/roma16/platforms/ios/cordova/build
-debug.xcconfig,-project,roma16.xcodeproj,ARCHS=i386,-target,roma16,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CO
NFIGURATION_BUILD_DIR=/Users/patrickhofer/Documents/Apps/roma16/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/patrickhofer/Do
cuments/Apps/roma16/platforms/ios/build/sharedpch

我之前也有过这个:

In file included from /Users/patrickhofer/Documents/Apps/roma16/platforms/ios/roma16/Plugins/cc.fovea.cordova.purchase/InAppPurchase.m:

9:
/Users/patrickhofer/Documents/Apps/roma16/platforms/ios/roma16/Plugins/cc.fovea.cordova.purchase/InAppPurchase.h:13:9: fatal error: 'Co
rdova/NSData+Base64.h' file not found
#import <Cordova/NSData+Base64.h>
^
1 error generated.

我觉得这也很奇怪:

In module 'Foundation' imported from /Users/patrickhofer/Documents/Apps/roma16/platforms/ios/roma16/Plugins/cordova-plugin-globalizatio
n/CDVGlobalization.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Fram
eworks/Foundation.framework/Headers/NSCalendar.h:69:2: note: 'NSMinuteCalendarUnit' has been explicitly marked deprecated here
NSMinuteCalendarUnit NS_CALENDAR_ENUM_DEPRECATED(10_4, 10_10, 2_0, 8_0, "Use NSCalendarUnitMinute instead") = NSCalendarUnitMin
ute,
^

这是我之前做的:

ionic plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="XXX"

我在我的应用程序中添加了逻辑:

var app = angular.module('starter', ['ionic', 'pascalprecht.translate']);

app.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if((window.device && device.platform == "iOS") && window.storekit) {
storekit.init({
debug: true,
ready: onReady,
purchase: onPurchase,
restore: onRestore,
error: onError
});
}
var onReady = function() { }
var onPurchase = function(transactionId, productId, receipt) { }
var onRestore = function(transactionId, productId, transactionReceipt) { }
var onError = function(errorCode, errorMessage) { }

if((window.device && device.platform == "iOS") && window.storekit) {
storekit.init({
debug: true,
ready: function() {
storekit.load(["unlockall"], function (products, invalidIds) {
console.log("In-app purchases are ready to go");
});
},
purchase: function(transactionId, productId, receipt) {
if(productId === 'unlockall') {
console.log("Purchased product id 1");
}
},
restore: function(transactionId, productId, transactionReceipt) {
if(productId === 'unlockall') {
console.log("Restored product id 1 purchase")
}
},
error: function(errorCode, errorMessage) {
console.log("ERROR: " + errorMessage);
}
});
}
if (window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

// Don't remove this line unless you know what you are doing. It stops the viewport
// from snapping when text inputs are focused. Ionic handles this internally for
// a much nicer keyboard experience.
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
});
});

非常感谢任何帮助!我要疯了...

最佳答案

我也为此苦苦挣扎了很长时间。这个解决方案对我有用:

  1. 删除您的 cordova-plugin-purchase 插件
  2. 重新安装,cordova 插件添加https://github.com/j3k0/cordova-plugin-purchase.git

https://github.com/j3k0/cordova-plugin-purchase/issues/403

关于ios - 构建平台之一时出错 : Error code 65 for command: xcodebuild with args: -xcconfig | cordova-plugin-purchase build fails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35583175/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com