Search results for

Swift 6

49,211 results found

Post

Replies

Boosts

Views

Activity

Reply to Develop for client having devices running ios 6
You may consider it a fanboy response but, the reality is, in some cases, xCode 7 for example, what youare asking simply may not be possible. If you're coding with Swift, iOS 7 is the lowest target possible.Once xCode 7 goes into release, xCode 6.x will only be allowed for a limited time period so, same issue.Right now, you can use xCode 6.x and as Simpsonics said, set the target all the way down to 4.3 if youwish BUT, not in Swift apps.
Aug ’15
Xcode 10.2 : Abort trap 6
Hi,I contact you because i need some help.I try to pass my project on xcode 10.2 and when i compile i have this error on a pod. (abort trap 6)But it work with xcode 10.1.I have tried to change the toolchain swift, i have downloaded on swift.org toolchains swift 4.2.5 and 5.0.1 and it works.But with it, i can't compile on a physical device.Someone have already had this problem ?Thanks,Julien Hamon
6
0
3.7k
May ’19
Reply to Does String type in Swift have a splice(_:atIndex:) method?
This is taken from the Xcode 7 beta 6 release notes:The method RangeReplaceableCollectionType.extend() was renamed to appendContentsOf(),and the splice() method was renamed to insertContentsOf(). (21972324)It seems the Swift book you use is not properly updated yet.I think the latest online version The Swift Programming Language (Swift 2) should reflect the latest changes, and if not, you can send a Bug Report.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’15
.symbolRenderingMode(.multicolor) generates warning
Hi, I recently updated my app to swift 6, ios 18, xcode 16. I now have always a warning like CoreSVG has logged an error. Set environment variabe CORESVG_VERBOSE to learn more. if I use an SF image with a multicolor renderingmode. I have this on labels, image, ... If I change the rendering to palette or something else the warning is gone. For the rest, the multicolor rendering is fine because the result is ok. Can this warning be solved? PS: This happens on device and simulator
2
0
816
Oct ’24
Reply to SwiftData @Model does not conform to the 'Sendable' protocol; thi
A SwiftData Model cannot cross actor boundaries to avoid data races. You shouldn't make your model conform to Sendable because it still doesn't. I am currently in the same situation and as far as I can tell the best option to migrate to Swift 6 when using SwiftData is using ModelActor There are not as many tutorials and articles about it as other SwiftData topics but I believe this is the way to go. Do not return SwiftData Models from your ModelActor. This may result in data races when these models are accessed from different threads. Only return sole properties and the persistentModelIDto identify models. This is what my actor looks like: @ModelActor actor DataHandler { public func fetch(_ descriptor: FetchDescriptor) throws -> [PersistentIdentifier] { return try self.modelContext.fetchIdentifiers(descriptor) } public func update(_ persistentIdentifier: PersistentIdentifier, keypath: ReferenceWritableKeyPath, to value: T) throws { guard let model = modelContext.model(for: persistentIdentifier) as
Jul ’24
How to fix MainActor warning for QLPreviewControllerDelegate
I'm currently migrating a midsize (20k LOC) project to Swift structured concurrency. With complete checking turned on, it currently builds with only two warnings, both of which are related to the QLPreviewControllerDelegate protocol: Main actor-isolated instance method 'previewControllerDidDismiss' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode as well as the same warning but substituting 'previewController(_:transitionViewFor:)' for the method name. I'm confused as to how to make these nonisolated, as they use UIKit classes/subclasses as arguments and/or return types.
2
0
647
Nov ’24
Reply to How to assign a reference of a function
Are you using Xcode 6.x? I can see the message you have shown only in Xcode 6.4.In that case, no way. You cannot provide C-function pointers from Swift 1.x. Use Swift 2 with Xcode 7. Or, you need to live with Objective-C codes mixed.If you got that message with Swift 2, you need to provide more info.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
Reply to @Observable in command line app
[quote='811117022, Capablanca, /thread/766993?answerId=811117022#811117022, /profile/Capablanca'] I haven’t grasped all the subtleties of Swift 6 [/quote] I think that’s fair to say of the entire Swift community. We’re all coming up to speed on this together. It’s also fair to say that some of the pieces are still missing. One of those things is a really good solution to the issue of progress reporting (-: However, in this case I think you’ll be OK. I see two significant challenges here: Configuration Progress reporting Lemme tackle each in turn. You need to create a configuration value in Swift Concurrency Land™ and use it in GCD Land™. If I were in your shoes I’d give your configuration value semantics. And the easiest way is to make it a struct. A typical struct is sendable because all of its components are sendable. This assumes that the configuration is fairly straightforward. If it’s complex, or very large, you may need something more complex. With regards progress, this is on
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’24
macOS Menu Bar
Xcode 16.2 Swift 6 macOS Sequoia 15.1 SwiftUI I am a beginner. If I understand we can add buttons to the default Menu Bar but not delete them. Am I right? If you do not need most of the buttons, how do you solve that? I can add a button: import SwiftUI @main struct NouMenuProvesApp: App { var body: some Scene { WindowGroup { ContentView() } .commands { CommandMenu(Custom) { Button(Custom Action) { print(Custom Action performed) } } } } } Can I delete a Menu Button or create a new simpler Menu Bar?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1
0
275
Jan ’25