Devon
Devon avatar

Devon

@Devon@kbin.social

iOS developer. Working on iGPT, a native iOS platform for utilizing your OpenAI API key. Open to collaboration and full-time positions. DM me!

Devon, to SwiftUI
Devon avatar

How do you get screenshots with the proper status bar on iOS 16-17?

I've been ready to submit my app to the App Store for weeks, but I've been putting it off because I can't figure out how to modify the simulators' status bars to get the Apple-recommended layout.

I've followed various tutorials to update the simulators, but it seems that it's not possible on current iOS versions, and my app's minimum deployment is higher than when it quit working.

At this point, I've got a flow setup to easily get all screenshots I need without status bars. Is there any way to automate adding the proper toolbar to the screenshots, or will I need to manually edit every single picture?

chakie, to SwiftUI
@chakie@toot.community avatar

I should look into any new SwiftUI API:s in iOS/iPadOS 17 as it’s probably going to be out in a few days or weeks at most. From watching some WWDC videos I don’t remember anything interesting that I thought could be useful, but there has to be something? SwiftData is a big one, but I don’t even use CoreData so it’s irrelevant. Also never use version 1.0 of a brand new Apple framework.

Devon,
Devon avatar

@chakie

I was helping somebody with an issue on Reddit they were having, and I managed to find a solution using @Observable, but I couldn't translate it to using ObservableObject.

Here's the Gist.
And here's the original post

Granted, I didn't try for too long to translate it, so it may be possible, but my attempts were getting ugly pretty quickly.

Devon,
Devon avatar

@roydbt I know this is a bit old now, but just in case. I don't believe there is a native solution for your problem. Even creating a custom navigation bar back button while hiding the real one means you lose swipe-ability for navigation unless you implement a custom solution.

aaronbushnell, to SwiftUI
@aaronbushnell@mastodon.social avatar

What, in your apps, still needs UIKit to create the experience you want? I want to stick to SwiftUI as much as possible, but it feels like there’s still a lot missing.

One example: using FocusState to focus an input when a sheet is presented is still not as “instant” as UIKit’s becomeFirstResponder.

@atpfm

Devon,
Devon avatar

@aaronbushnell I use UIKit twice in my SwiftUI app. Once to work with NSAttributedStrings for code block-style formatting via a framework, and once to allow selection of text without focusing on the TextField it’s in.

Devon,
Devon avatar

@MicroWave I had never heard of the Fediverse or kbin before the protests on Reddit. I’m really hoping this all takes off. I’ve been enjoying my time here so far.

Devon, to SwiftUI
Devon avatar

Is it expected behavior that reading an empty NavigationPath back into memory from UserDefaults and then using that path for navigation breaks the app? Nothing renders on the screen, even though my View that should render has its onAppear trigger, and there’s no errors. If the loaded path isn’t empty, it works as expected.

I’ve gotten around this issue by checking if the loaded path is empty, and creating a new one if so. This doesn’t seem right, though.

I was following along with Apple’s tutorial pretty closely. The only other thing I really changed was the .onChange of scenePhase, because it wasn’t triggering as they wrote it. I instead observed the path for changes.

jknlsn, to SwiftUI
@jknlsn@hachyderm.io avatar

Hey friends! Anyone know when and why a SwiftUI list will have different behaviour to a ScrollView containing a LazyVStack? I was under the impression that Lists now always lazy load their contents too. What I'm seeing though is some pretty horrendous slow downs and performance issues with my List that seem to vanish with ScrollView.

I was using List so that I can add .swipeActions in the near future, which I don't think you can do with ScrollView and LazyVStack.

Any tips?

Devon,
Devon avatar

@gernot does that mean .self is bad?

Devon,
Devon avatar

@gernot that’s really informative. I appreciate your time writing that all out. I have some updating to do in my app today!

So based on what you said, as long as you’ve got efficient ids setup (which I’m assuming would just be UUID for the most part), it seems like an unstyled List would be better than a ScrollView… always? Unless, just guessing, but maybe there isn’t an alternative to ScrollViewReader and manually scrolling to ids in a List. That’d be a problem I would run into personally, as my app has “conversations” that it immediately scrolls to the bottom of upon loading one.

Devon,
Devon avatar

@gernot so much to balance with learning iOS dev while finishing this CS degree. I’ll add your ideas to my endless list of things to check out.

Thanks again!

Devon,
Devon avatar

