transform3D crashes on iOS 12 when compiled with iOS 13 SDK

UITableViewCellContentView setTransform3D: causes a crash on iOS 12 when built with the iOS 13 SDK, even though the API is clearly marked as available in iOS 12 and higher. What's going on?


This doesn't seem to just be happening with this API either. Need some guidance from Apple on this. Why aren't iOS 12 APIs working on iOS 12 devices when compiled with the iOS 13 SDK?

Accepted Reply

The property is incorrectly annotated to be available on iOS 12 and above. This annotation should reference iOS 13, which is where this was implemented.
For iOS 12, you will have to use view.layer.transform3D, but for code running on iOS 13 and above, do use view.transform3D.

Replies

BUMP! Anyone else having this issue?

So, post the first dozen or so lines of the backtrace when the crash occurs. Also, any logged error messages or exceptions.

I'm seeing this as well:


if #available(iOS 12, *) {

cardFront.transform3D = frontTransform

// } else {

// <#fallback statements#>

}



2019-11-01 15:08:11.414352-0700 WingMate[84481:23447277] -[UIImageView setTransform3D:]: unrecognized selector sent to instance 0x7fb65ae488c0

2019-11-01 15:08:11.432544-0700 WingMate[84481:23447277] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setTransform3D:]: unrecognized selector sent to instance 0x7fb65ae488c0'

*** First throw call stack:

(

0 CoreFoundation 0x000000010568a8db __exceptionPreprocess + 331

1 libobjc.A.dylib 0x0000000104c2dac5 objc_exception_throw + 48

2 CoreFoundation 0x00000001056a8c94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132

3 UIKitCore 0x0000000110bf3235 -[UIResponder doesNotRecognizeSelector:] + 287

4 CoreFoundation 0x000000010568f623 ___forwarding___ + 1443

5 CoreFoundation 0x0000000105691418 _CF_forwarding_prep_0 + 120

6 WingMate 0x0000000103f29b97 $s8WingMate20AutomaViewControllerC12panningBegan10recognizerySo22UIPanGestureRecognizerC_tF + 9367

7 WingMate 0x0000000103f27522 $s8WingMate20AutomaViewControllerC5onPanyySo22UIPanGestureRecognizerCF + 290

8 WingMate 0x0000000103f276d4 $s8WingMate20AutomaViewControllerC5onPanyySo22UIPanGestureRecognizerCFTo + 68

9 UIKitCore 0x00000001107b0381 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57

Post not yet marked as solved Up vote reply of tdc Down vote reply of tdc
I have the same issue, I dont know how to solve it
The property is incorrectly annotated to be available on iOS 12 and above. This annotation should reference iOS 13, which is where this was implemented.
For iOS 12, you will have to use view.layer.transform3D, but for code running on iOS 13 and above, do use view.transform3D.