@luckkerr@mastodon.world avatar

luckkerr

@luckkerr@mastodon.world

iOS Developer. Working on #Pipilo - iOS application for Mastodon in free time.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

phranck, to SwiftUI German
@phranck@chaos.social avatar

Experts: Is it somehow possible to use breakpoints when UI testing a app and display debug output in the log?

luckkerr,
@luckkerr@mastodon.world avatar

@phranck @dasdom You can use debugger when running UI tests. There is a picker near debug area where you can select which process to debug. When running UI tests it selects the tests process by default but you can switch here to app.

luckkerr,
@luckkerr@mastodon.world avatar

@phranck @dasdom away from pc but it should be somewhere like on screenshot

slothdude, to swift
@slothdude@mastodon.online avatar

I ran into a weird #swift issue today. I am organising our codebase to use local packages for various things. I have an error enum defined in a local package. There is a class in the main application target that throws the error. But when I try to check that the error is correctly thrown in a unit test, the catch doesn’t capture it. Trying to print the type and value with the help of type(of:) does give the correct looking result. I even tried with the full type including the module name.

luckkerr,
@luckkerr@mastodon.world avatar

@slothdude I had the same issue. In my case the problem was due to that package being added as linked library both to main target and unit test target. Keeping it only for main target fixed it.

wtfSwiftUI, to SwiftUI
@wtfSwiftUI@iosdev.space avatar

How to specfiy file/directory in file open dialog in a UI test using XCTest?

Using for UI testing a app, is it possible to specify a file/directory to be selected in a file open dialog? (Specifically, the one from a fileImporter call in SwiftUI; on both iOS and macOS.)

luckkerr,
@luckkerr@mastodon.world avatar

@wtfSwiftUI ui tests can interact with any application. If you figure out bundle identifier for the file picker you can pass that to XCUIApplication init and work with that to select correct file.

patrickmcconnell, to swift
@patrickmcconnell@mastodon.social avatar

I was unable to push an archive build in until I removed some preview content? The build otherwise works fine until I try an archive. Something feels wrong there but I don’t have time to do more than comment out the “offending” code

luckkerr,
@luckkerr@mastodon.world avatar

@patrickmcconnell somewhere in that preview you use code that is marked as debug only? Try also surrounding preview with DEBUG

mattiem, to random
@mattiem@mastodon.social avatar

If SwiftUI doesn’t add a macro for defining environment values I will be very disappointed.

luckkerr,
@luckkerr@mastodon.world avatar

@OneSadCookie @mattiem someone already made a package with macro like that https://github.com/Wouter01/SwiftUI-Macros

Blindworrell, to random
@Blindworrell@mastodon.social avatar

Just started playing with the #Pipilo client on iOs. It’s voiceover accessibility is superb so far. I just can’t figure out where to find notifications.

luckkerr,
@luckkerr@mastodon.world avatar

@Blindworrell Pipilo developer here. Great to hear that voiceover works correctly 😀
The app doesn’t have notifications yet, that’s something I’m still working on. If you are interested you can send me a mail and I’ll add you to TestFlight with them.

yoyokuo, to swift
@yoyokuo@mastodon.world avatar

Should I keep the iCloud Sync toggle for user or not🧐

luckkerr,
@luckkerr@mastodon.world avatar

@yoyokuo There is always a system setting for that which can be disabled per app. Users can go there if they really want to disable sync.

xmollv, to random
@xmollv@mastodon.social avatar

Does anyone know how Locket manages to open the Instagram Share Extension on iOS? I'm assuming that's what they do because if you go to Others and from the share sheet you select Instagram, the UI that shows up is the same.

See it in action:

video/mp4

luckkerr,
@luckkerr@mastodon.world avatar

@xmollv there is https://github.com/LeoNatan/LNExtensionExecutor which uses some clever Objective-C to access and execute internal code used by share extensions.
I didn’t use it in production myself, but the code appears to be written in a way to pass app review. Should be safe if you add fallbacks in case it stops working with new versions.

luckkerr, to formula1
@luckkerr@mastodon.world avatar

I’ve just released a new app MotoWeek on TestFlight (iOS, macOS).

It is a calendar app for Formula 1 and WRC fans. It displays all events in a vertical timeline divided into racing weeks. You can use the app to quickly see when each race is happening.
This is a MVP version. Right now it supports Formula 1 and WRC series plus comes with a large widget showing 5 next stages of closest race.

Looking for feedback.

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

Screenshot of the app in dark mode. Saudi Arabian race is marked as active, this was the time when the session was happening.
Screenshot of large widget showing events of upcoming Australian Grand Prix.
Screenshot of the app on macOS.

luckkerr,
@luckkerr@mastodon.world avatar

My little beta Formula 1 and WRC calendar app just received an update. It’s now possible to configure reminders to be notified about upcoming events.

Available on TestFlight for iOS and macOS https://testflight.apple.com/join/GqtAtfQu
#Formula1 #WRC #Motorsport

Screenshot of available times for which a reminder can be configured. Matching what is offered by system calendar app.
Screenshot of reminder management screen listing upcoming reminders with options to remove them.

luckkerr,
@luckkerr@mastodon.world avatar

@bwbuhse individual stages, including service breaks. Sourced from https://www.ewrc-results.com.

Tinrocket, to random
@Tinrocket@mastodon.online avatar

Sharing is almost done, but there's always One More Snag:

I can't copy multiple images to the clipboard so I disable the Copy option. But I'm running into some limitations with sharing multiple images with the system share sheet.

I need to add a way for users to pick a single image to share or copy. 🤔