@Sandro very cool! I’ve seen you post this on Reddit and always thought it’d be useful to check out, but the code is only half the battle. I don’t think I’ve got the artistic or design skills to really make much use of it. The app I’m building’s logo is a rounded rectangle with an emoji on top lol.

Devon,
Devon avatar

@conciselyverbose

community-sourced recipes

That’s in the first paragraph of the “Online Cookbook” tab of the website. I would assume that means the recipes are free to use.

All the recipes are open source and live in the Recipes folder in the Git.

That’s on the GitHub page for the app and Xcode extension for the website. I think you’re good, but if you work for somebody, maybe just ask your manager first. If you’re indie, I wouldn’t sweat it.

looopTools, to SwiftUI
@looopTools@mastodon.social avatar

People who play with what is the best resource for learning this ?

Devon,
Devon avatar

To add to what @phranck recommended, there's also Stanford's "Developing Apps for iOS" course available for free.

Once you get a handle on the basics, here's a free resource I just found today with more specific tutorials, called Swift UI recipes.

Devon,
Devon avatar

@phranck I tried to post a screenshot to show you, but I couldn’t figure it out 😂 it’s the link icon above the comment box, the two ovals connected together. Tapping it gives you empty brackets and parenthesis with “url” inside. Then you fill the brackets in with the text you want hyperlinked, and replace “url” with your url.

Devon,
Devon avatar

@phranck ah I suppose it might be, I forgot there’s different platforms for us to connect on. You may still be able to manually do it. Try just typing it out. Again, format is open bracket [, describing text, closed bracket ], no space and then open parenthesis (, your url, closed parenthesis ). No spaces whatsoever.

Devon,
Devon avatar

@phranck ah, bummer. Hopefully you get an update soon. I know I’m eager for there to be a kbin app. I hate using it through safari. Maybe I should ask kbin if they’re looking for a dev 🤔

Devon,
Devon avatar

It’s great to see this being considered. We all deserve the ability to use these services. Thanks for the PSA!

lucabernardi, to random

The visionOS SDK with a lot of new SwiftUI APIs is now available to download.

Go check it out. Can't wait to see what you all are going to build!

https://www.apple.com/newsroom/2023/06/developer-tools-to-create-spatial-experiences-for-apple-vision-pro-now-available/

Devon,
Devon avatar

Thanks for sharing! I’ve never built anything related to AR, but the Vision Pro announcement might have inspired me to change that…

You should consider cross posting this (and joining us!) in the SwiftUI magazine.

StewartLynch, to SwiftUI
@StewartLynch@iosdev.space avatar

My approach to teaching is probably different from what you have seen in other posts and videos. If you want another point of view, check out my latest videos. It always helps to get a couple of different points of view.

https://youtu.be/xGNR7tvDE0Q

Devon,
Devon avatar

@StewartLynch thanks for sharing, this was an interesting video to watch.

Do you think this would be a good use case for matched geometry effect, transitioning from text in a TextField to a message bubble in a ScrollView? Similar to in the Messages app.

I’m thinking an animation to push the text directly into a MessageView and into place, then when the animation is complete, instantly replacing it with the proper Message object from CoreData and rendering a new MessageView. What do you think?

ramzesenok, to SwiftUI
@ramzesenok@mastodon.social avatar
  • Day 43
    We’re constantly composing views from other views in and when applying modifiers (e.g. opacity) to the outer view sometimes it gets applied to each subview separately instead of to the whole thing as one. To fix this use .compositingGroup()
Devon,
Devon avatar

@ramzesenok amazing how I just ran into this exact problem yesterday, but didn’t have time to look for a solution. Now I accidentally stumble upon it.

Thanks for this!

Devon, (edited )
Devon avatar

I’m eager to try out Swift Data. Seems way more intuitive and Swifty than Core Data. The headset is definitely on my wish list, too.

ETA: Wow, taking the time to go through the whole blog post, I am SO excited for what’s coming. So many problems I’ve run into recently are getting addressed. SwiftUI may not be perfect yet, but Apple is getting it closer and closer every year.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • khanakhh
  • osvaldo12
  • Durango
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • cisconetworking
  • Youngstown
  • slotface
  • kavyap
  • JUstTest
  • cubers
  • anitta
  • GTA5RPClips
  • tester
  • ethstaker
  • modclub
  • InstantRegret
  • everett
  • provamag3
  • Leos
  • normalnudes
  • tacticalgear
  • lostlight
  • All magazines