Posts

Post not yet marked as solved
1 Replies
1.1k Views
I have a screen with a vertical scrolling tableview that contains 100s of items. We group the rows into different sections. For some reason we don't utilize viewForHeaderInSection but we fake the apperance of a section by styling a UITableViewCell. From the tableView's perspective everything is a tableViewCell with no sections (we only have 1 section for the entire tableView). We have two different kind of cells. one for the fake section and another for the regular item. I have added the .header property to accessibilityTraits on the tableViewCell that's for the section and it works sometimes. The issue i'm running into is that if the section cell is not visible on-screen, i can't jump from one header to next header using the VoiceOver rotor. I have tried few different things but it simply refuses to jump from one 'section' to another unless both 'sections' are visible on screen. I also tried creating a real viewForHeaderInSection and returning them to rule out the possibility that it's because the cells are not drawn on-screen. That didn't help. The behavior I'm trying to achieve is done on the Settings app Notifications. There both NOTIFICATION STYLE and GOVERNMENT ALERTS are headers and i can jump between them (even though neither are visible at the same time). When i jump between them, it automatically scrolls the tableview which is what i'm hoping to achieve in my app. Does anyone have any idea?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
Our app has a UISearchBar as part of a UINavigationItem's titleView.The element layout looks like this: Window (Main), 0x600001ab6060, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab6140, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5ea0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5f80, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5ce0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5dc0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5b20, {{0.0, 0.0}, {414.0, 896.0}} NavigationBar, 0x600001ab5c00, {{0.0, 44.0}, {414.0, 56.0}}, identifier: 'Search' SearchField, 0x600001ab5960, {{0.0, 44.0}, {414.0, 56.0}}, identifier: 'searchTextField'The SearchField is accessible but sending `typeText` doesn't do anything. It prints this error on console. t = 82.89s Failed: Neither element nor any descendant has keyboard focus. Event dispatch snapshot: SearchField, identifier: 'searchTextField'The keyboard is open before sending typeText so i've no idea what's going on here. I tried using the Record feature to see what Apple does. Taping the Search bar with Record button causes it to crash with errorTimestamped Event Matching Error: Failed to find matching elementThe implementation looks like this navigationController?.navigationBar.isAccessibilityElement = false navigationItem.isAccessibilityElement = false searchBar.isAccessibilityElement = true searchBar.accessibilityIdentifier = "searchTextField" searchBar.accessibilityTraits = [.searchField] navigationItem.titleView = searchBar
Posted Last updated
.
Post not yet marked as solved
7 Replies
6.2k Views
I'm getting aError Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service"when I lock my screen after starting a background download process. I'm using Alamofire but I assume this would happen on a regular URLSession as well (because internally Alamofire is using URLSession). The downloads continue to work if I soft close the app but as soon as I lock my device, it start throwing this error.The URLSession is created this way: let config = URLSessionConfiguration.background(withIdentifier: "MySession") config.isDiscretionary = true config.sessionSendsLaunchEvents = true config.shouldUseExtendedBackgroundIdleMode = trueI looked at the Console to see if any daemon crashed but couldn't find any. I see three errors right after locking the screen:BKLogEvent: couldn't find CombinedSequence properties Task <>.<48> finished with error - code: -999 Task <>.<48> load failed with error Error Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service" UserInfo={NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _NSURLErrorRelatedURLSessionTaskErrorKey=, _NSURLErrorFailingURLSessionTaskErrorKey=, NSLocalizedDescription=Lost connection to background transfer service} [-997]The error._userInfo is:▿ Optional<AnyObject> ▿ some : 5 elements ▿ 0 : 2 elements - key : NSErrorFailingURLStringKey - value : https://www.myweb.com/api ▿ 1 : 2 elements - key : NSErrorFailingURLKey - value : https://www.myweb.com/api ▿ 2 : 2 elements - key : _NSURLErrorRelatedURLSessionTaskErrorKey ▿ value : 2 elements - 0 : BackgroundDataTask <C39E-2FC73>.<27> - 1 : LocalDataTask <C39E-2FC73>.<27> ▿ 3 : 2 elements - key : _NSURLErrorFailingURLSessionTaskErrorKey - value : BackgroundDataTask <C39E-2FC73>.<27> ▿ 4 : 2 elements - key : NSLocalizedDescription - value : Lost connection to background transfer serviceI've about 300 of these background tasks. They will continue to work as long as I don't lock my device but as soon as I lock the device it starts throwing this error. My initial thought was that it was some sort of File protection errors but the userInfo from error doesn't point that way.
Posted Last updated
.