我的Podfile
是
platform :ios, '7.0'
pod 'REFrostedViewController', '~> 2.4.7'
pod 'AFNetworking', '~> 2.4'
pod 'SWTableViewCell', '~> 0.3.6'
在我的TransactionViewController
中,我在
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// make last cell visible: http://stackoverflow.com/questions/11928085/uitableview-not-visible-the-last-cell-when-scroll-down
tableView.contentInset = UIEdgeInsetsMake(0, 0, 120, 0);
[tableView registerNib:[UINib nibWithNibName:@"TransactionCell" bundle:nil] forCellReuseIdentifier:CellIdentifier];
TransactionCell *transactionCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (transactionCell == nil) {
transactionCell = [[TransactionCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
transactionCell.rightUtilityButtons = self.rightButtonActions;
...
}
和
- (NSArray *)rightButtonActions {
NSMutableArray *rightUtilityButtons = [NSMutableArray new];
[rightUtilityButtons sw_addUtilityButtonWithColor:
[UIColor colorWithRed:0.78f green:0.78f blue:0.8f alpha:1.0]
title:@"More"];
[rightUtilityButtons sw_addUtilityButtonWithColor:
[UIColor colorWithRed:1.0f green:0.231f blue:0.188 alpha:1.0f]
title:@"Delete"];
return rightUtilityButtons;
}
这是来自github
的示例当我运行我的应用程序时,Xcode
失败并显示以下错误
ld: warning: directory not found for option '-L/Users/harith/code/XcodeProjects/pennyapp-ios/Pods/build/Debug-iphoneos'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SWTableViewCell", referenced from:
_OBJC_CLASS_$_TransactionCell in TransactionCell.o
"_OBJC_METACLASS_$_SWTableViewCell", referenced from:
_OBJC_METACLASS_$_TransactionCell in TransactionCell.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我是iOS
编程新手,不知道如何解决这个问题。
但我确实看到,对于Podfile
中的其他两个依赖项,我在框架中有相应的*.a
文件,但SWTableViewCell
没有,问题是什么?
答案 0 :(得分:1)
如果您查看构建日志,您将看到有关不构建库的警告,因为它缺少体系结构......
在每个pod构建设置中,将“Build Active Architectures Only”更改为NO,以用于所有设置(Debug / Dist / Release)。