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])
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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.
I'm made an very basic iOS Widget Extension with (on iOS 16):
struct TotoView: View
var body: some View {
VStack {
Text("Toto")
.font(.headline)
}
}
}
On the SwiftUI Canvas preview, I can see the "Toto" text.
BUT when I select the Widget Target and run in the simulator, I only have the placeholder in place of text. Any idea of why?
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,
I don't know how and since when, but now on the simulator, next to my SKScene I have a small text that display "Metal".
Does someone know how to disable this? It's a bit disturbing when trying to make some screenshot.
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?
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"
How can I can the localized string for the month, day, week units. I'm not speaking about "january", "february"... But the localized word "Month". Is the only solution is to do this by hand with NSLocalizedString?
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 ?
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.