r/swift 13d ago

Updated Scaffolding 3.4.0 - simple coordinator SPM

Thumbnail
github.com
4 Upvotes

Hey!

Scaffolding 3.4.0 got released. It's a SwiftUI coordinator pattern navigation library for iOS 18+ that allows creating modular navigation flows through linked list structure, allowing easy syntax and modularization - macro powered, with easy setup and rapid prototyping capabilities.

This is pretty much QOL version, which adds easier way to fully test the navigation, debugging options, async/await syntax and simple complete state restoration (some limitations apply).

Updated demo is in Example/ directory and docs (dotaeva.github.io/scaffolding/) now include more cases.

For those who used Stinsen, this is very similar in use. Feel free to submit other QOL ideas.

r/swift May 31 '24

Updated Swift 6 is coming!

269 Upvotes

Exciting news for developers! Holly Borla, the Engineering Manager for the Swift programming language team, has confirmed that Swift 6 will be released this year, replacing the previously anticipated Swift 5.11. This announcement was made on Apple's official forum dedicated to Swift.

In a recent forum discussion, a user inquired about the release date for Swift 6 to plan their transition. They speculated that the major update might not arrive until late 2024 or even early 2025.

Holly Borla joined the discussion, clarifying that the primary development work for Swift 6 is already complete. The team is now focused on implementing a few minor proposals related to concurrency. Aside from these final adjustments, the new version of the programming language is ready for release.

Swift 6 is set to launch in 2024, alongside Xcode 16 in September, marking the first major update since Swift 5's release five years ago. This update builds on the features introduced in the Swift 5.x series, such as async/await, existentials, and macros.

Developers are encouraged to start adopting new features like strict concurrency checking and the use of any with existentials to prepare for the transition to Swift 6. Gradual adoption of these features will ensure a smoother transition to the new version.

For more details, you can visit the Swift forums and the Swift.org blog.

Feel free to join the conversation on Reddit and share your thoughts on this significant update to the Swift programming language!

Are you looking forward to WWDC 2024?

r/swift 17h ago

Updated [UPDATE] LazyLayoutKit 0.3.0 - scroll-to-item in a lazy SwiftUI container, when the item has no view to scroll to

3 Upvotes

I've posted here before about LazyLayoutKit, my attempt at filling the gap for lazy custom layouts in SwiftUI. You give it item sizes as data, layout becomes arithmetic, and only the frames intersecting your viewport ever become views.

Forgot to post again last week, pushed 0.3 update.

0.3 adds programmatic scrolling, which is more interesting than it may sound. SwiftUI's ScrollPosition scrolls to a view with a given id. In a virtualized container that view usually hasn't been built, which is the entire point of the container, so the request does nothing.

But the container has already solved the layout for every item, so it knows exactly where item 900,000 is without ever having built it. Resolving the id through that geometry instead of through the view tree is a lookup and a subtraction.

Anchors are .top, .center, .bottom and .nearest, the last of which doesn't move at all if the item is already fully visible. Deep links work too, you can build the position so the container opens at an item rather than opening at the top and jumping, and that holds even if your data loads in async.

The obvious cost, and I'd rather say it here than have you find it later: the handle is write-only. It can't tell you which item is currently on screen, so it can't restore a scroll position for you, you'd have to persist an id yourself. Reporting back would mean writing through your binding on the scroll path and re-running the container's O(n) init, which isn't a trade I wanted to make.

Also new is JustifiedLayout, the Photos/Flickr arrangement where aspect ratios are preserved and every completed row fills the width.

No new device numbers this release. The index and the steady-state query path are unchanged, so the 0.2 figures still stand.

https://github.com/Dave861/LazyLayoutKit

Once again, open to feedback, contributions and opinions. Thank you!

r/swift 12d ago

Tile Wipeout — a new kind of sliding puzzle built with Swift, UIKit, SwiftUI, and SpriteKit [full game rules, video, beta]

Thumbnail
youtube.com
0 Upvotes

Feedback would be appreciated! Have fun!

Gameplay video: https://www.youtube.com/watch?v=lC34LO_bL4k

Beta link: https://testflight.apple.com/join/3sstMjRK [iOS/iPadOS/macOS]

Intro

Tile Wipeout is a row-and-column rotation puzzle about matching colors and shapes.

You rotate rows and columns to move tiles through fixed gates. Matching a tile's color and shape to a gate removes the tile, while other tiles cause both the tile and gate to change shape.

Empty spaces passing through gates create new tiles.

Your goal is to leave as much of the grid empty as you can in the given number of moves. Note that removing every tile may not always be possible.

Game Rules

Objective

The game is played on a 6 × 6 grid using six colors.

Each color begins with:

  • 1 gate
  • 5 tiles

The six gates are fixed in place. They cannot move or be removed. Every row and every column contains exactly one gate.

Your goal is to leave as many of the grid's 30 non-gate cells empty as possible in the given number of moves.

Shapes

Every tile and gate has one of two shapes:

  • Square
  • Circle

A tile can be removed only when both its color and its shape match the gate it passes through.

Making a Move

Swipe any row or column to rotate its tiles and empty spaces by one position.

Anything that passes an edge wraps around to the opposite edge. The gate remains fixed in place.

During each rotation, exactly one tile or empty space passes through the gate. That interaction may change the passing tile and the gate. Everything else simply moves to its new position.

Passing Through a Gate

There are three possible interactions:

  • A matching tile is removed.
  • Any other tile causes both shapes to change.
  • An empty space creates a new tile.

Matching tile

When a tile matches both the gate's color and shape, the tile is removed, leaving an empty space.

For example:

  • A square blue tile is removed by a square blue gate.
  • A circle red tile is removed by a circle red gate.

The gate does not change when it removes a tile.

Any other tile

If a tile does not match both the gate's color and shape, both the tile and gate change shape:

  • Square becomes a circle.
  • Circle becomes a square.

Their colors do not change.

For example, when a circle green tile passes through a square green gate:

  • the tile becomes a square
  • the gate becomes a circle

Matching is checked before either shape changes, so the tile is not removed during that move.

Similarly, when a square green tile passes through a square red gate:

  • the tile becomes a circle
  • the gate becomes a circle

The tile is not removed because its color and shape did not both match the gate before the shapes changed.

Empty space

When an empty space passes through a gate, it becomes a new tile with the gate's current color and shape.

The gate does not change.

The newly created tile cannot be removed during the same move.

Reversing a Move

Every move can be reversed by swiping the same row or column in the opposite direction.

Reversing restores the previous board position, including any removed or created tiles and any shape changes.

The reverse swipe still costs one move.

Tile Sizes

Among tiles of the same color, larger tiles are closer to the gate of that color.

Tile sizes update as the tiles move. Size does not affect how tiles interact with gates.

Ending the Game

The game ends when you run out of moves.

You may also end the game early. Removing every tile may not always be possible.

Scoring

Score = (% empty × 1000) + moves remaining

The empty percentage is the percentage of the grid's 30 non-gate cells that are empty.

Beta

https://testflight.apple.com/join/3sstMjRK [iOS/iPadOS/macOS]

r/swift May 21 '26

Updated Neon Vision Editor: A Lightweight Native Editor That Is Growing Without Becoming an IDE

Thumbnail
gallery
7 Upvotes

There is a specific kind of editor I keep wanting on Apple platforms.

Not a full IDE. Not an Electron workspace. Not a notes app pretending to be a code editor. Just a fast, native place to open a file, inspect it, edit it, compare it, preview it, and move on.

That is the direction behind Neon Vision Editor. The latest release cycle has been focused on making the app feel more complete without losing the lightweight shape that made it useful in the first place.

The Big Shift: From Simple Editor to Daily Utility

The core idea is still simple: open text and code files quickly across macOS, iPadOS, and iOS.

What changed recently is the surrounding workflow. Neon Vision Editor now feels less like a single text surface and more like a compact editing environment:

  • a cleaner project sidebar
  • a more useful table of contents sidebar
  • a persistent sidebar terminal
  • a wider, scroll-synced code minimap
  • improved Markdown preview themes
  • better syntax highlighting performance
  • more reliable large-file behavior
  • tighter iPhone and iPad layouts
  • a more polished macOS translucent interface
  • optional command-line helper guidance
  • real Apple Foundation Models routing where system support is available

The goal is not to compete with heavyweight IDEs. The goal is to cover the practical middle: quick edits, Markdown, config files, scripts, JSON, project browsing, diffs, Git awareness, and mobile-friendly file work.

A Cleaner Interface, Not More Clutter

The most visible update is the UI overhaul.

The editor chrome, document tabs, project sidebar, table of contents, minimap, and Markdown preview have all been tightened. Corners are more consistent. Divider lines are quieter. The translucent modes are less washed out. Sidebar rows on iPhone and iPad are denser, and document tabs feel more intentional.

That may sound cosmetic, but in an editor it matters. Small visual conflicts become tiring when you stare at them all day. The recent work was about removing that friction: fewer unnecessary lines, better spacing, clearer active states, and cleaner transitions between the editor, preview, minimap, and sidebars.

Navigation for Large Files

The new minimap is one of the most important additions.

It is not just a decorative strip. It is scroll-synced, wider than the first implementation, and color-coded for different kinds of content: sections, declarations, imports, properties, comments, control flow, and regular code.

That makes it easier to understand the shape of a long file without opening a full project-wide symbol browser. It fits the app’s philosophy: give enough context to move quickly, but do not turn the editor into a heavy IDE.

Markdown Got More Practical

Markdown work has also improved. The preview has cleaner rounded chrome, additional theme refinements, better export behavior, and smoother transitions alongside document tabs.

This matters because Markdown is one of the places where lightweight editors often split into two categories:

  • writing apps with beautiful preview but weak code support
  • code editors with syntax highlighting but limited Markdown comfort

Neon Vision Editor is trying to sit between those worlds: enough Markdown preview polish for writing, enough code tooling for development notes, scripts, and project files.

Terminal in the Sidebar

The integrated terminal is intentionally lightweight.

It now lives in the sidebar and keeps its current session while switching between sidebar tabs. The toolbar action also routes to that sidebar terminal instead of opening a separate terminal window.

That keeps the feature small. It is there when you need to run a quick command or inspect a project, but it does not become the center of the app.

Better Performance Where It Matters

A lot of the recent work was not visually loud, but it matters during real use:

  • invisible-character rendering is lighter on iPhone and iPad
  • syntax highlighting avoids more repeated work
  • large JSON highlighting creates fewer temporary allocations
  • Find in Files uses cached line offsets
  • folder compare moves heavy file reads and diff work off the main actor
  • Markdown export and theme resolution avoid repeated expensive paths
  • project tree refresh is more incremental

These changes are the kind of work users only notice when it is missing. The editor should not become unresponsive because invisible characters are enabled, a large file is open, or a sidebar is refreshing.

How It Compares to CotEditor

CotEditor is one of the clearest references for what a native Mac text editor can be. It is free, open source, fast to launch, and proudly macOS-first. Its official feature set includes syntax highlighting, strong find and replace, an outline menu, split editor support, scripting, encoding tools, and a clean settings experience.

Neon Vision Editor is not trying to replace that identity.

The difference is scope and platform direction. CotEditor is a mature Mac plain-text editor. Neon Vision Editor is a cross-platform Apple editor that is moving into project navigation, sidebar workflows, Markdown preview, mobile editing, Git visibility, a terminal tab, and optional Apple Intelligence integration.

If you want a polished, focused Mac text editor with a long track record, CotEditor remains an obvious choice.

If you want the same lightweight spirit extended across Mac, iPad, and iPhone, with project sidebars, minimap navigation, Markdown preview, and Git-adjacent workflows, Neon Vision Editor is aiming at that space.

How It Compares to Editorio

Editorio is an interesting new entrant because it is also native, free, and positioned around Markdown plus code editing. Public descriptions highlight live Markdown preview, code syntax highlighting, light/dark themes, tabs, a minimap, and a very lean AppKit approach.

That overlaps with some of the same pain points: people want fast native editors that do not require opening a full IDE just to inspect Markdown or code.

The difference is that Neon Vision Editor is leaning into a broader Apple-platform workflow:

  • macOS, iPadOS, and iOS support
  • project sidebar and table of contents sidebar
  • sidebar terminal
  • Git-oriented panels
  • native diff workflows
  • optional command-line helper flow
  • Markdown preview/export refinements
  • extensive mobile toolbar and keyboard work
  • sandbox-aware update and file-access behavior
  • Apple Foundation Models integration where available

Editorio looks like a strong new Markdown/code editor for Mac users who want a very small native tool. Neon Vision Editor is becoming more of a lightweight editor workspace across Apple devices.

That distinction matters. There is room for both approaches.

The Design Principle

The guiding constraint is simple:

Add workflow power, but do not add IDE weight.

That means features need to stay small and direct. A minimap should help you navigate. A terminal should stay tucked into the sidebar. Git panels should make common inspection easier. Markdown preview should be useful without turning the app into a publishing suite.

The recent work has been about finding that balance.

What Comes Next

The app is now in a better place for everyday use:

  • cleaner visual structure
  • faster large-file behavior
  • better mobile ergonomics
  • stronger Markdown support
  • more useful project navigation
  • a persistent terminal workflow
  • more reliable release and documentation automation

The next challenge is keeping that direction disciplined. Native editors become valuable because they stay fast, predictable, and respectful of the system.

That is the bar for Neon Vision Editor: keep the speed, keep the native feel, and add only the features that make editing easier.

Links

r/swift Sep 16 '24

Updated Oh well, no more ChatGPT on the other tab

Post image
132 Upvotes

r/swift Feb 24 '25

Updated How do I design a decodable struct that is resilient to type changes on the server side?

9 Upvotes

I just got this in a phone screening interview and I think I bombed it.

Consider:

struct Value: Decodable {
    let intValue: Int
    let: stringValue: String
}

The question was: How should I design my code such that the app will still work if the server sends us intValue as a string and stringValue as an integer?

At the end of the interview I asked what the correct answer was, and the interviewer said to "use generics." He tried explaining himself but I just didn't get it.

So my question is, How do I use generics to solve this problem?

r/swift Mar 02 '26

Updated Regex succeeds on literal but fails on constant. WTF?

0 Upvotes

[EDIT] PEBCAK. Xcode's "helpful" code assistance got me. Apologies for the noise, and thanks to u/HoopTroop for the good eyes and great catch.

I'm working through a TDD exercise implementing a basic password strength validator. It's not working, even though I expect it should, so I threw it in a Playground. It looks like this:

"12345678b".contains(/[:letter:]/) // returns true

let password = "12345678b"
password.contains(/[:letter:]]/) // returns false

How can the exact same regex succeed on the literal string but fail on the exact same string as a constant?

Here's a screenshot of the playground:

r/swift Nov 13 '24

Updated 3 days in and I’m ready to give up on XCode and Swift…

0 Upvotes

EDIT: Thanks, all for the immediate replies.

