MobilePro #141: Accessibility Tests in Compose, Data persistence in Flutter, Custom Utility Types for TypeScript, LLMs don’t remember everything.
Advertise with Us | Sign Up to the Newsletter
Hi!
Welcome to the mobile app development world with _mobilepro! In this edition we cover mobile development community discussions on:
In our relatively new section captures internet jibber-jabber about the mobile ecosystem:
U.S. Clears Way for Antitrust Inquiries of Nvidia, Microsoft and OpenAI
Training is not the same as chatting: ChatGPT and other LLMs don’t remember everything you say
Today's news covers release stories on Apple, Android, and Microsoft . Want to boost your mobile development game? Then don’t miss our tutorial from the book ‘C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition’! And if you are currently developing an iOS app, checkout this week's resources on iOS tools.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!
If you liked this installment in our new series, fill in our survey below and win a free PDF on your Packt account.
Thanks,
Apurva Kadam
Editor-in-Chief, Packt
Mobile App Dev Community Speak
What are Mobile developers discussing? What are the latest tips and tricks? Shortcuts and experiments? Cool tutorials? Releases and updates? Find it all out here.
Accessibility Tests in Compose: Name, Role, Value - When writing tests for your app, you should also consider testing for accessibility-related things. And I get it; it can be challenging to know where to start. So, I decided to write this blogpost about how to test some accessibility aspects. In this post, we will add some accessibility-related tests for three custom components constructed with the help of clickable, selectable, and toggleable modifiers.
How Is End-To-End Testing Different from Regression Testing? - Testers often think that since end-to-end testing is sometimes a part of automated regression testing, it is the same as regression testing. But there are striking differences QA teams need to be clear on when it comes to these particular testing types. In the post, we will take a detailed look at each of them and how they are different from each other.
Data persistence in flutter - When you develop an application, usually, the data used to display information originates from the internet. However, there are scenarios where the data from the internet needs to be stored somewhere on your local device. This can be for functionality purposes or to enhance performance and user experience while using the application. In Flutter itself, there are many libraries designed to store data on the local device. In this article, I will share How to persist data using the best libraries (in my opinion) for storing data locally in Flutter.
React Native: 15 Core Components - One of the key advantages of React Native is its ability to create truly native applications for both iOS and Android using a single codebase. This is achieved through a set of core components provided by the framework, which bridge the gap between web development and native app development. These core components are designed to be flexible and efficient, enabling developers to create a wide variety of mobile applications with a native look and feel. In this detailed overview, we will explore 15 of the most important core components in React Native, highlighting their functionalities, use cases, and examples to master mobile app development with React Native.
Custom Utility Types for TypeScript Projects - In this exploration into TypeScript development, we introduce ten custom utility types that expand the capabilities of your code, providing additional tools for managing types more effectively. These utility types help keep your codebase clean, efficient, and robust.
Mobile App Dev Repos
Check this space for new repos, projects and tools each week! This week we bring you a collection
of iOS tools for Audio.
InteractivePlayerView - Custom iOS music player view.
ESTMusicIndicator - Cool Animated music indicator view written in Swift.
QuietModemKit - iOS framework for the Quiet Modem (data over sound).
SwiftySound - Super simple library that lets you play sounds with a single line of code (and much more). Written in Swift 3, supports iOS, macOS and tvOS. CocoaPods and Carthage compatible.
BPMAnalyser - Fast and simple instrument to get the BPM rate from your audio-files.
PandoraPlayer - A lightweight music player for iOS, based on AudioKit.
SonogramView - Audio visualisation of song.
Internet Jibber-Jabber
Interesting stories and curious musings from the Internet.
Surveilling the Masses with Wi-Fi-Based Positioning Systems - Wi-Fi-based Positioning Systems (WPSes) are used by modern mobile devices to learn their position using nearby Wi-Fi access points as landmarks. In this work, we show that Apple's WPS can be abused to create a privacy threat on a global scale. We present an attack that allows an unprivileged attacker to amass a worldwide snapshot of Wi-Fi BSSID geolocations in only a matter of days. Our attack makes few assumptions, merely exploiting the fact that there are relatively few dense regions of allocated MAC address space. Applying this technique over the course of a year, we learned the precise locations of over 2 billion BSSIDs around the world.
Transformers Can Do Arithmetic with the Right Embeddings - The poor performance of transformers on arithmetic tasks seems to stem in large part from their inability to keep track of the exact position of each digit inside of a large span of digits. We mend this problem by adding an embedding to each digit that encodes its position relative to the start of the number. In addition to the boost these embeddings provide on their own, we show that this fix enables architectural modifications such as input injection and recurrent layers to improve performance even further.
U.S. Clears Way for Antitrust Inquiries of Nvidia, Microsoft and OpenAI - The Justice Department and the Federal Trade Commission agreed to divide responsibility for investigating three major players in the artificial intelligence industry.
How Online Privacy Is Like Fishing - Microsoft recently caught state-backed hackers using its generative AI tools to help with their attacks. In the security community, the immediate questions weren’t about how hackers were using the tools (that was utterly predictable), but about how Microsoft figured it out. The natural conclusion was that Microsoft was spying on its AI users, looking for harmful hackers at work.
Training is not the same as chatting: ChatGPT and other LLMs don’t remember everything you say - A common complaint I see about these tools is that people don’t want to even try them out because they don’t want to contribute to their training data. This is by no means an irrational position to take, but it does often correspond to an incorrect mental model about how these tools work. Short version: ChatGPT and other similar tools do not directly learn from and memorize everything that you say to them.
Mobile App Development Tutorial
Publishing a single-file app
If you can assume that .NET is already installed on the computer on which you want to run your app, then you can use the extra flags when you publish your app for release to say that it does not need to be self-contained and that you want to publish it as a single file (if possible), as shown in the following command (which must be entered on a single line):
dotnet publish -r win10-x64 -c Release --no-self-contained
/p:PublishSingleFile=true
This will generate two files: DotNetEverywhere.exe and DotNetEverywhere.pdb. The .exe file is the executable. The .pdb file is a program debug database file that stores debugging information.
If you prefer the .pdb file to be embedded in the .exe file, for example, to ensure it is deployed with its assembly, then add a <DebugType> element to the <PropertyGroup> element in your .csproj file and set it to embedded, as shown highlighted in the following markup:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RuntimeIdentifiers>
win10-x64;osx-x64;osx.11.0-arm64;linux-x64;linux-arm64
</RuntimeIdentifiers>
<DebugType>embedded</DebugType>
</PropertyGroup>
If you cannot assume that .NET is already installed on a computer, then although Linux also only generates the two files, expect the following additional files for Windows:
coreclr.dll, clrjit.dll, clrcompression.dll, and mscordaccore.dll.
Read C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition now!
What's Happening in Mobile App Dev?
Latest releases, updates, launches and news on mobile app dev!
Apple
WWDC24 - One week to go. Don’t miss the exciting reveal of the latest Apple software and technologies. Keynote kicks off at 10 a.m. PT on June 10. Add to calendar.
Introducing the 2024 Apple Design Award winners - Every year, the Apple Design Awards recognize innovation, ingenuity, and technical achievement in app and game design. The incredible developers behind this year’s finalists have shown what can be possible on Apple platforms — and helped lay the foundation for what’s to come. We’re thrilled to present the winners of the 2024 Apple Design Awards. Meet this year’s winners.
Price and tax updates for apps, In-App Purchases, and subscriptions - The App Store is designed to make it easy to sell your digital goods and services globally, with support for 44 currencies across 175 storefronts. From time to time, we may need to adjust prices or your proceeds due to changes in tax regulations or foreign exchange rates. These adjustments are made using publicly available exchange rate information from financial data providers to help make sure prices for apps and In-App Purchases stay consistent across all storefronts.
Android
Enabling safe AI experiences on Google Play - As the AI landscape evolves, we will continue to update our policies and developer tools to address emerging needs and complexities. This includes introducing new app onboarding capabilities in the future to make the process of submitting a generative AI app to Play even more transparent and streamlined. We’ll also share best practices and resources, like our People + AI Guidebook, to support developers in building innovative and responsible apps that enrich the lives of users worldwide.
Build AI apps leveraging cloud-based Gemini models - To kickstart your Gen AI journey, design the prompts for your use case with Google AI Studio. Once you are satisfied with your prompts, leverage the Gemini API directly into your app to access Google’s latest models such as Gemini 1.5 Pro and 1.5 Flash, both with one million token context windows (with two million available via waitlist for Gemini 1.5 Pro).
Use Gemini Nano for on-device Gen AI - At I/O, we announced that Gemini Nano will be getting multimodal capabilities, enabling devices to understand context beyond text – like sights, sounds, and spoken language. This will help power experiences like Talkback, helping people who are blind or have low vision interact with their devices via touch and spoken feedback. Gemini Nano with Multimodality will be available later this year, starting with Google Pixel devices.
Use Gemini in Android Studio to help you be more productive - At Google I/O, we previewed a number of features available to try in the Android Studio Koala preview release, like natural-language code suggestions and AI-assisted analysis for App Quality Insights. We also shared an early preview of multimodal input using Gemini 1.5 Pro, allowing you to upload images as part of your AI queries — enabling Gemini to help you build fully functional compose UIs from a wireframe sketch.
Android Device Streaming, powered by Firebase, is now in Beta - Android Device Streaming is in beta and is available to all Android developers using Android Studio Jellyfish or later. We’ve also added new devices to the catalog and introduced flexible pricing that provides low-cost access to the latest Android devices. Read below to learn what changes are in this release, as well as common questions around uses, security, and pricing. However, if you want to get started right away and try Android Device Streaming at no cost, see our getting started guide.
Microsoft
Announcing TypeScript 5.5 RC - Microsoft announced the availability of the release candidate of TypeScript 5.5. To get started using the RC, you can get it through NuGet, or through npm with the following command: npminstall -D typescript@rc
Announcing the official OpenAI library for .NET - At Microsoft Build 2024, we announced new investments that expand the AI ecosystem for .NET developers. We’re excited to share more detailed plans around Microsoft’s collaboration with OpenAI on their official .NET library. Today, the OpenAI team released their first beta, version2.0.0-beta.1, of the official OpenAI library for .NET.
And that’s a wrap.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!