Fatbobman:
In the process of creating predicates for Core Data, the predicate expressions do not have a direct link to the type code. The properties used in these expressions correspond to those defined within the model editor (data model), and their “optional” characteristic does not align with the concept of optional types in Swift, but rather indicates whether the SQLite field can be NULL
. This means that when a predicate expression involves a property that can be NULL and a non-NULL value, its optionality usually does not need to be considered.
[…]
However, the advent of SwiftData changes this scenario. Since the construction of SwiftData predicates is based on model code, the optional types therein truly embody the concept of optionals in Swift. This necessitates special attention to the handling of optional values when building predicates.
[…]
Although predicate construction in SwiftData is similar to writing a closure that returns a boolean value, developers can only use the operators and methods listed in the official documentation, which are converted into corresponding PredicateExpressions
through macros.
He shows some examples of what you can do: somewhat surprisingly, introducing a new variable with if let
works so long as you produce a single expression.
I really like optionals in general, but this is a case where I’m not sure we’re getting much value for the complexity. My recollection is that with Core Data the predicates just did the right thing without having to worry about this or to obscure the code with nil checks.
Even if a developer is certain a property is not nil, using !
to force unwrap in SwiftData predicates can still lead to runtime errors.
[…]
As of now (up to Xcode 15C500b), when the data model includes an optional to-many relationship, the methods mentioned above do not work. […] SwiftData encounters a runtime error when converting the predicate into SQL commands.
[…]
While there is no need for special handling in equality comparisons when an optional chain contains only one ?
, situations involving multiple ?
s in the chain, even though the code compiles and runs without errors, SwiftData cannot [prior to iOS 17.5] retrieve the correct results from the database through such a predicate.
Keith Harrison:
One other caveat. The #Predicate
macro doesn’t handle accessing properties via a keypath.
[…]
The workaround is to introduce a temporary variable, outside of the macro, when constructing the predicate.
Previously:
Core Data iOS iOS 18 Mac macOS 15 Sequoia Macros Programming Swift Programming Language SwiftData
Connor Jones:
Stenberg said the amount of time it takes project maintainers to triage each AI-assisted vulnerability report made via HackerOne, only for them to be deemed invalid, is tantamount to a DDoS attack on the project.
Citing a specific recent report that “pushed [him] over the limit,” Stenberg said via LinkedIn: “That’s it. I’ve had it. I’m putting my foot down on this craziness.”
From now on, every HackerOne report claiming to have found a bug in curl, a command-line tool and library for transferring data with URLs, must disclose whether AI was used to generate the submission.
If selected, the bug reporter can expect a barrage of follow-up questions demanding a stream of proof that the bug is genuine before the curl team spends time on verifying it.
Daniel Stenberg (Hacker News):
We still have not seen a single valid security report done with AI help.
Artificial Intelligence Bug curl Open-source Software Programming
Riley Testut:
Guess what — you can now self-publish your apps on AltStore PAL completely FREE!
Just connect your Apple Developer account with PAL and make an AltStore source. Then you can distribute notarized apps by simply uploading them to your web server like the good ol’ days 👌
AltStore:
The only major difference is that your apps will only be available in the EU.
[…]
You do not have to be located in or have a business in the EU to distribute your apps with AltStore PAL.
Brian Webster:
Welp, looks like today I get a taste of what it’s like not being able to ship an update to the App Store.
Blocked by a notarization outage, so not quite like the good old days.
Previously:
AltStore App Marketplaces European Union iOS iOS 18 Notarization
Thomas Claburn:
A developer of mobile sports apps has filed a proposed class-action lawsuit against Apple, seeking to recover commissions iBiz allegedly collected in violation of a federal injunction intended to allow developers to use alternative payment systems.
The complaint [PDF], filed on May 2 in California Northern District Court by law firm Hagens Berman on behalf of Pure Sweat Basketball, seeks class-action status to represent other affected iOS developers.
[…]
“Had Apple complied with the injunction as issued, Apple’s own studies show that developers would have saved potentially billions in in-app purchase commissions,” the complaint says. “These are ill-gotten gains and Apple should not be permitted to retain them.”
Juli Clover:
Due to Apple’s anti-steering implementation, only 34 developers of 136,000 took advantage of the external payment link option before the terms were changed last week, and the lawsuit is seeking restitution for all U.S. developers who offered in-app purchases for non-zero prices between January 17, 2024 and when Apple fully complied with the original injunction.
Hajj.david:
Our app cannot use in app purchases because Apple does not offer metered billing, in addition IAP are limited to $999 whereas some of our clients are paying 3k-5k a month. So by every account IT IS IMPOSSIBLE for our business to use in app purchases. We fought with apple for MONTHS to even allow our app on the app store. Finally they agreed IF and only IF:
- We do not allow users to sign up in app, they have to sign up from our website.
- We DO NOT LINK our website ANYWHERE within the app
- We cannot allow users to manage their license (cancel, change, etc) within the app NOR can we send them a link to show them WHERE to do this.
This forced us to have to call customers or have them call us to resolve super simple things like changing a credit card. Apple’s rules were ridiculous, abusive (imagine taking 30% of 5k!) and to add further insult to injury Apple took FORTY-FIVE days to pay out. Stripe pays in 1-3 business days and takes 3%, and they have a better built in SDK that Apple.
Previously:
Antitrust Apple Business External iOS Payments In-App Purchase iOS iOS 18 Lawsuit Legal