Hello everyone,
I'm experiencing an issue with my app, and I would greatly appreciate any guidance. Here's the situation:
My app works flawlessly on the simulator for all iPhone models (16, 16 Pro, 16 Pro Max, SE, etc.).
It runs without issues on physical iPhone 11 devices (both mine and a friend's).
However, when my friend installs the app from the App Store on their iPhone 15 Pro or iPhone 16, it crashes immediately upon opening.
Steps I’ve taken so far:
Verified that the app works on the simulator for the same models where it crashes in real life.
Updated the app's minimum deployment target to iOS 18, but this did not resolve the issue. The app still crashes on the physical iPhone 15 Pro and 16 models while continuing to run fine on previous physical devices and all simulated ones.
Additionally, I had another friend beta test the app through TestFlight on their iPhone 15 Pro, and they received an alert message indicating that the app had crashed when they tried to open it. This confirms the issue still exists after my attempted fixes.
I'm unsure what could be causing this discrepancy between the simulated and physical devices, or what the alert message in TestFlight might signify. Has anyone encountered a similar issue, or does anyone have suggestions on what I should do to fix this?
Thanks in advance for your help!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello Apple Developers,
I am trying to get the annotation text (the percentages) to stay on the outside perimeter of the pie chart and not in the middle of the pie chart like it currently is. Is there possibly a way to increase the radius of the annotation text to be that of the pie chart edge and maybe a little more? I don't know. Please help me out.
What I currently have:
Summary
Hello Apple Developers,
I've made a custom UITableViewCell that includes a UITextField and UILabel. When I run the simulation the UITableViewCells pop up with the UILabel and the UITextField, but the UITextField isn't clickable so the user can't enter information. Please help me figure out the problem.
Thank You!
Sampson
What I want:
What I have:
Screenshot Details:
As you can see when I tap on the cell the UITextField isn't selected. I even added placeholder text to the UITextField to see if I am selecting the UITextField and the keyboard just isn't popping up, but still nothing.
Relevant Code:
UHTextField
import UIKit
class UHTextField: UITextField {
override init(frame: CGRect) {
super.init(frame: frame)
configure()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
convenience init(placeholder: String) {
self.init(frame: .zero)
self.placeholder = placeholder
}
private func configure() {
translatesAutoresizingMaskIntoConstraints = false
borderStyle = .none
textColor = .label
tintColor = .blue
textAlignment = .left
font = UIFont.preferredFont(forTextStyle: .body)
adjustsFontSizeToFitWidth = true
minimumFontSize = 12
backgroundColor = .tertiarySystemBackground
autocorrectionType = .no
}
}
UHTableTextFieldCell
import UIKit
class UHTableTextFieldCell: UITableViewCell, UITextFieldDelegate {
static let reuseID = "TextFieldCell"
let titleLabel = UHTitleLabel(textAlignment: .center, fontSize: 16, textColor: .label)
let tableTextField = UHTextField()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
configure()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func set(title: String) {
titleLabel.text = title
tableTextField.placeholder = "Enter " + title
}
private func configure() {
addSubviews(titleLabel, tableTextField)
let padding: CGFloat = 12
NSLayoutConstraint.activate([
titleLabel.centerYAnchor.constraint(equalTo: centerYAnchor),
titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: padding),
titleLabel.heightAnchor.constraint(equalToConstant: 20),
titleLabel.widthAnchor.constraint(equalToConstant: 80),
tableTextField.centerYAnchor.constraint(equalTo: centerYAnchor),
tableTextField.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: 24),
tableTextField.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -padding),
tableTextField.heightAnchor.constraint(equalToConstant: 20)
])
}
}
LoginViewController
class LoginViewController: UIViewController, UITextFieldDelegate {
let tableView = UITableView()
let loginTableTitle = ["Username", "Password"]
override func viewDidLoad() {
super.viewDidLoad()
configureTableView()
updateUI()
createDismissKeyboardTapGesture()
}
func createDismissKeyboardTapGesture() {
// create the tap gesture recognizer
let tap = UITapGestureRecognizer(target: self.view, action: #selector(UIView.endEditing))
// add it to the view (Could also add this to an image or anything)
view.addGestureRecognizer(tap)
}
func configureTableView() {
view.addSubview(tableView)
tableView.layer.borderWidth = 1
tableView.layer.borderColor = UIColor.systemBackground.cgColor
tableView.layer.cornerRadius = 10
tableView.clipsToBounds = true
tableView.rowHeight = 44
tableView.delegate = self
tableView.dataSource = self
tableView.translatesAutoresizingMaskIntoConstraints = false
tableView.removeExcessCells()
NSLayoutConstraint.activate([
tableView.topAnchor.constraint(equalTo: loginTitleLabel.bottomAnchor, constant: padding),
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -padding),
tableView.heightAnchor.constraint(equalToConstant: 88)
])
tableView.register(UHTableTextFieldCell.self, forCellReuseIdentifier: UHTableTextFieldCell.reuseID)
}
func updateUI() {
DispatchQueue.main.async {
self.tableView.reloadData()
self.view.bringSubviewToFront(self.tableView)
}
}
}
extension LoginViewController: UITableViewDelegate, UITableViewDataSource{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: UHTableTextFieldCell.reuseID, for: indexPath) as! UHTableTextFieldCell
let titles = loginTableTitle[indexPath.row]
cell.set(title: titles)
cell.titleLabel.font = UIFont.systemFont(ofSize: 16, weight: .bold)
cell.tableTextField.delegate = self
return cell
}
}
Again thank you all so much for your help. If you need more clarification on this let me know.