My app for iOS crashes on Apple Silicone Mac

I'm developing an iOS app. While executing on iPhone or iPad, there is no problem. But, when I run it on Mac from Xcode, the app crashes.

Debugger shows the crashes occur when they execute code regarding vector graphics like [UIBezierPath bezierPath] or [UIImage systemImageWIthNamed:] where image made of vector.

Are there anyone experienced such a phenomenon like me?

But, when I run it on Mac from Xcode, the app crashes.

So, just to confirm, this crash happens when you run the app in iOS Simulator on your Mac?

If you run it from the Home screen in the simulator, does it also crash?

Also, you tagged this with Apple Silicon. Does that mean that the crash only happens in the simulator running on an Apple silicon Mac? Or do you also see the crash when you run your app in the simulator on an Intel Mac?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’m sorry but I can’t read your post. Please put it in a reply rather than the comments, and also attach the full crash report. See Posting a Crash Report for advice on the latter.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’m sorry but I can’t read your post. Please put it in a reply rather than the comments, and also attach the full crash report. See Posting a Crash Report for advice on the latter.

I apologize to post an unreadable comment.

Thanks for your reply. I ran the app on my m1-mac. the product resides on maccatalyst folder, I thinks it's native. (the icon shows no "no-enter" sign) I checked the crash log. It shows that some infinite recursive call exists. On iOS, I have no such a phenomenon, it may caused by difference of sublayer between macOS and iOS. 

Thanks for the crash report.

the product resides on maccatalyst folder, I thinks it's native.

Yep.

It shows that some infinite recursive call exists.

Indeed. Here’s an example of how this repeats:

57  jp.dig-x.GAZZ        … -[PeerRoomView drawRect:] + 3736
58  com.apple.UIKitCore  … -[UIView(CALayerDelegate) drawLayer:inContext:] + 636
59  com.apple.QuartzCore … -[CALayer drawInContext:] + 312
60  com.apple.QuartzCore … CABackingStoreUpdate_ + 196
61  com.apple.QuartzCore … invocation function for block in CA::Layer::display_() + 64
62  com.apple.QuartzCore … -[CALayer _display] + 1760
63  com.apple.UIKitCore  … -[UIView _dispatchTintColorVisitorWithReasons:] + 324
64  com.apple.UIKitCore  … -[UIView setTintColor:] + 204
65  jp.dig-x.GAZZ        … -[PeerRoomView drawRect:] + 3736

I’m not a UIKit expert but setting tintColor within your -drawRect: implementation seems kinda suspect to me. A -drawRect: method is supposed to draw based on view properties, not change view properties.

Anyway, I’ve retagged your question so that more relevant folks will see it. And if you end up completely stuck, I recommend that you open a DTS tech support incident and talk with one of our UIKit experts.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks a lot.

I misunderstood role of drawRect: method. I will resolve the problem with your advice. Thanks again.

Best Regards, Tetsuya

My app for iOS crashes on Apple Silicone Mac
 
 
Q