Swift on Flipper Zero — A Proof of Concept
Swift Forums
by Sameesunkaria
3h ago
Hey folks! I've been able to successfully compile an app written in Swift for the Flipper Zero! I published the source code and a write up on my GitHub, for those who are interested. I faced some of the same challenges that @rauhul mentioned in their blog post about building games for the Playdate, like mismatching memory layouts, which made it easier for me to recognize them. Overall, the process was still kind of painful, but the Rust for Flipper Zero project proved to be an excellent resource. I only ended up needing to make a minor change to the Flipper Zero firmware. The Swift trunk dev t ..read more
Visit website
Is there a way to emit C/C++ header?
Swift Forums
by dima_kozhinov
22h ago
When building a dynamic library intended to be used with a host application written in C/C++, is there any way to generate a C/C++ header file? A public function can be declared with the @_cdecl("functionName") attribute and have a C calling convention. The swiftc compiler can be invoked with the -emit-objc-header command line argument, and in this case a header file is created, but it's an Objective-C header file, and I believe it's not compatible with C/C++. Now that C/C++ interoperability is actively developing, is there a way to emit a C/C++ header file? 1 post - 1 participant Read full to ..read more
Visit website
Force new Xcode multiplatform projects to default to a specific device and target
Swift Forums
by bcardarella
1d ago
I'm using Xcodegen (yes I've opened an issue on that repo already three weeks ago, no replies) to generate multiplatform projects. Is there a way for Xcode projects newly generated to set the default device and target? Otherwise "watch" seems to be the default that is being chosen for multiplatform. 1 post - 1 participant Read full topic ..read more
Visit website
Query with Predicate
Swift Forums
by AndreB82
1d ago
Hello everybody, I'm quite new to SwiftUI and particularly to SwiftData related projects. Now, I have the following two classes: import Foundation import SwiftData @Model class Stagione { @Attribute(.unique) var idStagione: String var categoriaStagione: String var miaSquadra: String @Relationship(deleteRule: .cascade) var rosa: [Rosa]? @Relationship(deleteRule: .cascade) var squadra: [Squadre]? @Relationship(deleteRule: .cascade) var partita: [CalendarioPartite]? init(idStagione: String, categoriaStagione: String, miaSquadra: String) { self.idStagione ..read more
Visit website
App sometimes crashes when saving a SwiftData item containing a specific type
Swift Forums
by JLindop
1d ago
I'm working on an app to help with cataloguing books, and using SwiftData for the first time. This is the model I have for each book: @Model final class Book { var name: String? var author: String? var year: Int? var isbn: ISBN? var shelf: Shelf? var collections: [Collection] var marcXML: Data? let dateCaptured: Date init(name: String? = nil, author: String? = nil, year: Int? = nil, isbn: ISBN? = nil, shelf: Shelf? = nil, marcXML: Data? = nil, collections: [Collection]? = nil) { self.name = name self.author = author self.year = year ..read more
Visit website
[GSoC-2024] Swift-etcd: A Native Client for Seamless Integration with etcd Servers
Swift Forums
by ayushi2103
1d ago
Hello Swift Community! I'm Ayushi, based in Toronto, and a recent graduate from the University of Waterloo! This summer, I'm excited to be working on Swift-etcd: A Native Client for Seamless Integration with etcd Servers as a GSoC contributor, alongside my mentor @FranzBusch. Our mission is to develop a native Swift-etcd client that seamlessly integrates etcd, a distributed key-value store, into Swift applications. Our primary objective is to harness the power of grpc-swift to facilitate authentication, key-value operations, watch operations, and lease management, ensuring a seamless and effic ..read more
Visit website
Vapor and Sendable Route Handlers
Swift Forums
by RussBaz
2d ago
Hi. After adding .enableExperimentalFeature("StrictConcurrency") to my Vapor executable target, I am getting converting non-sendable function value to '@Sendable (Request) async throws -> Response' may introduce data races warning on all my request handlers inside my RouteCollection controllers. Here is an example of such a controller: struct AuthController: RouteCollection { func boot(routes: RoutesBuilder) throws { let auth = routes.grouped("auth") auth.post("login", use: login(req:)) } func login(req: Request) async throws -> Response { // some c ..read more
Visit website
[Accepted with modifications] SE-0431: `@isolated(any)` Function Types
Swift Forums
by Douglas_Gregor
2d ago
Hello Swift Community, The review of SE-0431 "@isolated(any) Function Types" ran from March 27 through April 9, 2024, and was extended to discuss syntactic issues of @isolated(any) and semantic interactions with region-based isolation. The Language Steering Group has decided to accept the proposal with one modification. The proposal as originally reviewed stated that an @isolated(any) function is implicitly @Sendable. However, this was based on the assumption that a non-Sendable @isolated(any) could not meaningfully be used, which is not true given the semantics of SE-0414 "Region-based isolat ..read more
Visit website
C++ interoperability with Mac Catalyst enabled
Swift Forums
by justidl3
2d ago
Hello, For some reason I'm unable to use C++ interoperability when building for Mac Catalyst. Is there a specific reason for this? when building swift, there is a swift_static library that doesn't seem to include a catalyst target, only iphoneos and macOS 1 post - 1 participant Read full topic ..read more
Visit website
Using TCA on Windows
Swift Forums
by Datagram
2d ago
The Browser Company just released the Windows 11 version of their Arc browser for macOS. @compnerd from TBC shared that they use TCA for decoupling the business logic parts from the UI. The majority of the business logic is shared code. We are using TCA, and that provides for a natural split between the business logic and UI logic. Article about Swift on Windows - #8 by compnerd Not knowing TCA I quickly reviewed the product on GitHub and some online videos on Free-Point and I have the following questions: does TCA replace the Observable for state management or is it a complement to Observ ..read more
Visit website

Follow Swift Forums on FeedSpot

Continue with Google
Continue with Apple
OR