【发布时间】:2016-10-03 11:47:12
【问题描述】:
我尝试在 ionic 中将我的应用程序构建到 IOS,但是当我尝试使用 ionic 构建 iOS 时出现错误。这是错误代码
构建失败
以下构建命令失败:
编译C build/varfinz.build/Debug-iphonesimulator/varfinz.build/Objects-normal/i386/CDVFile.o varfinz/Plugins/org.apache.cordova.file/CDVFile.m 正常 i386 Objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 失败)
错误:命令的错误代码 65:带有 args 的 xcodebuild: -xcconfig,/Users/lorenzo/Desktop/varfinz5/platforms/ios/cordova/build-debug.xcconfig,-project,varfinz.xcodeproj,ARCHS=i386,-target,varfinz,-configuration,Debug,-sdk,iphonesimulator, build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/lorenzo/Desktop/varfinz5/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/lorenzo/Desktop/varfinz5/platforms/ios/build/sharedpch
这是有错误的代码部分。错误在第 3 行,带有 sn-p self = (CDVFile*)[super initWithWebView:theWebView]; Xcode 说如下:“CDVPlugin 没有可见的@interface 声明选择器 initWithWebView
- (id)initWithWebView:(UIWebView*)theWebView
{
self = (CDVFile*)[super initWithWebView:theWebView];
if (self) {
filePlugin = self;
[NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]];
fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3];
// Get the Library directory path
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
self.appLibraryPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"files"];
// Get the Temporary directory path
self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath]; // remove trailing slash from NSTemporaryDirectory()
// Get the Documents directory path
paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
self.rootDocsPath = [paths objectAtIndex:0];
self.appDocsPath = [self.rootDocsPath stringByAppendingPathComponent:@"files"];
}
return self;
}
【问题讨论】:
-
你能提供一些代码吗?尝试在代码中添加一些断点并调试以查看它在哪里中断
-
嗨,是的,我编辑了上面的帖子
-
@Lorenzo 你在使用钥匙串还是 Facebook 插件?
-
嗨甘地,是的钥匙链
标签: ios cordova ionic-framework