#iOSDev
NEW VERSION OF MLEM IS OUT
This update is big, and there's more coming later! This update addresses these issues:
- New icon by the amazing clay! Stay tuned for more icons, including Pride! In the future, you will be able to choose between lots of icons, and submit your own
- A whole bunch of crashes related to loading communities
- Some posts showing multiple times in the feed
- (Hopefully) accounts being deleted between app launches
- A few issues logging in
#iosdev #lemmy #buildinpublic #mlem

Part of me trying to balance indie app dev and family life, means that I spend time on my phone planning and brain storming.
Any apps I should check out to help me?
#buildinpublic #IndieDev #iosdev
Popped to my local Apple Store to pick up a pair of AirPods Pro 2 (to address a sleep disruption challenge) and was politely asked by the chap who served me if my iPhone firmware was up to date. He was surprised to see iOS 17 and watchOS 10 in the wild.
His next question was, “Will you be getting a Vision Pro?”. No, was my simple answer. I never buy first gen and even then I can’t see me spending more than £1500 on something like that for years. Doesn’t mean I’m not impressed or excited about what it can mean. #Apple #iOSDev

The WWDC Labs I was able to attend were super great.
I have so many things to improve design-wise and when it comes to App Store page for @switchbuddy and also Game Widgets.
Particularly the game detail screens should look much better (hopefully) soon 🎉
And UIKit Lab helped me substantially improve my "streching header" implementation with Compositional Layout and fix couple of issues with separators that I had 🙂
Apple gets to create special UI's for Camera, Photos, Phone etc. But Third Party apps don't. There is no way to check if the feature is enabled and creating an app with hierarchy like a navigation controller, would show 2 back buttons which is even more confusion to the user.
I've submitted feedback and hopefully we can see a change before iOS 17 releases.
I was very happy to see the announcement of Assistive Access in iOS 17 for turning an iPhone into an easier to use device for less tech savvy people and people with disabilities.
But after watching the session I'm disappointed. The feature doesn't seem to have changed from the leaked code in iOS 16 and almost no thought went into it.
#WWDC #iOSdev
I was tearing my hair out trying to work out why I was getting the warning “Accessing a SceneStorage value outside of being installed on a View. This will always return the default value.” when I absolutely was using it on a view.
Apple Engineers (very friendly, we had a nice chat for the rest of the session) in a lab told me it only works in a SwiftUI lifecycle and the error is just wrong :lolsob:
FB12299044
Any ideas that we’ll explore with @tuist will eventually be implemented by Apple and integrated into Xcode, and that’s fantastic. Because of the size of the Tuist project and community we can be more agile and take more risks when exploring ideas, and in doing so we are pushing the industry forward #Swift #iOSdev
I'm trying to make a parameter pack version of AnimatablePair but I'm not sure I fully get the repeat each stuff. Also it seems generic types with parameter packs are experimental. Is there a way to test this out without the error?
Gist: https://gist.github.com/ryanlintott/5e065dde4838848f2f6e95323fe26ada
#SwiftUI #iOSDev #WWDC23

Warning: installing the iOS 16.4 simulator in Xcode 15 Beta breaks playgrounds running on iOS in Xcode 14.3.1. The issue goes away if I delete iOS 16.4 from the Xcode 15 Platforms preference page.

I'm running into some issues with CloudKit. I've pushed my schema changes to production, changed over my entitlements to point to production, but in my latest TestFlight build, data isn't syncing. It also appears that the CloudKit zone that previously existed in the development schema no longer exists, and there's no CloudKit zone in production. Am I missing something here, or is this all normal?
iOS Dev Weekly, Issue 613 is out. Happy Friday, everyone, and I hope you had an amazing WWDC week! 🚀
https://iosdevweekly.com/issues/613#start
The Stanford course seems to be a very good resource. Started with the first lecture today https://youtube.com/playlist?list=PLpGHT1n4-mAsxuRxVPv7kj4-dQYoC3VVu #ios #dev #iosdev

[Re. @tryswiftworld]
Last chance to join try! Swift Dub Dub - happening today at 1pm EST!! #WWDC23 #iOSDev Talks by @twostraws @vatsal_manot @MvpOhhhDrey @v_pradeilles @zamzampooya @thedevme @dvrzan @elkraneo @jamesdempsey 🐥 🥽 🎉
Register here! https://t.co/H66mDYhVwu #swiftlang #WWDC


