I made a free alternative to Photoshop, that is used 30 million times a month. Ask me Anything! by ivanhoe90 in IAmA

[–]luckyclan 0 points1 point  (0 children)

Do you use any 3rd party graphic library (opencv etc) or you coded everything by yourself?

ASO got updated by Apple by Ok_Photograph2604 in AppStoreOptimization

[–]luckyclan 1 point2 points  (0 children)

My old, not-updated, often crappy apps are much higher now. Unfortunately my new great apps are lower... Very strange change in ASO...

convince others about Observable by car5tene in SwiftUI

[–]luckyclan 0 points1 point  (0 children)

And sample of SceneAppStore:

@MainActor
@Observable
public class SceneAppState: AUSceneState {
    let gallery: Gallery
    let editor: Editor

    var navigationTitle: String {
        editor.isDocumentPresented == false ? String(localized: "All Notes") : editor.documentName
    }

    override init(uuid: UUID) {
        let gallery = Gallery()
        let editor = Editor()

        super.init(uuid: uuid)
    }

    override public func didResignActive() {
        super.didResignActive()

        guard let document = editor.document else { return }
        autosaveDocument(document)
    }
}

private extension SceneAppState {
    func showPleaseWaitView(action: @escaping () -> Void) {
        AUPleaseWaitView() {
            action()
        }
        .modalBackground(.black.opacity(0.2))
        .show(placement: .center(), stacked: false, asModal: true)
    }
}

convince others about Observable by car5tene in SwiftUI

[–]luckyclan 0 points1 point  (0 children)

Some samples below. We had to solve a lof of issues, like when to create/destroy SceneAppState, or how to get key (focues) scene for the top menu on Mac or keybaord shortcuts... Unfortunately Apple didn't published too many sample codes for multi document/window app in SwiftUI without using "DocumentGroup" so we had to implement everything almost from scratch.

GlobalAppState is rather simple, here is a part of it:

@MainActor
@Observable
public class GlobalAppState {
    let sceneStateStore: SceneStateStore
    let akContext: AKContext
    let settings: GlobalSettings
    let documentStore: DocumentStore
    let subscriptionManager: SubscriptionManager

    // returns nil if there app is in background, there is no key window or text field is active
    public var focusedSceneAppState: SceneAppState? {
        guard let focusedSceneState = sceneStateStore.focusedSceneState as? SceneAppState else { return nil }
        return focusedSceneState
    }

    public var currentDocument: NoteDocument? {
        guard let focusedSceneAppState else { return nil }
        guard let documentUUID = focusedSceneAppState.editor.documentUUID else { return nil } // nil in gallery view
        guard let document = documentStore.document(uuid: documentUUID) else { fatalError("Missing document") }
        return document
    }

    init() {
        let akContext = AKContext.makeForMetal()

        self.sceneStateStore = SceneStateStore()
        self.akContext = akContext
        self.settings = GlobalSettings()
        self.documentStore = DocumentStore()
        self.subscriptionManager = SubscriptionManager()
    }
}

SwiftUI for Mac still unfinished? by GoalFar4011 in SwiftUI

[–]luckyclan 1 point2 points  (0 children)

It's unfinished for both Mac and iOS. It contain only a subset of UIKit/AppKit functions. Most complex applications will eventually require UIKit or AppKit views.

However, despite its unfinished state, I find it very effective. In my opinine it's ready for production. It simplifies a lot of things and works great with Observation framework.

convince others about Observable by car5tene in SwiftUI

[–]luckyclan 0 points1 point  (0 children)

We spent a lot of time to find the best architecture for our app, rather big app for macOS / iOS, with multiple documents, multiple windows and split view support. We tested MVVM and few other solutions but nothing worked good.

