Firebase
Billing in Firebase
How does billing work in Firebase - what's the difference between the pricing plans, how can you set up a billing account, how can you switch between plans (both up and down), and how can you keep control of your costs?
Watch this video with my colleague Marina to learn all this - and find out how you can get $300 in free Cloud Billing credits for your Firebase project!
Firebase Dynamic Links: Getting Started
If you didn't have the chance to see Danijela's talk "Improve User Experience With Firebase Dynamic Links" at iOS Conf SG 2023, check out her tutorial on the topic!
Users consume content faster every day and any time they have to spend navigating to your app is time wasted. With deep links, a single URL can send users directly to your app or even to a specific view within your app.
This is a great tutorial that walks you through using Firebase Dynamic Links to create deep links for your apps on iOS.
SwiftUI
SwiftUI Tip: Always correct corner radius for subviews
Do you remember when Twitter decided to start using rounded rectangles for the profile pictures of official accounts? They obviously had some challenges getting the corner radius right (and I think it still doesn't look quite right).
If you want to avoid embarrassing mistakes like this in your own apps, here is Filip with a quick tip to always use the correct corner radius in subviews.
Text modifiers in SwiftUI
You probably know that you can use Markdown in SwiftUI Text
views to format your text in bold, italic, and other basic styles, but what if you want to change the text color?
In this blog post, Natalia walks us through how to use Text modifiers to style specific fragments of text, and why using string interpolation is better than concatenating strings.
If you want to learn more, check out the recording of Natalia's talk "Mysteries of SwiftUI Text View" at iOSDevUK 2022.
BTW, did you know that Natalia was one of the main contributors to the Text
view on the SwiftUI team?
Designing inputs for users... a thread on how to use textfields
This is great thread about improving the UX of input fields. I've covered some of the ideas in this thread in my video series about building re-usable SwiftUI components - feel free to check it out!
Two ways to fix your broken SwiftUI Previews
I wrote about SwiftUI previews a couple of days ago (Previewing Stateful SwiftUI Views), and showed you how you can make your stateful SwiftUI previews interactive.
In this video, Ibrahim Ciss shows us another trick that is useful when working with SwiftUI previews: how to prevent the preview canvas from crashing (spoiler: it all has to do with reducing complexity).
Previews and Package Oriented Programming
If you're interested in diving deeper into the topic of optimising your SwiftUI previews, and learn something about Package Oriented Programming, check out this recording of Daniel's talk at Do iOS in Amsterdam a couple of week ago.
Some great tips for making your software more modular.
AI and ML
Chat with 'people' in an iMessage style conversation using Text Assistant
Jordi released version 1.2 of TextAssistant. This app is not only useful when the ChatGPT servers are overwhelmed - it's also a great way to define prompt templates for conversation modes you regularly use. For example, you can use the following prompt to chat with Craig Federighi:
Pretend like you are Craig Federighi with all his characteristics. Be historically accurate. Use data from biographies. Be honest and truthful. Answer all my questions pretending like you are him and give answers from Craig Federighi’s point of view. Explain your rationale behind your answers.
Keep in mind that you have to use your own API key, so you will be charged for any API calls.
College student claims app can detect essays written by chatbot ChatGPT
I've had quite a few conversations with folks about whether or not it is OK to use ChatGPT and other AI tools to create content, and most of us agreed that - if you use AI generated content - you should be up front about it.
Princeton senior Edward Tian built a tool, GPTZero (available at https://gptzero.me/) that uses a couple of metrics like the perplexity score (how random the text is) to detect if it has been written by a human or an AI.
I've fed some of my own texts and similar, AI-generated texts into the tool, and the results were spot on - GPTZero was able to detect whether a text was written by a person or an AI.
The articles mentions that other users had mixed results.
OpenAI developing software to detect ChatGPT text
"Our policies require that users be up-front with their audience when using our API and creative tools" - but since not everybody plays fair, it's inevitable we will need tools to detect whether a piece of text or art was created using AI.
I am sure OpenAI has been working on this before, but it is certainly interesting to note the temporal connection between this piece of news and the previous article about Edward Tian.
Tools
SimBuddy – Your Simulator’s BFF
How many times have you found yourself adding code like this to your app to figure out where your app stores files on the Simulator so that you can inspect them in Finder?
print(Bundle.main.resourcePath!)
print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.path)
Craig wrote a nifty utility that makes it really simple to navigate to the App Bundle, App Data, Documents, Preferences, and Local Files folders of your app.
If you need a more flexible / poweful tool, check out Sim Genie by Curtis Herbert.
Fun stuff
Escher's "Relativity" in LEGO
M.C. Escher is one of my favourite artists - his mathematically inspired artworks are incredible to look at. Here is a LEGO rendition of his famous Relativity lithograph.
Comment
This week, iOS Conf SG is taking place in Singapore, and it seems everyone is having a great time.
I was particularly heartened by a tweet in which the organisers shared that close to 50% of their speakers are women. More diverse speaker line-ups lead to more diverse ideas being shared, and generally make conferences more compelling for a more diverse audience. Someone mentioned in the comments that the core organising team are more than 50% women, and I wouldn't be surprised if the percentage of women in the audience was higher than the usual average: more diversity drives diversity. I think everybody wins, and look forward to seeing more conferences following this example.
Now, it bears keeping in mind that gender and gender identity aren't the only dimensions of diversity, so there is definitely more work to do for all of us.
If you weren't able to go, don't fret - I've got some great links for you in this issue! One of them is about a topic that Danijela will present at iOS Conf SG this week - so it's almost as if you were there.
When Apple released SwiftUI, everybody was blown away by the rapid turn-around times it gave developers. SwiftUI previews cut short the time between making a change and seeing it on screen - almost instantly. However, as time went by and we all started building more and more complex views and apps with SwiftUI, it seems like SwiftUI previews have gotten slower and more fragile - even on super fast machines. In this issue, I bring you two links in which Daniel and Ibrahim show some strategies for dealing with this, and no - they both don't involve buying an M1 Max (sorry, Vincent!)
As always, feel free to reach out by hitting the reply button, or connecting with me on Twitter!
Peter 🔥