For example
```
@StaticMemberIterable
struct Chili {
let name: String
let heatLevel: Int
static let jalapeño = Chili(name: "jalapeño", heatLevel: 2)
static let habenero = Chili(name: "habenero", heatLevel: 5)
}
```
expands to
```
struct Chili {
let name: String
let heatLevel: Int
static let jalapeño = Chili(name: "jalapeño", heatLevel: 2)
static let habenero = Chili(name: "habenero", heatLevel: 5)
static let allStaticMembers = [jalapeño, habenero]
}
```
#WWDC #iOSDev
Introducing `StaticMemberIterable` Swift Macro!
Confidently cover all static members in tests or in your UI. Like CaseIterable, this macro creates an array of all the static members of a type. This is useful when a type has a few instances of itself as static members.
https://github.com/FullQueueDeveloper/StaticMemberIterable
#WWDC #SwiftMacro #iOSDev #SwiftLang #SwiftDeveloper #WWDC23
I've used this approach for typesafety of record IDs in my own projects, usually by manually copy-pasting. Now with Swift Macros in Swift 5.9, it's going to be so much easier.
#WWDC #WWDC23 #SwiftMacro #iOSDev #SwiftLang #SwiftDev
When passing strings or integers as IDs, the compiler doesn't tell you if you accidentally used a person ID where a blog post ID. Now with the `UniquelyTypedID`, the compiler will not let you pass the ID of a different model.
And with the power of `ExpressibleByStringLiteral` and `ExpressibleByIntegerLiteral`, very little code will need to change.
#WWDC #WWDC23 #SwiftMacro #iOSDev #SwiftLang #SwiftDev
Introducing UniquelyTypedID, a new Swift Macro!
Use unique types for type-safety when passing IDs around.
Currently supports String, Int, & UUID. The default is UUID.
```swift
struct BlogPost {
@UniquelyTypedID(Int.self) let id: ID
let text: String
}
```
Card Buddy for iOS is coming along. The porting is going smoother than expected. Still some interactions I gotta work out, like which gestures should go to which actions. #iosdev

#SFSymbols 5 adds ~700 new symbols!
Most of them are related to cars & gaming, two areas we know Apple is focusing on.
Notably missing:
#VisionPro or anything related to AR/VR.
I’m sure we’ll get them in 2024 though!

I have an app Xcode project set up with a second library Xcode project as a subproject.
The app target has a static library target from the framework project set as a “Target Dependency” in “Build Phases”, and links the resulting library in “Link Binary With Libraries”. This works great!
I want the iOS Deployment Target to “flow” from the app target ‘into’ the library target, so they’re both the same without having to edit the library target itself. Is this possible?
📢 Calling all iOS developers! 🚀
With the announcement of #visionOS, my article on Window Management in SwiftUI 4 just became even more relevant! 🍏👀
Master WindowGroup in SwiftUI now, which is fully supported on #VisionPro:
https://www.fline.dev/window-management-on-macos-with-swiftui-4/?ref=iosdev.space
Day 228. Abstracting your interface in a way that can offer multiple input and output mechanisms is key when developing software with an accessibility mindset. #Apple has brought this to the next level in #visionOS.
Check out the session from #WWDC23: https://developer.apple.com/wwdc23/10034

Day 227. #VoiceOver will traverse elements from left-right, and from top-bottom. If for any reason you need to change that order, in #SwiftUI you can change the accessibility sort priority. A higher priority number in the container means it will go first.
https://developer.apple.com/documentation/swiftui/view/accessibility(sortpriority:)

React Native never disappoints: https://github.com/facebook/react-native/issues/37748
Am I making a terrible mistake upgrading this ancient iPhone 6s to iOS 15?
I don’t need an iOS 14 test device any more. #iOSDev

Lots of new features in Swift 5.9 that comes with Xcode 15! One of them introduces the use of if/else statements as expressions, simplifying value returns and variable assignments.
I wrote a short post about it: https://nilcoalescing.com/blog/IfElseExpressionsInSwift/
Less code to render previews by leverage Swift macros, and preview is also available for UIKit and AppKit. #WWDC23 #Xcode #iOSDev #swiftlang


I’m looking for volunteers to help me test a new Mlem feature. Sign up by responding to this toot!
Day 226. If your app lets the user share images, consider implementing the possibility for them to add an alt text for the image, so it can be used as an accessibility label when consumed by other users. Twitter or Slack have nice flows for doing this.

In Xcode 15 we can access colors and images stored in asset catalog via autogenerated static properties, for example Color(.myGreen) or even Color.myGreen 🤩 No more string literals 🎉 #WWDC23
And this works for older deployment targets too, not just iOS 17!
There is more information about this new feature in my post: https://nilcoalescing.com/blog/Xcode15Assets
#wwdc #wwdc23 #visionPro #iOSDev #SwiftDev


