Post

Replies

Boosts

Views

Activity

Reply to Xcode 11 hangs while attaching debugger to ios process
I'm on XCode 15.2, and it's also hanging while attaching the debugger. It seems to happen sometimes (not all the time) when I switch between a wireless connection and a wired connection between XCode and my device. Probably when I lose my patience and plug in the cable while XCode is building/installing to the device. The above steps alone did not work for me. I found that I also needed to shut down and restart my iPhone. So, here's what I do when this happens: Close Xcode Delete ˜/Library/Developer/Xcode/Derived Data Delete ˜/Library/Developer/Xcode/iOS Device Support (note that I'm not deleting entire Xcode directory as that also deletes your archives) Shut down Mac Shut down iPhone Restart iPhone Restart Mac Some of these steps are probably unnecessary, but as this doesn't happen too frequently for me, I just follow this to be on the "safe" side.
Feb ’24
Reply to TTS problem iOS 17 beta
Same here. Also able to reproduce with address sanitizer enabled. @And0Austria, I can't see your bug report in Feedback Assistant (can only see my own entries). I know it's a long shot, but did you get any response from Apple on your bug report? Or did you find a workaround to prevent the crash?
Topic: Machine Learning & AI SubTopic: General Tags:
Sep ’23
Reply to "unable to dequeue a cell with identifier" only on iPadOS 15.0
I had a UITableViewController that had some cells registered in the Storyboard. These cells did not cause any problems. But it also contained other cells that I designed with a separate UINib, so I had to register them specifically in viewDidLoad, like so: override func viewDidLoad() {     super.viewDidLoad()     tableView.register(UINib(nibName: "SCSocialCell", bundle: nil), forCellReuseIdentifier: "SCSocialCell") ... } The problem appears to be that these manually registered cells are not really registered before the table starts to load data (which happens automatically in a UITableViewController). In other words numberOfSections and numberOfRowsInSection are called even before viewDidLoad is called (or finished, not sure). I solved it by introducing a bool variable allTableViewCellsRegistered, like so: private var allTableViewCellsRegistered = false override func viewDidLoad() {     super.viewDidLoad()     tableView.register(UINib(nibName: "SCSocialCell", bundle: nil), forCellReuseIdentifier: "SCSocialCell") ...     allTableViewCellsRegistered = true     tableView.reloadData() } And adding guard statements in numberOfSections and numberOfRowsInSection like so: override func numberOfSections(in tableView: UITableView) -> Int { guard allTableViewCellsRegistered else {         return 0     } // rest of code } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { guard allTableViewCellsRegistered else {         return 0     } // rest of code } Perhaps only adding this in numberOfSections would do, but I added it in both and it's working now. I believe this problem only surfaced on the iPad, because the cells in question were at the bottom of my tableView. On iPhone, these last/bottom cells dropped off the screen, so cellForRowAt was not yet called for them on initial load. But by the time the user started scrolling to the bottom, viewDidLoad was finished and the cells were registered. So that's why iPhone didn't give me any problems. Hope this helps someone.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’23
Reply to Xcode 11 hangs while attaching debugger to ios process
I'm on XCode 15.2, and it's also hanging while attaching the debugger. It seems to happen sometimes (not all the time) when I switch between a wireless connection and a wired connection between XCode and my device. Probably when I lose my patience and plug in the cable while XCode is building/installing to the device. The above steps alone did not work for me. I found that I also needed to shut down and restart my iPhone. So, here's what I do when this happens: Close Xcode Delete ˜/Library/Developer/Xcode/Derived Data Delete ˜/Library/Developer/Xcode/iOS Device Support (note that I'm not deleting entire Xcode directory as that also deletes your archives) Shut down Mac Shut down iPhone Restart iPhone Restart Mac Some of these steps are probably unnecessary, but as this doesn't happen too frequently for me, I just follow this to be on the "safe" side.
Replies
Boosts
Views
Activity
Feb ’24
Reply to TTS problem iOS 17 beta
Same here. Also able to reproduce with address sanitizer enabled. @And0Austria, I can't see your bug report in Feedback Assistant (can only see my own entries). I know it's a long shot, but did you get any response from Apple on your bug report? Or did you find a workaround to prevent the crash?
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to "unable to dequeue a cell with identifier" only on iPadOS 15.0
I had a UITableViewController that had some cells registered in the Storyboard. These cells did not cause any problems. But it also contained other cells that I designed with a separate UINib, so I had to register them specifically in viewDidLoad, like so: override func viewDidLoad() {     super.viewDidLoad()     tableView.register(UINib(nibName: "SCSocialCell", bundle: nil), forCellReuseIdentifier: "SCSocialCell") ... } The problem appears to be that these manually registered cells are not really registered before the table starts to load data (which happens automatically in a UITableViewController). In other words numberOfSections and numberOfRowsInSection are called even before viewDidLoad is called (or finished, not sure). I solved it by introducing a bool variable allTableViewCellsRegistered, like so: private var allTableViewCellsRegistered = false override func viewDidLoad() {     super.viewDidLoad()     tableView.register(UINib(nibName: "SCSocialCell", bundle: nil), forCellReuseIdentifier: "SCSocialCell") ...     allTableViewCellsRegistered = true     tableView.reloadData() } And adding guard statements in numberOfSections and numberOfRowsInSection like so: override func numberOfSections(in tableView: UITableView) -> Int { guard allTableViewCellsRegistered else {         return 0     } // rest of code } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { guard allTableViewCellsRegistered else {         return 0     } // rest of code } Perhaps only adding this in numberOfSections would do, but I added it in both and it's working now. I believe this problem only surfaced on the iPad, because the cells in question were at the bottom of my tableView. On iPhone, these last/bottom cells dropped off the screen, so cellForRowAt was not yet called for them on initial load. But by the time the user started scrolling to the bottom, viewDidLoad was finished and the cells were registered. So that's why iPhone didn't give me any problems. Hope this helps someone.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’23