Running my UI Test in xCode 11.x (tried all) I have sometime "Failed to synthesize event: Neither element nor any descendant has keyboard focus. Event dispatch snapshot: TextField, placeholderValue: 'Your Email', value: "And the tet was working because and does not always occurs. But the fact is all my UI tests and screenshots workflow is broken.Does anyone has some issue around UI testing since 11.x ?
Post
Replies
Boosts
Views
Activity
I want to get localized week day. On xCode, my app has only english language for the moment and I set the application region to "French".When I run this code :print("\(Calendar.current.locale)")
print("\(Calendar.current.shortWeekdaySymbols)")I have this output:Optional(en_FR (current))
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]I understand "en_FR" as "en" because my only language is english, and FR is the region. But why shortWeekdaySymbols is not consistent with my FR region?
First I prepare a long-run query to get new workouts:self.exportQuery = HKObserverQuery(sampleType: sampleType, predicate: nil, updateHandler: { query, completionHandler, error in
self.queryWorkoutsToExport() {
completionHandler()
}
})
self.healthStore.execute(self.exportQuery!)I enable the HealthStore background delivery with:self.healthStore.enableBackgroundDelivery(for: HKObjectType.workoutType(), frequency: .immediate, withCompletion: nil)Now I go outside for an outdoor running workout (with GPS trace). One my workout finished, the update handler of HKObserverQuery is called and I do a query to access the new workout:let anchoredQuery = HKAnchoredObjectQuery(type: HKObjectType.workoutType(), predicate: predicate, anchor: anchor, limit: HKObjectQueryNoLimit) { [unowned self] query, newSamples, deletedSamples, newAnchor, error inTHE PROBLEM is that the workout is correctly returned in newSamples BUT I don't have any GPS data. The resultHandler in empty. let workoutRoutesQuery = HKSampleQuery(sampleType: HKSeriesType.workoutRoute(),
predicate: HKQuery.predicateForObjects(from: workout),
limit: HKObjectQueryNoLimit,
sortDescriptors: [sort],
resultsHandler: { (query, samples, error) inAnything wrong with my process? May be .immediate is to immediate in enableBackgroundDelivery is a bit too fast and I should move to .hourly. Because when I run the same code a bit later, I have the route date.
Is is possible to change the home indicator color on an iPhone X? I mean the horizontal bar that suggest to slide from bottom to top to access the home screen.