NEW VERSION OF MLEM IS OUT:
In this version:
- Migrated the backend from WebSockets to HTTP
- Removed some intentional crashes, so it should be crashing much less now (hopefully)
- Did some slight optimizations to make the networking work faster. Most notable posting comments and creating posts should be much faster now
IF YOU HAVE ACCOUNTS ADDED, REMOVE THEM AND RE-ADD THEM! Otherwise every feed will show „No posts to be found“
Day 225. Support both orientations, if possible. I know not even iOS itself does it, but it hasn't always been like that. You'll create a more robust UI that will be easier to port to iPadOS. And especially, don't force your users to rotate their devices.

Apple and iOS friends: I won’t be with you at WWDC, but I hope you all enjoy getting together again after such a long hiatus. There will be a lot of tech stuff going on, but don’t lose sight of what’s really important: Meeting new people and renewing existing friendships. Have fun! #WWDC #WWDC2023 #iOSDev
In case this is useful to someone, I have a repo with #SwiftUI generated interfaces that I've been updating semi-regularly since #Xcode 11, so I can see the diffs between different versions (there are separate branches for macOS and watchOS): https://github.com/mackuba/swiftui-headers #Swift #iOSDev #MacDev
MLEM HOTFIX OUT NOW:
- Fixed crashing when tapping on the "Welcome Reddit refugees" post once and for all (hopefully)! Thanks to https://github.com/mormaer
- Voting on comments now more seamless (and doesn't make the comments reload)
- Fixed bug where upvoting a downvoted post would show the incorrect score (off by 1)
Day 224. "We have one job, and that's to make our apps work. And if you are not implementing accessibility features, you are forgetting about making it work for a lot of people" @novallswift. Couldn't have said it better!
https://twitter.com/NovallSwift/status/1328387659744505856?s=20

Day 223. If your watch app has good VoiceOver support, chances are you'll also have good Assistive Touch support. But an improvement you can make is to implement a quick action (triggered with a double pinch) when there is a main action you can perform.

S3E29: 'twas the week before DubDub 🥽
We catch up about @daniel’s presentation at AppDevCon in Amsterdam!
@davidgarywood has been hard at work getting GoVJ to work with MIDI controllers.
And as WWDC '23 is iminent, we figured we should talk about some of what we think may be on it's way for the Apple eco system too 🔥
Day 222. Assistive Touch for the #AppleWatch works like magic. It lets you use your watch with gestures with the hand of the same arm you are wearing your watch on. No need to use your nose! If you don't have it on, is because you don't know about it.
More on how it works in this video from #Apple: https://youtu.be/869--vIUIv4
🚨 IT’S HERE 🚨
Söka is now available on the App Store!
Embark on an extraordinary journey of self-discovery and adventure with Söka, the groundbreaking iOS app that brings your wildest dreams to life.
Whether you yearn to explore breathtaking destinations, witness awe-inspiring performances, or achieve significant milestones, Söka is your trusted companion in turning aspirations into unforgettable realities.
Download for free: https://trysoka.app/download
Day 221. It is useful to know these #VoiceOver gestures to activate/deactivate Screen Curtain, pause/resume VoiceOver, easily simulate a long press for opening context menus, or quickly move the cursor to the screen's first or last elements.
Day 196. Once you learn some basic gestures with #VoiceOver, it is very important to master the Rotor. It is very useful to also know some more power user gestures like the Magic Tap or the Escape gesture.
More on the Rotor: https://iosdev.space/@dadederk/109491976454728208
Magic Tap: https://iosdev.space/@dadederk/109678705836709212
Perform Escape: https://iosdev.space/@dadederk/109689823700132752
Shape builder vs pathfinder by @marcedwards
https://iosdevweekly.com/issues/611#SyTjPUJ
PSA: as of iOS 16.4 a `WKWebView` is no longer inspectable by default, meaning you won't be able to debug it using Safari dev tools. You now have to explicitly enable it: https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/
#swift #xcode #iosdev
Day 195. When using VoiceOver on a device without a home button it can first be confusing how you can do a few things, including going to Home from an app, or opening the App Switcher, Control Center, or Notifications. Here's a quick guide for you.
Just 1 week til #WWDC23!
#WWDC #Apple #Developers #AppleTech #iOSDev #SwiftUI #SwiftDev #AllThingsTech
Day 194. Let's quickly remember a few of VoiceOver's most important gestures that will let you do some of the most basic actions including selection, interacting, navigating, and scrolling.
And Apple has a great video: https://youtu.be/qDm7GiKra28