Great! Thanks! Now what?

I’ve spent the last few weeks trying to design/build my own app. But things are sputtering.

I’m building it with only an idea of how it should work, but not with a formal plan, except it incorporates the item list in LootLogger and I want to implement a button like the one that appears in Mandala.

I have just a few things I want it to do, a sense of the screens (and building those out in Main.storyboard).

I returned to the drawing board and wrote a user story. I’ve also tried to create a UML Diagram of everything, based in part on the Object Diagram back on p7 in Ch1.

Still, nothing’s clicking as I had hoped. Planning and designing feels disjointed, the code isn’t meshing, and the app is crashing (which is a bit demoralizing).

What’s the best approach to plan, design, then build an app?

You already have good communication skills. That means you can do it.

So, the first step is to determine if you are ready for it.

To build an app on your own, you need to have strong programming skills, a constant desire to learn more, a fierce determination to read and understand Apple’s documentation, and finally some artistic skills. Everything, else is secondary.

If you can solve the following problem, your are ready!

Problem: Create an app that prints all the prime numbers less than or equal to a given positive integer.

The app has an input text field to enter a positive integer in, an output text field to print the primes in, and a button to start/stop the printing process.

When the start button is pressed, the app starts searching for the prime numbers; whenever it finds one, it prints the number in the output text field.

The title of the start/stop button should alternate between Start and Stop to indicate the states the App is in.

To test your app: enter large numbers, start the search process, and stop it. Do this repeatedly. Is the app responsive at all times?

Have fun :slight_smile:

I’m coming to the conversation late (again), @Caps5150, but I’ve seen a number of your posts and I’ve liked to see you work through projects “out loud.” Also, I came back to the forum after finishing the book to give some suggestions on where to go from here.

As is likely true of many (most?) readers of the book, I’ve developed in other languages, so I’m relying on past expertise to give some advice here.

To answer your questions about where to go from here, and long story short:

  1. Get a Swift book that walks you through the language in depth,
  2. Invest some time (and maybe money) in a no-code app prototyping tool.

Having a good (paper) Swift reference book will help you become more proficient in the language. Having a prototyping tool will allow you to quickly and efficiently test ideas for your app before you write code.

First, I’ll say that I’m glad iOS Programming by BNR was my first Swift book: it gave me a glimpse of everything I wanted to see, include an introduction to Swift programming for accessibility. However, I yearned for deeper explanations. Some of the code seemed like magical incantations: differences in syntax remained cryptic for me. The official Swift documentation is pretty good, but if you feel the need for further structured study, then I’d suggest continuing textbook study while you work on app development.

For your next read I’d suggest either or both of these two books:

  • iOS for Masterminds (4th ed.) by Gauchat
  • iOS 14 Programming Fundamentals with Swift by Neuburg

The Gauchat book is two years old and occasionally you’ll stumble across functions that have been deprecated since Swift 4, BUT the author presents individual topics in a way that builds efficiently toward a greater understanding of the language. The sterling reviews on Amazon are well deserved. Each example that Gauchat prompts you to type out in a Playground is simple, but adds bit by bit to your understanding of some key topic: the many ways in which you can use switch blocks and case statements; step-by-step explanations of the various syntax for closures; and so on. $10 for the Kindle version is well worth it. Just this year Gauchat published a book on SwiftUI that I may consider in a few months.

The Neuburg book also gets great reviews on Amazon. His writing style may not be to everyone’s taste, but from what I’ve read so far it’s one of those O’Reilly books that you’ll treasure. He has a follow-up “Deep Dive” book I plan to get next.

Kudos to you on writing a user story and writing UML! I would suggest that you take an additional step and separate the app design from the app implementation: use a wireframing or prototyping app. Your user will encounter your interface first, so I suggest that you focus on interactions first.

For a comparison of prototyping tools, this is the best page I’ve found to date:

I use ProtoPie because it provides not only visual design tools, but also access to the haptic motor, accelerometers, etc.

I’m sure a lot of us can empathize with the feeling that an app isn’t clicking. Frankly that’s part of programming life, but I think it can often reveal one or more of the following:

  • You may not be as enthusiastic about the new project as you’d like to be. Is it practice for the sake of practice, or something you really want to build?
  • You may feel too rushed. For whatever reason, I felt the need to barrel through the BNR book at a fast pace. The Gauchat book can help you slow down. There’s a lot to learn, but you CAN learn it. You’ve powered through some tough problems already.
  • You may not have a clear picture of the problem you’re trying to solve. By “problem” I mean not a problem as in homework, but a problem as in some user need. Do you or someone else actually want the thing you’re developing? Is it a step along the way to some grander plans?
  • You may be trying too much. Start simple. Do what you can to work on one part of the app at a time: just the user story; just the design; just the key interactions (using a prototyping tool); just the segues; just the main interaction; just the colors & fonts; and so on.

Finally, if you’re not using the source control built into XCode, even for practice projects, then I recommend it. Source control saved me a lot of trouble when I coded myself into a corner working through the BNR book.

You may well have moved on from this post in the past month and a half, but maybe this message will be of use to someone some day. Thanks for all of your posts!

2 Likes

@Rethunk Thanks for the reply and apologies for not spotting it sooner.

I’m one of those programming language dabblers – the type who took a few programming classes in college, looks at code occasionally during the 9-5 (in languages I’m not a fan of), starts > stops > starts learning programming independently, and jumps around to different languages without finding something that sticks. (e.g. - it may get to a point where I jump ship to try to tackle…Clojure or Rust?)

I did build a small app in C# once, but that’s way behind me now.

So I still come in with very little experience.

I’ve gone back to BND’s Swift Book with its latest edition, and am still struggling with most of the exercise. I also can only devote limited amounts time each day to try to learn this. And based on your book recommendations (do you recommend Gauchat’s SwiftUI book, btw?), there won’t be an easy way to 4-Hour-Chef this.

Finally, my hardware is getting older. I have to Quit and re-launch Xcode a few times while I go through the book just to get Playground to run my programs right. Ditto for rendering SwiftUI (I tried Apple’s Sample Project). So that adds to my frustrations over the platform.

Given that everything’s trending towards SwiftUI, I’m going to finish the Swift book then try to use SwiftUI.

Then (finally?) I can try to build the app I originally had in mind?

Last question: How did you overcome your frustrations with being stuck? And how did you break through to level up?