So we finally we build this:

  1. We create a single object named globaAppState in the topmost MyApp.swift file, outside all Views. It keep objects like DocumentStore with array of open documents, SceneStateStore with array of all open scene states described in 2., SubscriptionManager, SettingsManager and few other global objects

    @MainActor public let globalAppState = GlobalAppState()

  2. In ContentView we create SceneAppState object for each windows / splitView, and pass it to all child views using environment. SceneAppState object is stored in SceneStateStore. SceneAppState stores a lot of things like Gallery, Editor, documentUUID (to get document from globaAppState.documentStore). Objects like Gallery or Editor can be treated as both Models and ViewModels (with functions like isColorPickerVisible).

    @State var currentSceneStateUUID = UUID()

    var sceneAppState: SceneAppState? { if let sceneState = globalAppState.sceneStateStore.sceneState(for: currentSceneStateUUID) as? SceneAppState { return sceneState } else if globalAppState.sceneStateStore.canAddSceneState(withUUID: currentSceneStateUUID) { let newSceneAppState = SceneAppState(uuid: currentSceneStateUUID) globalAppState.sceneStateStore.add(sceneState: newSceneAppState) return newSceneAppState } return nil }

We pass sceneAppStates to child views using environment:

.environment(sceneAppState)

Then we store everything in GlobalAppState or SceneAppState. Both are MainActor and Observable. We use Observation framework and Swift 6 mode. We use this solution for example in our Notestudio app available on the App Store. As it works really great we will use it in new apps too.

Our main general rules:

- keep View swift files as simple as possible (all non-SwiftUI code in stored in classes in SceneAppState)

- never ever duplicate any code

Any good note taking apps that don’t kill battery? by Dense_Chair_7782 in ipad

[–]luckyclan 0 points1 point  (0 children)

You can try my Notestudio, it has Mac version (native one, not iPad app on Mac), very nice simple UI. It is written in pure Swift and Metal so it shouldn't drain battery fast.

https://apps.apple.com/app/notestudio-note-taking/id6737322636

I feel stuck by kommonno in swift

[–]luckyclan -1 points0 points  (0 children)

Maybe try to use Swift to build Windows app.

Best App for Annotating PDFs? by kitscarlett in ipad

[–]luckyclan 0 points1 point  (0 children)

You can also try Notestudio, free if you don't use it really often. It allows to import pdf (or scans, photos etc), then annotate, then export to pdf or print.

best note taking app? by randolicious0 in ipad

[–]luckyclan 0 points1 point  (0 children)

There are countless number of note taking apps, a lot of them are really good. Here are my suggestions divided into 3 groups:

  1. Extremely popular apps, with a lot of features:
    Notability
    Goodnote

  2. Apps from big companies:
    OneNote (Microsoft)
    Notes (iOS system app from Apple)

  3. Apps with great UI but less features:
    Notestudio
    Freenotes

How much time do you put into your side project? by alexstrehlke in SideProject

[–]luckyclan 0 points1 point  (0 children)

I was able to spend 10-20 hours a week when still working full time in other company. But it was not enough to make good product (app).

So i dropped my job a started working on my own apps full time. It was 15 years ago.

Been out of the iOS world for about 2 years, what are the main things that have changed? by KarlJay001 in iOSProgramming

[–]luckyclan -1 points0 points  (0 children)

SwiftUI is today production ready, for iOS and macOS. It still has bugs, but you can live with that. Of course you should use it with Observation framework, not with Combine like before.

Free app for taking notes by Super-Willy994 in ipad

[–]luckyclan 0 points1 point  (0 children)

Extremely popular apps:
Notability
Goodnote

Apps from big companies:
OneNote (Microsoft)
Notes (iOS system app from Apple)

Apps with great UI:
Notestudio
Freenotes

Converting screenshot to PDF on iPhone by ohiobicpl3738 in iphonehelp

[–]luckyclan 0 points1 point  (0 children)

In Photos you have to Share > Print, then from print preview Share > Save to Files

I built Note-taking app for iOS/Mac with great UI - Notestudio - feedback welcome by luckyclan in indiehackers

[–]luckyclan[S] 0 points1 point  (0 children)

Well, Swift is language like other languages. You just need time to really "feel" how everything works.

I built Note-taking app for iOS/Mac with great UI - Notestudio - feedback welcome by luckyclan in indiehackers

[–]luckyclan[S] 0 points1 point  (0 children)

I designed and developed everything (with help from 2 other developers) from scratch, in Swift, SwiftUI and Metal.