Post

Replies

Boosts

Views

Created

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtGCs18_DictionaryStorageSSP__$ setFrame:]: unrecognized selector sent to instance 0x17ff59400'
We are facing some weird issue in the UILabel initialisation. Also it is occurring sometimes. class TextLabel: ConfigurableView<TextLabel.Config> { struct Config { var text: String = .empty var font: UIFont? var textColor: UIColor? var maxLines: Int = 0 var attributedText: NSAttributedString? var textAlignment: NSTextAlignment = .natural var truncateWithMore: Bool = false var onTapShowMore: (() -> Void)? var onTap: (() -> Void)? var accessibilityIdentifier: String? } private lazy var label: UILabel = { let label = UILabel() **//##### Crash is occurring in this line.** label.translatesAutoresizingMaskIntoConstraints = false label.adjustsFontForContentSizeCategory = true return label }() private lazy var tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap)) private var isTruncated = false override func setUp() { addSubview(label) label.equalsContainer() } override func layoutSubviews() { super.layoutSubviews() updateContent() } override func setConfig(_ config: Config) { super.setConfig(config) updateContent() } @objc func onTap() { if isTruncated { config?.onTapShowMore?() } else { config?.onTap?() } } func updateContent() { guard let config = config else { return } label.numberOfLines = config.maxLines label.text = config.text } } You can find my configurable view below. import UIKit class ConfigurableView<T>: UIControl { private(set) var config: T? init(_ config: T) { super.init(frame: .zero) setUp() setConfig(config) } override init(frame: CGRect) { super.init(frame: frame) setUp() } required init(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setUp() { } func setConfig(_ config: T) { self.config = config } } This crash is occurring randomly. Sometimes we could reproduce it in the app updates.
Topic: UI Frameworks SubTopic: UIKit
1
1
121
Feb ’26
Universal Links are not working in the Xcode 26 simulators
After updating the Xcode 26, defined universal links are not working in the iOS simulator. In the configuration, we have verified all the things including AASA file hosting and domain configuration. It is working properly in the real devices. Issue occurring only for Simulators. How can I debug it in the simulators to validate this ? Xcode Version: 26.1 Simulator iOS: 26.1
5
0
563
Jan ’26
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtGCs18_DictionaryStorageSSP__$ setFrame:]: unrecognized selector sent to instance 0x17ff59400'
We are facing some weird issue in the UILabel initialisation. Also it is occurring sometimes. class TextLabel: ConfigurableView<TextLabel.Config> { struct Config { var text: String = .empty var font: UIFont? var textColor: UIColor? var maxLines: Int = 0 var attributedText: NSAttributedString? var textAlignment: NSTextAlignment = .natural var truncateWithMore: Bool = false var onTapShowMore: (() -> Void)? var onTap: (() -> Void)? var accessibilityIdentifier: String? } private lazy var label: UILabel = { let label = UILabel() **//##### Crash is occurring in this line.** label.translatesAutoresizingMaskIntoConstraints = false label.adjustsFontForContentSizeCategory = true return label }() private lazy var tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap)) private var isTruncated = false override func setUp() { addSubview(label) label.equalsContainer() } override func layoutSubviews() { super.layoutSubviews() updateContent() } override func setConfig(_ config: Config) { super.setConfig(config) updateContent() } @objc func onTap() { if isTruncated { config?.onTapShowMore?() } else { config?.onTap?() } } func updateContent() { guard let config = config else { return } label.numberOfLines = config.maxLines label.text = config.text } } You can find my configurable view below. import UIKit class ConfigurableView<T>: UIControl { private(set) var config: T? init(_ config: T) { super.init(frame: .zero) setUp() setConfig(config) } override init(frame: CGRect) { super.init(frame: frame) setUp() } required init(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setUp() { } func setConfig(_ config: T) { self.config = config } } This crash is occurring randomly. Sometimes we could reproduce it in the app updates.
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
1
Views
121
Activity
Feb ’26
Universal Links are not working in the Xcode 26 simulators
After updating the Xcode 26, defined universal links are not working in the iOS simulator. In the configuration, we have verified all the things including AASA file hosting and domain configuration. It is working properly in the real devices. Issue occurring only for Simulators. How can I debug it in the simulators to validate this ? Xcode Version: 26.1 Simulator iOS: 26.1
Replies
5
Boosts
0
Views
563
Activity
Jan ’26