Alternative title: Attempting to Build GitJournal from Source
2024.11.22 - Day 1
I was looking for an app that I could include in a journaling/note taking ecosystem on my iPhone, there were a few requirements:
- Runs on iOS
- Open source, or at the very least freeware without interaction with a server
- Git integration
- Markdown format
Initially, I stumbled upon Working Copy, a markdown note-taking app on the App Store, it was free to install but had some git integrations that were behind a £30 paywall. The app seemed great, and I'm not against paying developers, but I had aims and I wanted to hit them.
It didn't take long after that disappointment to find GitJournal. An Open source markdown note taking app, with full git integration, available on iOS. Perfect.
One hitch, the app is £3.99. I mean, of course, a dev has created an open source project, developed it on many platforms, and had to pay the Apple tax. The yearly £80 fee for your app to be listed on the app store. He has to cover those costs, I get it.
But nevermind, I thought, the app is open source. I'll find the GitHub repo and build it myself, might be a little buggy, but I'll enjoy learning curve. So, that's what I did.
After blindly cloning the repo, downloading Xcode, and finding a YouTube tutorial on how to build an iOS app, I believed I was off to the races. As dependencies installed I put some Jungle music on, cleaned the house, and did some work.
Time passed and things were looking less positive, the YouTube tutorial was long forgotten and I was now googling and ChatGPTing various critical issues and missing dependencies.
At 17:05 I said this:
I might just have it. Building now... had to be a ChatGPT job.
Xcode has definitely crashed, going to reload, give it adequate time to index and do all the stuff it has to do. Ignore all the minor issues raised by the IDE, and build.
I was going into this so blind, just fly swatting. Not actually looking at the root cause of the problems I was having, just dealing with a critical issue at a time. At the same time as this I was being lead astray by ChatGPT, which basically thought the solution for all problems was:
flutter clean
flutter pub get
pod install
In its defence, this usually did solve the problem, but it wasn't necessarily helping. I was handling this all wrong, and I didn't learn my lesson this day or the next.
2024.11.24 - Day 2
I was away over the weekend and banged my head against the wall with this for some time when I got back Sunday evening. No real progress. Let's move on.
2024.11.25 - Day 3
In the early hours I made the wild decision on the basis of ChatGPT advice to disable csrutil
. If you don't know, as I didn't, this is Mac's System Integrity Protection - it stops the execution of unauthorised code. Something you would rather have on unless you know what you're doing. I did not.
Of course turning this off wasn't my golden ticket, so I went to bed. I was due an epiphany.
This was a Monday, but I was off work with some errands to run in the afternoon that called for a long train ride. I packed my laptop to work on GitJournal while I travelled.
While on the train, I had also brought a book (Crime & Punishment) but it was my first time picking it up in some time. I had got a third of the way through about 6 months ago but put it down as other books took my interest. But now starting somewhere in the middle, the characters were unfamiliar, the story didn't make sense, and I wasn't able to get into it. I spoke to my wife about it and she recommended I just restart it. Initially, I hesitated, thinking about the effort I'd put in, but restarting was the only way to truly enjoy the book.
So, coming back to GitJournal and seeing myself in a mess of errors that I didn't really understand, that same advice from my wife rung in my ears.
Naturally I was still hitting issues, I was now able to handle most of the setup myself though, having done it once before. So, it took much less time before I hit another sticking point. This one turns out was just an issue with the git clone I did, some critical files didn't get cloned. Deleted and re-cloned.
And on this re-clone was the biggest realisation and biggest learning point. I decided to look up one of the issues on the GitHub issues, why didn't I think of that before? And there it was the answer to the source of the majority of issues I had been having. The owner of the repo (Vishesh Handa) had created a shell script that was essential to build the iOS version. I had trusted in myself and gone headlong into something I didn't really understand. I could have read a little more of the pre-existing documentation and discussions and given myself such a head start.
2024.11.26 - Day 4
I did nothing with the project at all this day, and for most other projects this would've been it. But this one was different, on this day I decided I would compile my notes and thoughts together about this project into one single note. And, here we are. So, no real progress, but this action did give me a small amount of drive.
Dejected, I began to question whether all this could have even been worth it.
2024.11.28 - Day 5
So, where were we? I had just found the script. Yes.
Upon running the script suddenly all my missing dependancy issues disappeared. Hooray. The application would build successfully. Hooray. I'd open up the application and I'd a white screen... then a crash.
As the evening hours stretched on, I was in the depths of stack overflow desperate for anything to work. At one point along the way I was renaming every folder called "resources" to "_resources" in the project because a comment with 3 upvotes said so. Obviously nothing worked. As has been the same with the whole process, there wasn't a magic bullet. Another red herring popped up as within the podfile, were these lines of code that I hadn't spotted till now:
# Extra stuff to fix the build
# https://stackoverflow.com/questions/69306519/flutter-error-xcodebuild-warning-using-the-first-of-multiple-matching-destina
# Why is ios development so mysterious?
This didn't help either.
So that was it, I'd read every apple developer forum, every iOS based discussion on the GitHub page repo, and every single stack overflow question that even vaguely matched my issue. The end of the line.
So at 23:30 that night I wrote my own question on the GitJournal repo. Fully conscious that the project could be fully dead, and not of even the slightest bit of interest from the dev.
Now we wait.
2024.12.19 - Day 6
And boy, did we wait.
You may feel like I left this gap and came back to write about the response from the dev, but no this is just me coming along to potentially cap off this log. It's not the thrilling end I wanted, but it's life. If it ever changes I will be back to update.
So, what did I learn?
Read the documentation...
- I cannot stress enough how much time I would have saved if I just did the stuff that I thought was a waste of time to start off with
- Even though it didn't get me to the answer I needed, I would have been able to reach my dead end far sooner
Don't be afraid to ask questions
- I initially felt really awkward to participate on the GitHub discussions (having previously previously been a victim of Stack Overflow), but there's no point struggling on your own.
- On this occasion there hasn't been a response, however that's the nature of open source, and maybe one day someone will get back to me.
- Also, chat bots are great, they're really useful tools for some use cases. But, deep into a project with niche issues, asking Chat GPT why you're getting x or y error code is not going to help.
And, if you want it, build it yourself!
How was your first experience trying to participate in the open source community? Do you have the answers I'm looking for, let me know in the comments.
Top comments (0)