0

My Podfile is

platform :ios, '7.0'
pod 'REFrostedViewController', '~> 2.4.7'
pod 'AFNetworking', '~> 2.4'
pod 'SWTableViewCell', '~> 0.3.6'

In my TransactionViewController, I do following in

- (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;
...
}

and

- (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;
}

This is from example from github

when I run my application, Xcode fails with following error

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)

I am new to iOS programming and not sure how to resolve this.

I do see however, that for my other two dependencies in Podfile, I have corresponding *.a file in framework, but not for SWTableViewCell, what's the issue?

enter image description here

daydreamer
  • 87,243
  • 191
  • 450
  • 722

1 Answers1

1

If you look in the build logs you'll see warnings about not building libraries because it's missing architectures...

In each of the pod build settings change "Build Active Architectures Only" to NO for all settings (Debug/Dist/Release).

enter image description here

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
  • My apologies, but where exactly can I find "each of the pod build settings"? – daydreamer Nov 29 '14 at 04:49
  • Go into the Pods project in the side navigator, each pod has a target under that project - look in the build settings for each target (for instance, AFNetworking will have it's own target). Added a picture I hope makes this more clear. – Kendall Helmstetter Gelner Nov 29 '14 at 05:28