Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KIF tests fail to build under XCode 5. #223

Closed
cuteiosdev opened this issue Jun 13, 2013 · 4 comments
Closed

KIF tests fail to build under XCode 5. #223

cuteiosdev opened this issue Jun 13, 2013 · 4 comments

Comments

@cuteiosdev
Copy link

When running tests under XCode 5, it fails to build due to a linker error with UITouch.

The error produced by XCode is:

Undefined symbols for architecture armv7s:
  "_OBJC_IVAR_$_UITouch._gestureView", referenced from:
      -[UITouch(KIFAdditions) initAtPoint:inWindow:] in libPods-IntegrationTests.a(UITouch-KIFAdditions.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The project being tested is an iOS 6.0 project.

The workaround is to use XCode 4 to run KIF tests.

@bnickel
Copy link
Contributor

bnickel commented Jun 24, 2013

It would appear the SDK you are compiling against does not have this iVar. Using reflection, there is a method -[UITouch setGestureView:(UIView *)gestureView] which you could use in place of an iVar:

@interface UITouch (KIFPrivate)
    - (void)setGestureView:(UIView *)gestureView;
@end

...

    if ([self respondsToSelector:@selector(setGestureView:)]) {
        [self setGestureView:hitTestView];
    }

This works for me on every SDK I've tried.

@bnickel
Copy link
Contributor

bnickel commented Jun 24, 2013

Internally, it appears that all ivars are being set via undocumented setters. The category could be reworked only to use the same setters as _UIApplicationHandleEvent and not reference any ivars.

@bnickel
Copy link
Contributor

bnickel commented Jun 27, 2013

This is fixed in pull request #225.

@bnickel
Copy link
Contributor

bnickel commented Aug 8, 2013

Resolved with merge of pull request #225.

@bnickel bnickel closed this as completed Aug 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants