简体   繁体   English

Cordova 3.2 ios添加插件“哪个config.xml? 它在哪里?”

[英]Cordova 3.2 ios add plugin “Which config.xml? Where is it?”

My app name is mobile-app 我的应用名称是移动应用

  1. Create a cordova project 创建一个cordova项目
  2. add ios platform 添加ios平台
  3. add plugin "cordova plugin add org.apache.cordova.contacts" 添加插件“cordova plugin add org.apache.cordova.contacts”
  4. go to project folder /platforms/ios/mobile-app/ and add the following to config.xml 转到项目文件夹/ p​​latforms / ios / mobile-app /并将以下内容添加到config.xml
 <feature name="Contacts"> <param name="ios-package" value="CDVContacts" /> </feature> 
  1. want to build the ios project with terminal "cordova build ios" 想用终端“cordova build ios”构建ios项目

I get the error in terminal: 我在终端收到错误:

generating config.xml from defaults for platform "ios"
Preparing ios project
Compiling app on platform "ios" via command "/Users/test/mobile-app/platforms/ios/cordova/build" 
[Error: An error occurred while building the ios project.** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
2014-01-13 20:49:45.743 xcodebuild[6403:4807]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details:  Failed to load dependencies output contents from ``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CDVContacts.d” couldn’t be opened because there is no such file." UserInfo=0x7fa634d724e0 {NSFilePath=/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d, NSUnderlyingError=0x7fa634d72430 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread:   <NSThread: 0x7fa634d723f0>{name = (null), num = 8}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2014-01-13 20:49:45.774 xcodebuild[6403:5d03]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details:  Failed to load dependencies output contents from ``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CDVContact.d” couldn’t be opened because there is no such file." UserInfo=0x7fa634e56370 {NSFilePath=/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d, NSUnderlyingError=0x7fa634e58160 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread:   <NSThread: 0x7fa634e53090>{name = (null), num = 9}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **


The following build commands failed:
    CompileC build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.o mobile-app/Plugins/org.apache.cordova.contacts/CDVContacts.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.o mobile-app/Plugins/org.apache.cordova.contacts/CDVContact.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
]

It's a known bug of los with cordova. 这是与cordova一起出名的洛杉矶臭虫。

you must remove ios platform with cordova platform remove ios. 你必须删除带有cordova平台的ios平台删除ios。

then install your plugin. 然后安装你的插件。

then add ios platform again. 然后再次添加ios平台。

if you don't do with this order ios seem don't be able to install the plugin right. 如果你没有这个订单,ios似乎无法正确安装插件。

i hope this may help you. 我希望这可以帮助你。 regards. 问候。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过 Cordova config.xml 向 iOS .plist 文件添加条目 - Add entry to iOS .plist file via Cordova config.xml Cordova / Phonegap / iOS:错误:找不到插件&#39;Plugin01&#39;,或者不是CDVPlugin。 在config.xml中检查您的插件映射 - Cordova/Phonegap / iOS: ERROR: Plugin 'Plugin01' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml 如何为Cordova 3.5联系人插件设置config.xml - How to set config.xml for cordova 3.5 contacts plugin Cordova / Phonegap在iOS上的config.xml中忽略全屏首选项 - Cordova/Phonegap ignores fullscreen preference in config.xml on iOS 如何使 Mac/iOS 上的cordova 停止在config.xml 和package.json 的插件版本号中添加插入符号(^) - How to make cordova on Mac / iOS to stop adding a caret (^) in plugin version numbers in config.xml and package.json 我们可以将config.xml放在IOS手机的空白处吗? - Where can we place config.xml in IOS phone gap? 科尔多瓦:如何设置特定于平台的config.xml文件,科尔多瓦构建后该文件不会被覆盖? - Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build? 科尔多瓦/ Wikitude-错误:找不到插件“ WikitudePlugin”,或者不是CDVPlugin。 在config.xml中检查您的插件映射 - Cordova / Wikitude - ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml Cordova ios 添加扩展 - 错误:找不到 -Info.plist 文件或 config.xml 文件 - Cordova ios adding extension - Error: could not find -Info.plist file, or config.xml file iOS Cordova Xcode项目设置与config.xml进行横向定向? - iOS Cordova Xcode Project Settings vs config.xml for Landscape Orientation?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM