Home Blog Page 3862

Including values to the SwiftUI atmosphere with Xcode 16’s Entry macro – Donny Wals


Revealed on: July 15, 2024

Including customized values to SwiftUI’s atmosphere has by no means been very exhausting to do to. Nonetheless, the syntax for doing it’s verbose and simple to neglect. To refresh your thoughts, check out this publish the place I clarify the best way to add your personal atmosphere values to a SwiftUI view.

To summarize what’s proven in that publish; right here’s the way you add a customized worth to the atmosphere utilizing Xcode 15 and earlier:

non-public struct DateFormatterKey: EnvironmentKey {
    static let defaultValue: DateFormatter = {
        let formatter = DateFormatter()
        formatter.locale = Locale(identifier: "en_US_POSIX")
        formatter.dateFormat = "MM/dd/yyyy"
        return formatter
    }()
}

extension EnvironmentValues {
    var dateFormatter: DateFormatter {
        get { self[DateFormatterKey.self] }
        set { self[DateFormatterKey.self] = newValue }
    }
}

We’ve got to outline an atmosphere key, outline a default worth, and write a getter and setter to retrieve our worth from the atmosphere utilizing our key.

That is repetitive, simple to neglect, and simply annoying to do.

In the event you favor studying thorugh video, here is the video to look at:

Fortunately, in Xcode 16 now we have entry to the @Entry macro. This macro permits us to outline the very same atmosphere key like this:

extension EnvironmentValues {
    @Entry var dateFormatter: DateFormatter = {
        let formatter = DateFormatter()
        formatter.locale = Locale(identifier: "en_US_POSIX")
        formatter.dateFormat = "MM/dd/yyyy"
        return formatter
    }()
}

All now we have to outline now could be a variable that’s annotated with @Entry and we’re carried out.

The property title is used because the atmosphere key so on this case we’d set our date formatter like this:

myView
    .atmosphere(.dateFormatter, Dateformatter())

I completely love this new syntax as a result of it removes all of the boilerplate in a single go.

And the perfect a part of this macro?

We are able to use it in initiatives that focus on iOS variations older than 18! In order quickly as you begin growing your undertaking with Xcode 16 you’ll be capable to use this macro no matter your deployment goal.

GitHub Patches Vital Safety Flaw in Enterprise Server Granting Admin Privileges

0


Aug 22, 2024Ravie LakshmananEnterprise Software program / Vulnerability

GitHub Patches Vital Safety Flaw in Enterprise Server Granting Admin Privileges

GitHub has launched fixes to deal with a set of three safety flaws impacting its Enterprise Server product, together with one crucial bug that could possibly be abused to realize website administrator privileges.

Probably the most extreme of the shortcomings has been assigned the CVE identifier CVE-2024-6800, and carries a CVSS rating of 9.5.

“On GitHub Enterprise Server situations that use SAML single sign-on (SSO) authentication with particular IdPs using publicly uncovered signed federation metadata XML, an attacker might forge a SAML response to provision and/or achieve entry to a consumer account with website administrator privileges,” GitHub stated in an advisory.

Cybersecurity

The Microsoft-owned subsidiary has additionally addressed a pair of medium-severity flaws –

  • CVE-2024-7711 (CVSS rating: 5.3) – An incorrect authorization vulnerability that might enable an attacker to replace the title, assignees, and labels of any problem inside a public repository.
  • CVE-2024-6337 (CVSS rating: 5.9) – An incorrect authorization vulnerability that might enable an attacker to entry problem contents from a personal repository utilizing a GitHub App with solely contents: learn and pull requests: write permissions.

All three safety vulnerabilities have been addressed in GHES variations 3.13.3, 3.12.8, 3.11.14, and three.10.16.

Again in Could, GitHub additionally patched a crucial safety vulnerability (CVE-2024-4985, CVSS rating: 10.0) that might allow unauthorized entry to an occasion with out requiring prior authentication.

Organizations which might be working a susceptible self-hosted model of GHES are extremely suggested to replace to the newest model to safeguard towards potential safety threats.

Discovered this text fascinating? Comply with us on Twitter and LinkedIn to learn extra unique content material we submit.



New Apple Merchandise 2024/2025: Upcoming Apple product releases

0


Kuo: Folding All-Display screen MacBook Delayed Till Late 2027 On the Earliest

0


Apple’s rumored foldable MacBook will not arrive till the tip of 2027 or 2028 on the earliest due to technical challenges, in keeping with the most recent prediction by Apple analyst Ming-Chi Kuo.

foldable macbook astropad

Earlier experiences from show trade analyst Ross Younger, Haitong analyst Jeff Pu, Korean web site The Elec, and Kuo himself advised that Apple is growing an all-display foldable laptop computer that may characteristic a 20.2-inch or an 18.8-inch display screen.

When folded, the laptop computer was rumored to be a full-size on-screen keyboard that seamlessly integrates the typing expertise into the show itself. When fully unfolded, the system was stated to perform as a normal monitor. Paired with an exterior keyboard, it might basically remodel right into a large-screen desktop setup.

Kuo in Might stated that LG Show was aiming to start mass manufacturing of show panels for a MacBook with a 20.2-inch or an 18.8-inch foldable display screen within the fourth quarter of 2025. Nonetheless, his newest put up on X (Twitter) claims that Apple has canceled the 20-inch design and has now settled on a show measurement of 18.8 inches.

“Some market members beforehand anticipated Apple to launch the foldable iPad in 2025,” stated Kuo in his newest put up. “However the present provide chain survey signifies that the foldable ‌iPad‌ has no visibility. This may occasionally even be as a result of some name this foldable MacBook a foldable ‌iPad‌.”

Apple has been experimenting with numerous gadgets with foldable shows, together with a foldable iPad and MacBook. Clearly the MacBook is already foldable, however Apple has reportedly been exploring an all-display MacBook kind issue that has no commonplace keyboard.

Show analyst Ross Younger stated in July 2022 that Apple may deliver some sort of foldable laptop computer to market in 2026 or 2027, and it stays unclear if such a tool can be categorised as a Mac, an ‌‌iPad‌‌, or one thing in between.

In a Might report, Haitong analyst Jeff Pu stated Apple’s first foldable gadgets would attain mass manufacturing in 2025 and 2026, following rising proof of foldable gadgets in Apple’s provide chain. On the time, the analyst stated Apple would doubtless launch a large-screen foldable ‌iPad‌ or MacBook in that timeframe earlier than launching a higher-volume foldable iPhone in late 2026.

Pu had claimed one Apple foldable with a 20.3-inch show would begin manufacturing in late 2025, which was ahead of beforehand anticipated. Nonetheless, Pu later stated he believed Apple would be a part of the foldable market within the second quarter of 2026 because of “show sturdiness points,” reflecting Apple’s intention to good a foldable design. It appears Apple remains to be within the prototyping stage of a foldable system. Would you be fascinated by such a product? Tell us within the feedback.

ESET Risk Report H1 2024


ESET Analysis, Risk Stories

A view of the H1 2024 menace panorama as seen by ESET telemetry and from the angle of ESET menace detection and analysis consultants

ESET Threat Report H1 2024

These previous six months painted a dynamic panorama of Android Monetary threats – malware going after victims’ cellular banking funds – be it within the type of “conventional” banking malware or, extra not too long ago, cryptostealers.

A curious newcomer on this scene is GoldPickaxe, new cellular malware able to stealing facial recognition information to create deepfake movies utilized by the malware’s operators to authenticate fraudulent monetary transactions. Armed with each Android and iOS variations, this menace has been focusing on victims in Southeast Asia by way of localized malicious apps. As ESET researchers dug into this malware household, they found that an older Android sibling of GoldPickaxe, referred to as GoldDiggerPlus, has additionally tunneled its method to Latin America and South Africa by actively focusing on victims in these areas.

Maintaining with the instances, infostealing malware can now be discovered impersonating generative AI instruments as nicely. In H1 2024, Rilide Stealer was noticed misusing the names of generative AI assistants, equivalent to OpenAI’s Sora and Google’s Gemini, to entice potential victims. In one other malicious marketing campaign, the Vidar infostealer was lurking behind a supposed Home windows desktop app for AI picture generator Midjourney – though Midjourney’s AI mannequin is just accessible through Discord. Since 2023, we have now been more and more seeing cybercriminals abusing the AI theme – a development that’s anticipated to proceed.

Gaming fanatics who enterprise out from official gaming ecosystems may sadly uncover that infostealer threats have additionally discovered a method to spoil their favourite passion: some cracked video video games and dishonest instruments utilized in on-line multiplayer video games have been not too long ago discovered to include infostealer malware equivalent to Lumma Stealer and RedLine Stealer.

RedLine Stealer noticed a number of detection spikes in H1 2024, brought on by one-off campaigns in Spain, Japan, and Germany. Though this “Infostealer-as-a-Service” suffered a disruption in 2023 and seems now not to be underneath lively improvement, its latest waves have been so vital that RedLine Stealer detections in H1 2024 surpassed these from H2 2023 by a 3rd.

Balada Injector, a gang infamous for exploiting WordPress plugin vulnerabilities, continued to run rampant within the first half of 2024, compromising over 20,000 web sites and racking up over 400,000 hits in ESET telemetry for the variants used within the gang’s latest marketing campaign.

On the ransomware scene, former main participant LockBit was knocked off its pedestal by Operation Chronos, a world disruption performed by legislation enforcement in February 2024. Though ESET telemetry recorded two notable LockBit campaigns in H1 2024, these have been discovered to be the results of non-LockBit gangs utilizing the leaked LockBit builder.

The Ebury botnet, beforehand examined in ESET’s 2014 white paper Operation Windigo, stays harmful even ten years later: latest investigation by ESET researchers uncovered that this menace has compromised almost 400,000 servers since 2009. Though Ebury’s toolkit was already substantial on the time of the unique analysis, these newest findings revealed expanded functionalities of the botnet, focusing totally on monetization strategies equivalent to cryptocurrency and bank card theft.

I want you an insightful learn.

Observe ESET analysis on Twitter for normal updates on key developments and prime threats.

To study extra about how menace intelligence can improve the cybersecurity posture of your group, go to the ESET Risk Intelligence web page.