Post

Replies

Boosts

Views

Activity

CIMotionBlur broken in iOS16 ?
The following code just does not behaves the same way previous to iOS 16 and with iOS 16. The blur effect does not seem to work correctly in iOS 16. class GameScene: SKScene { override func didMove(to view: SKView) { let shapeNode = SKShapeNode(circleOfRadius: 30) shapeNode.fillColor = .green shapeNode.strokeColor = .clear addChild(shapeNode) let blurredShapeNode = SKShapeNode(circleOfRadius: 30) blurredShapeNode.fillColor = .red blurredShapeNode.strokeColor = .clear let effectNode = SKEffectNode() addChild(effectNode) effectNode.addChild(blurredShapeNode) let blurAngle = NSNumber(value: 0) effectNode.filter = CIFilter( name: "CIMotionBlur", parameters: [kCIInputRadiusKey: 30, kCIInputAngleKey: blurAngle]) } }
1
0
1.1k
Oct ’22
xCode localization export failed for shared framework with multiple destinations
When exporting localization in xCode for a shared framework, the localization build fails with the error "Could not choose a single platform from the supported platforms iphoneos, iphonesimulator, watchos, watchsimulator of target" Note that the shared target has multiple supported destinations = iPhone/iPad/Apple Watch.
3
0
1.5k
Sep ’22
Use embedded framework in WatchKit extension
I have a project of an iOS app with an embedded framework called TotoKit with some model classes. Now I've added a new target with the template "WatchApp for iOS App" to my project. When I try to do "import TotoKit" from the newly created WatchKit extension, no such module is found. What do I have to do ? I have tried without success to: add one dependencies to TotoKi in BuildPhase of the extension target add AppleWatch in Deployment/Target Device Families of the TotoKit target Thanks,
0
0
823
Jan ’22
UIDatePickerStyle.compact does not work on 13.7
The Apple documentation says that .compact style of a UIDatePicker is available from iOS 13.4. When I launch in the simulator in iOS 13.7 my app with deployment target to iOS 13.4 and use a UIDatePicker it is displayed a the classic wheel. That does not sound normal according to documentation! Any idea?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
963
Nov ’20
Format a date but without the year
I want to display the long version of a date BUT WITHOUT the yearWith:let dateFormatter = DateFormatter() dateFormatter.dateStyle = .full dateFormatter.timeStyle = .none dateFormatter.doesRelativeDateFormatting = true dateFormatter.locale = Calendar.current.locale if let inPast = Calendar.current.date(byAdding: .day, value: -30, to: Date()) { let text = dateFormatter.string(from: inPast) }The output is "Wednesday, April 15, 2020" and I want to have "Wednesday, April 15"
Topic: UI Frameworks SubTopic: UIKit Tags:
5
0
2.6k
May ’20
XCode11 Failed to synthesize event
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 ?
7
0
4.5k
Nov ’19
Get localized week days
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?
Topic: UI Frameworks SubTopic: AppKit Tags:
6
0
5.4k
Jun ’19
enableBackgroundDelivery does not deliver route ?
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.
1
0
1.9k
Sep ’18