Clarity Wallpaper for Mac
p/clarity-wallpaper-for-mac
Discover minimal Mac wallpapers
ZACK GUO

MechMath — A good-looking, easy to use calculator APP for iPhone&iPad

1
Since the iPad doesn't come with a calculator APP, and I couldn't find a good-looking one in the App Store, I decided to build my own. I had no programming experience and spent a few months learning to use SwiftUI to make this APP. I hope you like it.
Replies
Best
ZACK GUO
Maker
📌
# 2023年4月8日 Why use a calculator in 2023? The first reason is that there has never been a built-in calculator on the iPad, and the third-party calculators I downloaded from the Apple Store are basically ugly, and I am very picky. I would rather die if I don’t look good, so I want to develop one myself. The second reason is that I naively thought that the calculator was very simple. As the first hand-practicing work, the difficulty should be very suitable. I like Apple's products. Many years ago, I imagined how great it would be if I could program and turn the ideas in my head into iOS Apps.But my programming knowledge is limited to writing web pages with HTML and CSS. About the learning process I am used to learning things by watching video tutorials, and I follow the tutorials a lot to make cases, and gradually I have a feeling that I know what is going on in all aspects of making an APP. I think YouTube is the best online education tool, there are almost no tutorials you can't find (now that AI comes out is another story). I also bought some paid video lessons and e-books from foreign masters or websites, such as Kodeco and AppCoda, but I actually read very few of them. I mainly watch YouTube tutorials because they are more targeted. I have done many small projects with Youtubers, such as Todo application, map application, tip calculation application, guessing the flag game and so on. I think the best iOS development tutorial blogger on YouTube is "Swiftful Thinking". About the development process Many people use UIkit to develop iOS applications, but I use the newer SwiftUI framework. The first reason: I am the kind of person who does not hesitate to update the new system as soon as it comes out, and then searches for "how to roll back the old system" because of a bunch of bugs. I just want to use the new one. Second reason: I found UIKit too difficult to learn. SwiftUI is much simpler. The two are like the difference between a SLR and a mobile phone camera. The first difficulty encountered in development is not SwiftUI, but the logic of the calculator. Originally, I wanted to make a calculator that could show all the calculation steps, and perform operations according to multiplication, division, and subtraction. After a week of trying, it turned out to be much harder than I thought. I watched many tutorials, but the app I followed had bugs. Almost all of them are semi-finished products. After testing a bunch of questions casually, none of them are completely usable, so I am puzzled. Is the calculator so difficult? Later, I settled for the next best thing and redesigned the current version with a slightly simpler function. It took a few days to finally write the entire calculation logic. In the process of writing, I found out that the logic of the small calculator is actually quite complicated. The main reason is to consider how to deal with all the problems correctly when the user does not play cards according to common sense. . Actually for someone like me, functionality isn't even the most important thing. I will regard appearance, details, feelings, etc. as equally important. Sometimes I feel like it's a blessing and a curse, does it really matter that so much time is wasted where most people don't even care? I don't know either. But what I know is that writing the calculation logic is just the beginning. If I don’t add beautiful keyboard themes, choose a few realistic sound effects of green and red switches, and find a few brilliant custom fonts, I will feeling bad. About in-app purchase The main reason why I decided to add an in-app purchase function to this APP is to challenge myself. I guessed that the in-app purchase might be the most difficult to write, and it turned out to be the case. What I think is that if you can write it, you can buy it in the app, and if you can’t write it, you can release it as a free application. I checked how to implement in-app purchases. There are Apple's own StoreKit framework and the third-party RevenueCat framework. I joined an instant iOS learning group, and the great gods in it told me that if there is only a one-time buyout, it is enough to use StoreKit, and then use RevenueCat for complex subscriptions. It’s another bunch of tutorials to read through, and finally refer to Apple’s official sample code, modify and write it. In my heart, I am actually very clueless, because I can't understand many in-app purchase codes. I remember a saying "Don't write code you can't understand", hey, ashamed. Another reason for guilty conscience is that in-app purchases are only implemented on the simulator, and there is no test in reality. Because the TestFlight I submitted has been unable to be installed, and it prompts "The requested APP is unavailable or does not exist". Searching, asking people for advice, and asking Apple officials have not been resolved. Everyone said that they have never encountered this problem. I think programming is really unfriendly to novices, and it must make sure that novices encounter problems that 10,000 people will not encounter. I submitted the review directly, but I didn't expect the review of the in-app purchase part to pass. But something went wrong with the review of the app itself. First of all, I checked that the APP is designed for children, but the calculator is not, so I called back to modify it. I thought there was a question about whether it was suitable for children to use. If you don't check it, you will be banned by eighteen. After two days of modification, I was called back, saying that I added the label "iPad calculator" when filling in the APP information, which would make users mistakenly think that this is Apple's official software. I changed it, there is no other choice. It took another two days to review, and then it passed, and there were no problems in the code and function parts, which is really surprising. After the APP was launched yesterday, I was very excited for about an hour, and soon calmed down, even a little sad. This made me very depressed, and I calmly thought about the reason. Because in this development process, I found that programming is always a very difficult thing for me. Sometimes a problem can be stuck for a day, and even a day can't be solved. I didn't dare to ask too many questions in the group, because I was afraid of annoying people if I asked too much. I found that time passed very quickly when I was programming. As soon as I sat down early in the morning, it was dark when I got up again, just like time travel. This sense of time-consuming, difficult, everyday frustration is something I rarely experience in other things. Even after the APP is put on the shelves, I don’t think I’m a programmer now. I just watched some tutorials and followed some previous experience and methods, and it’s an inevitable result. I still don’t know anything about the essence of programming. . And why can I persist? I just like it, I think creation is cool, and creating products with code is the coolest creation of all. This is also the reason why I am sad. One of the things I like so much happens to be something I am not good at. It's like an unrequited love, I don't know how long it can last. Anyway, I know that this little broken APP is very common to people, especially at this moment when AI is hot, it is not only out of place, but also like a joke. But for myself, what I fulfilled was a wish that had been delayed for many years, so let’s make a summary after thinking about it. I believe that many people may also want to learn programming, or are already on the way to learn, I hope this record can also give you a little help. I hope that friends who need it can download it and try it. If you like it, please leave a rating, thank you~