The problem is that the the cardIOPaymentViewControllerForResponder: method is defined as + (CardIOPaymentViewController *)cardIOPaymentViewControllerForResponder:(UIResponder *)responder. So it is expecting a UIResponder * as the parameter.
https://github.com/card-io/card.io-iOS-source/blob/master/Classes/CardIOVideoStream.mm#L267 is calling CardIOPaymentViewController *vc = [CardIOPaymentViewController cardIOPaymentViewControllerForResponder:self.delegate]; and self.delegate is defined as @property(nonatomic, weak, readwrite) id<CardIOVideoStreamDelegate> delegate; so it is not guaranteed to be a UIResponder *.
I honestly have no idea how this currently compiles on Xcode 7 but apparently the compiler has been updated for Xcode 8 and is now catching this.
I think you can just update CardIOVideoStream.h to be @property(nonatomic, weak, readwrite) UIResponder<CardIOVideoStreamDelegate> *delegate; and then this compiler error will go away. It looks like the CardIOCameraView is the only thing that uses CardIOVideoStream and it is a subclass of UIView which is a UIResponder.
card.io is failing to compile on Xcode 8 on line https://github.com/card-io/card.io-iOS-source/blob/master/Classes/CardIOVideoStream.mm#L267
The problem is that the the
cardIOPaymentViewControllerForResponder:
method is defined as+ (CardIOPaymentViewController *)cardIOPaymentViewControllerForResponder:(UIResponder *)responder
. So it is expecting aUIResponder *
as the parameter.https://github.com/card-io/card.io-iOS-source/blob/master/Classes/CardIOVideoStream.mm#L267 is calling
CardIOPaymentViewController *vc = [CardIOPaymentViewController cardIOPaymentViewControllerForResponder:self.delegate];
andself.delegate
is defined as@property(nonatomic, weak, readwrite) id<CardIOVideoStreamDelegate> delegate;
so it is not guaranteed to be aUIResponder *
.I honestly have no idea how this currently compiles on Xcode 7 but apparently the compiler has been updated for Xcode 8 and is now catching this.
I think you can just update
CardIOVideoStream.h
to be@property(nonatomic, weak, readwrite) UIResponder<CardIOVideoStreamDelegate> *delegate;
and then this compiler error will go away. It looks like theCardIOCameraView
is the only thing that usesCardIOVideoStream
and it is a subclass ofUIView
which is aUIResponder
.