luckkerr,
@luckkerr@mastodon.world avatar

@Tinrocket why not, is there a technical limitation? UIAction supports images so it should be possible.

luckkerr,
@luckkerr@mastodon.world avatar

@Tinrocket alternatively you could try changing renderingMode on your UIImage. If you set alwaysOriginal it should stop recoloring.

corduroy, to MTB
@corduroy@aus.social avatar

Might have mentioned this before, but I really do like the in-ride displays on the iPhone. Glad I finally spent a ridiculous amount on a case and handlebar mount.

image/png
image/png

luckkerr,
@luckkerr@mastodon.world avatar

@corduroy how are you activating this screen? Or it only works with watch?

oscb, to SwiftUI
@oscb@hachyderm.io avatar

I found a weird behavior on the new Observable macro, looks like a regression vs the behavior of ObservableObject.

Simple repro: 2 state objects, one with Observation another with ObservableObject in a view. View also receives a param from its parent.

The Observable macro state gets reinitialized every time the View renders again. The ObservableObject doesn’t.

The state doesn't actually change though, that still works. It's just that it gets reinitialized every time.
Valid bug?

#SwiftUI

video/mp4

luckkerr,
@luckkerr@mastodon.world avatar

@oscb from what I’ve seen it’s because StateObject has auto closure init and can preserve the object. State doesn’t have it and so always recreates your model when parent body is called. You should avoid expensive init in both cases anyway.

@helge has a lot of knowledge about this. (Hope you don’t mind a mention)

luckkerr,
@luckkerr@mastodon.world avatar

@oscb onAppear is actually executed before the view is rendered so it indeed is a good place.

tomkraina, to random
@tomkraina@mastodon.social avatar

Does it matter where .sheet() is placed in the view hierarchy in SwiftUI? I'm seeing a big regression in scrolling performance of a LazyVGrid (that's presented in the sheet) depending on where I place the .sheet() view modifier. 🤔

luckkerr,
@luckkerr@mastodon.world avatar

@tomkraina yes, depending on where you use it there might be different behavior. Try to avoid placing it inside scrollable items that might disappear. Safest is to place it as high in hierarchy as possible.

luckkerr, to swift
@luckkerr@mastodon.world avatar

Swift DocC question. Is it possible to link to a documentation of a property in nested type extension?

I want to document this property:
https://github.com/Tunous/XCAppTest/blob/f2e426b069e180a94f4cd774d74ca94a4d7c74f8/Sources/XCAppTest/XCUIElement%2BTypes.swift#L13
Similar to other in:
https://raw.githubusercontent.com/Tunous/XCAppTest/main/Sources/XCAppTest/XCAppTest.docc/XCAppTest.md

Tried XCAppTest/XCTest/XCUIElement/ElementType/bannerNotification but that doesn't work.

luckkerr,
@luckkerr@mastodon.world avatar

@ddenis it works for the other extensions. They are all visible in documentation and can be linked. I only have problem with this single property. It is documented but I have no idea how to link to it.

isurujn, to SwiftUI
@isurujn@mastodon.social avatar

I was under the impression things inside Preview Assets and Previews in code are not compiled when generating release builds in .

Why am I getting build time errors when archiving a project saying certain Preview Assets are missing 🫤

luckkerr,
@luckkerr@mastodon.world avatar

@isurujn previews are compiled (might be stripped from final binary with optimizations enabled). You have to explicitly wrap them in DEBUG to avoid compilation errors.

allenu, to swift
@allenu@mastodon.social avatar

I asked ChatGPT if there's a syntax in Swift that lets you make a copy of a struct with a list of properties to change and it said yes, there's a "with" syntax so you can do let foo = bar.with { $0.x = 1234 }, kind of like I've seen in F#.

I got excited because I didn't realize such a thing existed. I tried it, though, and it doesn't exist. lmao It made it up. #swift

luckkerr,
@luckkerr@mastodon.world avatar

@allenu for a struct in Swift that would be

var foo = bar
foo.x = 1234

No need for special syntax.

harmash, to SwiftUI
@harmash@mastodon.social avatar

Sometimes you have to use things like Task.sleep() in a #swiftui app, no way around it, especially if the app has a lot of animations. Here is a helper func to convert seconds → nanoseconds that sleep() requires 🙌

luckkerr,
@luckkerr@mastodon.world avatar

@harmash there is also a version of sleep function that accepts duration type.

try await Task.sleep(for: .seconds(3))

https://developer.apple.com/documentation/swift/task/sleep(for:tolerance:clock:)

luckkerr, to random
@luckkerr@mastodon.world avatar

Continuing work on notifications in my Fediverse application . Added color highlighting and small animations that appear when there are unread notifications.

Also seen is a new layout for images that displays whole alt text under them.

luckkerr,
@luckkerr@mastodon.world avatar

Continuing work on notifications in #Pipilo and am wondering. Should the app automatically dismiss push notifications when going to notifications screen in app?

The idea is that if you go there, then we can be sure that you saw the notification. But perhaps some people would like to keep them for later.

#BuildInPublic #MastodonApp

luckkerr,
@luckkerr@mastodon.world avatar

Dismissing or opening a push notification in #Pipilo will automatically update unread state (synchronized with web and other apps that use markers API).

This will remove the need to open notifications to mark them as read when viewing directly from notification center.

#BuildInPublic #MastodonApp

Video demonstrating automatic marking of notifications as read in Pipilo. First the video shows that there are new notifications in the app, then a notification is dismissed and notification markers disappear from the app.

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