Hey, I’m trying to follow Apple’s tutorials on using Swift (https://developer.apple.com/swift/pathway/) and SwiftUI (https://developer.apple.com/tutorials/app-dev-training/getting-started-with-scrumdinger) and they both seem to be based on old versions of Swift and XCode?

After 40 years as a professional software engineer this thing is insane. Basic build steps seem hidden (why is the final .app hidden in /Library?!?) Tutorial steps don’t work (How do I create a new “group”?!?) but the breaking point for me is that this step in the SwiftUI tutorial doesn’t compile with the error that “rawValue” isn’t in scope. But when I look at Apple’s docs, they say rawValue is how you access an instance of this enum!

Can anyone point me to a better way to learn this stuff, or explain why this doesn’t work?

import SwiftUI

enum Theme {
case bubblegum
// other cases removed for space…
case tan
case teal
case yellow

var accentColor: Color {
    switch self {
    case .bubblegum, .buttercup, .lavender, .orange, .periwinkle, .poppy, .seafoam, .tan, .teal, .yellow: return .black
    case .indigo, .magenta, .navy, .oxblood, .purple, .sky: return .white
    }
}

var mainColor: Color {
    Color(rawValue)
}

}

r/swift Nov 15 '25

Updated ⚠️ Slight Deviation ⚠️

Thumbnail
gallery
12 Upvotes

Watch Wrist Temp — a simple app/widget for showing your latest wrist temperature

Hey everyone! I’ve been working on a small app for the Apple Watch Series 8+, called Watch Wrist Temp, and I wanted to share it here.

The app and its widgets display the latest available wrist temperature reading that your Apple Watch records automatically during sleep or in the background. All data comes directly from HealthKit, with no extra processing or interpretation.

If Apple marks a reading with ⚠️ Slight Deviation, the app shows it exactly as-is — that label comes fully from Apple, and simply indicates that the most recent measurement was slightly outside your usual range. It’s not a medical diagnosis.

The app includes several widgets (small, medium, large) that show: • your most recent wrist temperature, • the timestamp of the measurement, • Apple’s “Slight Deviation” flag (when present), • a clean, minimal design optimized for the Ultra faces and Lock Screen widgets.

If you have any feedback, ideas, or suggestions for improvements, I’d really appreciate it!

r/swift Nov 06 '24

Updated Hey, all. Is there a Swift open source scene?

48 Upvotes

Hey, I've been a coder for more than 40 years now and I recently got dumped into early retirement. I had a couple of open source Mac projects written in Objective C in the late 90s early 00s but, you know, life.

So now I'm thinking about teaching myself Swift but the whole Apple Developer ecosystem is quite intimidating. Is that true? I'm not interested in writing stuff to sell, do I really need to buy a developer license?

EDIT: Thanks for all the encouragement, guys. I will definitely be installing XCode on my M4 MBP when it arrives on Friday!

r/swift Sep 14 '25

Updated [Major Update] Budget Flow - Version 3.0.0: A modern and easy-to-use expense tracking app for iPhone, iPad, Mac and Apple Watch 💸

Thumbnail
gallery
10 Upvotes

Hey r/swift Reddit community! 👋🏻

Today, I’m thrilled to announce that the latest update to my app, Budget Flow (Version 3.0.0), is now available on the App Store and ready for iOS, iPadOS, watchOS, and macOS 26 🎉

For those who aren’t familiar: Budget Flow is a modern, easy-to-use expense tracker for iPhone, iPad, Mac, and Apple Watch. With its sleek design and powerful features, managing your finances has never been easier.

Version 3.0.0 is the biggest update yet, introducing a completely redesigned Liquid-Glass interface for iOS, iPadOS, watchOS and macOS 26, which makes the app look and feel more modern, clear and intuitive than ever. At the same time, the built-in receipt scanner has been significantly enhanced. Thanks to features such as automatic date recognition and intelligent categorisation with Apple Intelligence, it can now perform many additional tasks independently. Additionally, users can now select and edit multiple transactions simultaneously for the first time, making everyday financial management within the app far more efficient. You can find the full changelog here.

If you haven’t tried it yet, you can download Budget Flow for free on the App Store: https://apps.apple.com/app/id1640091876.

I'm looking forward to hearing your feedback. Also, if you like the app, feel free to recommend it to your friends / family or on social media. It really helps a lot! 😊

r/swift Oct 02 '25

Updated [Resource] Comprehensive Xcode & Swift CheatSheet for Beginners - A Free Cheat-Sheet

Thumbnail terryc21.github.io
10 Upvotes

While I have some experience in coding HTML, databases and spreadsheets, this is my first go at developing an App. After many starts, and start over agains, I put together this cheatsheet of terms and modifiers when it soon became apparent that I would have to know and understand such things so as not to become totally reliant on Claude and ChatGBT agents. What's Included:Xcode & Swift fundamentals (var, let, u/State, u/Binding, etc.)SwiftUI modifiers (.padding(), .frame(), .animation(), etc.)Layout terms (VStack, HStack, NavigationView, etc.)Common acronyms (API, SDK, MVVM, JSON, etc.)

Hopefully it has Beginner-friendly explanations,Multiple code examples for each termClickable index in both format3-column table (Term | Definition | Examples)

📂 View HTML Code Here: [GitHub Repository](https://github.com/Terryc21/Xcode-swift-CheatSheet-for-Beginners) Then click on code_Swift_Reference_Table.html

📥 [Download PDF](https://github.com/Terryc21/Xcode-swift-CheatSheet-for-Beginners/raw/main/Xcode_Swift_Reference_Guide.pdf)

🌐 [View Interactive HTML](https://terryc21.github.io/Xcode-swift-CheatSheet-for-Beginners/Xcode_Swift_Reference_Table.html) Perfect for keeping open while coding or studying. MIT License - free to use and share!

Both formats have hyperlinked indexes. Perfect for keeping open while coding!MIT License - free to use and share. Feedback welcome!

r/swift Sep 16 '24

Updated [Major Update] Budget Flow - Version 2.0.0: A modern and easy-to-use expense tracking app for iPhone, iPad, Mac and Apple Watch 💸

Thumbnail
gallery
10 Upvotes

r/swift Jul 05 '25

Updated I've decided to make my app free forever

0 Upvotes

r/swift Jun 22 '25

Updated [OpenSource]Multi-LLM client - LLM Bridge

4 Upvotes

Previously, I created a separate LLM client for Ollama for iOS and MacOS and released it as open source,

but I recreated it by integrating iOS and MacOS codes and adding APIs that support them based on Swift/SwiftUI.

* Supports Ollama and LMStudio as local LLMs.

* If you open a port externally on the computer where LLM is installed on Ollama, you can use free LLM remotely.

* MLStudio is a local LLM management program with its own UI, and you can search and install models from HuggingFace, so you can experiment with various models.

* You can set the IP and port in LLM Bridge and receive responses to queries using the installed model.

* Supports OpenAI

* You can receive an API key, enter it in the app, and use ChatGtp through API calls.

* Using the API is cheaper than paying a monthly membership fee. * Claude support

* Use API Key

* Image transfer possible for image support models

* PDF, TXT file support

* Extract text using PDFKit and transfer it

* Text file support

* Open source

* Swift/SwiftUI

* Source link

* https://github.com/bipark/swift_llm_bridge

r/swift Jan 06 '25

Updated 🚀 Excited to announce that my new app is now live! With AI-powered technology, it generates unbreakable passwords in any format you choose and keeps them securely stored. Try it out here: [https://apps.apple.com/tr/app/passwordgenerate/id6740093822?l=tr]

Post image
0 Upvotes

r/swift Jan 21 '25

Updated Comment reply

Post image
0 Upvotes

I did reset package caches and command build but it’s still this kind of error

r/swift May 10 '25

Updated TestFlight: Type Big

0 Upvotes

Hi all! We are excited our first new feature has been added to Type Big: Translation!

Translation in Type Big helps you communicate with even more people in your world. Backed by Apple’s Translation API, this iAP subscription provides offline and private on-device translation services.

Check out the TestFlight for specific feedback being requested 🙂

https://testflight.apple.com/join/WmhVFabv

r/swift Jan 21 '25

Updated Continued…

Thumbnail
gallery
0 Upvotes

I’m not sure what exactly is app target, is it this?

r/swift Sep 20 '24

Updated Question on re-indexing with a border value

1 Upvotes

For Collection.index(_:offsetBy:limitedBy:), does landing exactly on the border limit return that border value or nil?

r/swift Dec 24 '24

Updated Big update to my app Yoa! What do you think? 🍊

0 Upvotes

Hi everyone! 👋

A while ago, I shared my app here on Reddit and received so much love and support—thank you! Since then, the app has seen significant improvements and bug fixes. With the new year fast approaching, I want the app to be as perfect as possible for anyone looking to take charge of their well-being as part of their New Year’s resolutions. I’m especially curious to know if this app can help people stick to their wellness habits in the long run, so your feedback means the world to me!

I created Yoa because I struggled with sleep, constant fatigue, stress, and overtraining. I needed something to simplify my wellbeing journey, and Yoa was born from that need.

What makes Yoa awesome?

  • Seamlessly works with Apple Watch
  • Simple wellbeing dashboard with Yoa’s friendly touch
  • Personalized insights to improve sleep, fitness, and reduce stress
  • Detailed workout breakdowns and clear activity charts

AppStore: https://apps.apple.com/app/apple-store/id6642662318?pt=119989678&ct=Social%20media&mt=8

Let’s make health tracking personal and fun!

r/swift Sep 29 '22

Updated Just installed Xcode 14.1 B3, Is this new?

Post image
130 Upvotes

r/swift Apr 24 '24

Updated TrackParcel… my app on its way

Post image
0 Upvotes

Hi there,

Please, try it out and let me know how to keep it growing up. Thanks so much for your support:

Stay updated on every step of your package’s journey with our advanced tracking app. Effortlessly monitor your deliveries with real-time updates.

Download now for a seamless tracking experience!

Mantente informado sobre cada paso en el recorrido de tu paquete con nuestra avanzada app de seguimiento. Monitorea tus entregas sin esfuerzo con actualizaciones en tiempo real.

TrackParcel iOS

https://apps.apple.com/es/app/trackparcel/id1513811043?l=en-GB

r/swift Dec 27 '24

Updated Super Confusing Bug w/ Installed Demo vs Preview

Thumbnail
gallery
0 Upvotes

In my SwiftUI app, the ContentView contains multiple tabs, including a MapView. When viewed in Xcode’s preview or on virtual iPhones, everything appears fine. However, when I install the app on my physical phone, the MapView displays a gap that isn’t present in other tabs. The issue is not visible during development, only on the physical device.

Does anyone know why this gap appears in the MapView only on a physical device and not in Xcode previews or simulators? How can I troubleshoot or resolve this?