I Constructed an IOS App in 3 Days with Actually No Prior Swift Data

0
1173
I Constructed an IOS App in 3 Days with Actually No Prior Swift Data


the Brush Tracker app in 3 days with no prior expertise with Swift, the principle programming language for iOS improvement. Though I’ve a totally purposeful app stay on the App Retailer, I nonetheless have little or no Swift information as a result of I used “vibe coding” to develop this app.

On this article, I’ll clarify the method, AI instruments I used, and share a few of my learnings and insights.

Something as Lovable different

I beforehand used Lovable for creating net purposes however it doesn’t appear to be an choice for cell app improvement, not less than for now.

There are options to Lovable for app improvement. I lately got here throughout a software known as Something, and since I’d had such an excellent expertise with Lovable, I made a decision to offer it a attempt to develop my app. At first, it appeared to work nicely, however the total expertise wasn’t as environment friendly as I’d hoped.

The toughest half was not with the ability to take a look at my modifications, fixes, and enhancements straight away. Something does have a built-in UI for testing, however the expertise wasn’t very easy. It additionally directs you to check the code by way of the Expo app, however that didn’t work nicely for me both.

I ought to point out that I didn’t have any prior app improvement expertise. For builders or anybody with some coding background, Something may most likely be a extra productive software than it was for me.

I exported the code from Something and tried to check it on Xcode on my mac however bought many errors and couldn’t get it to working. So I made a decision to make use of another. Cursor appeared to the plain selection.

Cursor

I’ve heard excellent issues about Cursor from many associates who’re actively utilizing it. I needed to offer it a strive myself.

I used the identical immediate in Cursor and requested it to construct the app. Then I created an XCode mission with the folders and recordsdata generated by Cursor. I began the simulator on XCode and it labored on the primary strive.

The purpose of Brush Tracker is that will help you keep constant along with your day by day toothbrushing. It offers you a cleanliness rating that begins at 100%. If you happen to skip a day, the rating drops and your enamel within the app begin to look a bit yellowish to match the cleanliness rating.

Word: All photographs used on this article embody screenshots from my app, Brush Tracker.

The primary model solely had the principle characteristic of the app. I believe that is probably the most environment friendly manner of constructing merchandise with AI-based instruments. Get the primary model up and operating earlier than including options.

To check the app’s core characteristic on the simulator, I needed to change the simulator’s date with out finishing “immediately’s brushing” to verify whether or not the cleanliness rating would drop and the enamel visualizations would replace as anticipated.

Cursor advised to alter the date on the XCode simulator however the simulator doesn’t have the date and time settings anymore. Older variations of XCode simulator had this setting however not anymore.

A workaround answer was to alter the date on my Mac. This fashion, the date on the simulator additionally modified and I used to be in a position to take a look at the characteristic.

One factor I seen was that after I modified the date on my Mac, Cursor didn’t see my account and didn’t work. It bought again to regular after I modified the date again to auto.

Timer characteristic

A built-in brushing timer felt like the nice addition to Brush Tracker. Customers can merely mark a brushing session as executed or use the timer whereas they brush.

It took me just a few tries to get this characteristic working the way in which I imagined. You may simply inform Cursor so as to add a characteristic, however it works significantly better while you tweak the immediate and clarify precisely what you need. When you give clear directions, Cursor often does an ideal job.

Reward characteristic

I needed so as to add an additional motivation when the consumer completes day by day brushings. After finishing the classes, they will faucet “Get Your Each day Reward” and see a brief motivational quote. It’s a small contact however a pleasant reminder for dental well being.

You may really study whereas vibe coding

Cursor not solely writes the code but in addition helps you study. Once I was making an attempt so as to add the reward characteristic, the implementation was not appropriate at first. It wasn’t working correctly.

I described the difficulty to Cursor, and it defined each what should be blamed for the issue and the right way to repair it. Listed here are two examples of how Cursor will help you study alongside the way in which:

The difficulty is that rewardQuote is empty on the primary faucet as a result of handleRewardTap() units it, however the sheet is offered instantly. I want to make sure the quote is about earlier than displaying the sheet.

Mounted the difficulty! The issue was that showReward = true was being set instantly after rewardQuote, however SwiftUI’s sheet presentation can occur earlier than the state replace is totally processed.

Use Cursor extra effectively

Cursor is a good software however there are some methods to make it extra environment friendly.

Let’s assume code fails or it doesn’t execute accurately. If you recognize the problematic half, spotlight that part and add to the chat. It undoubtedly makes it simpler for Cursor to repair drawback.

In Brush Tracker, I used to be having an issue when establishing notifications. I outlined the issue and requested Cursor to repair it. Cursor advised me it was mounted however the issue nonetheless existed. Then, from the code modifications I discovered the place the issue was occurring and added that half to the chat.

Cursor mounted it on the following strive: The issue is that the onTapGesture is utilized to the Picker, however in SwiftUI, segmented pickers don’t at all times reply nicely to faucet gestures as a result of they’ve their very own inner gesture dealing with. The onChange modifier solely triggers when the choice really modifications, not when the identical worth is tapped.

One other factor price mentioning is the “context used” proportion in Cursor. It robotically captures related context out of your codebase, so that you don’t have to inform it which recordsdata to take a look at. However your chat historical past can also be included in that context, and typically it comprises previous issues or irrelevant code.

That additional muddle can improve token utilization or make Cursor much less environment friendly. When the context used proportion will increase, I clear the chat historical past.

Distributing your app within the App Retailer

When you full testing your app utilizing the simulator or a bodily machine (e.g. your personal iPhone), it’s time to distribute your app within the App Retailer in order that others can see (and hopefully use) your app.

It’s not an advanced course of however there are plenty of particulars, which could take lengthy particularly while you’re doing it for the primary time. I discovered a video on YouTube that clearly explains your complete course of step-by-step.

After finishing all of the steps, I submitted my app for assessment. As soon as it was authorised, I bought an electronic mail from App Retailer Join letting me realize it was prepared for distribution.

I’d wish to level out that I don’t have any affiliation with any of the AI instruments talked about on this article.

Thanks for studying! You may try Brush Tracker on the App Retailer. I’d love to listen to from you if you happen to strive it or have any suggestions.