Skip to main content

Mobile Development Collective

Questions

Browse questions with relevant Mobile Development tags

2,303 questions

Has recommended answer
0 votes
1 answer
27 views

Testing library for 16kb page size

As native libraries soon need to support 16KB page size I would like to test existing .so libraries. According to the Google documentation this can be done using atest: You can run atest ...
Robert's user avatar
  • 43k
Answer

Another Google documentation mentions a script named check_elf_alignment.sh which checks all libraries contained in a APK file. However this script only runs on Linux and MacOS. However the ...

View answer
Robert's user avatar
  • 43k
0 votes
1 answer
27 views

Apk sign with both v1 and v2 schema

I am having problem to sign my apk with both v1 and v2 version but in the dialog box of generating signed apk, in no step I get the checkboxes foe choosing version1 or version 2 schema. I am using ...
Christoforos's user avatar
Answer

The APK signature v2 was introduced with Android 7 (API 24). Your project defines minSdk 25 (Andorid 7.1) thus it will never run on platforms that doesn't support APK signature v2. Therefore APK ...

View answer
Robert's user avatar
  • 43k
1 vote
1 answer
70 views

iOS custom Operation for Operation Queue gives warning Class must restate inherited '@unchecked Sendable' conformance

I am using Xcode 16.2. I have the below Operation: import Foundation import UIKit typealias ParsingCompletionHandler = ((ParsedRecord) -> ()) class RecordParseOperation: Operation {//THIS GIVES ...
sudoExclamationExclamation's user avatar
Answer Accepted

You can do what it suggests, namely add @unchecked Sendable conformance. But when you do that, you are entering a contract ensures that you will implement thread-safe access to any mutable state. In ...

View answer
Rob's user avatar
  • 439k
0 votes
1 answer
60 views

How to wait until async function finish the job and then call it again from non async method?

The case: class ApplicationDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { private let cloudAssistant = CloudAssistant.shared // MARK: - ...
Bartłomiej Semańczyk's user avatar
Answer Accepted

There are a variety of approaches: Await prior task: @MainActor class CloudAssistant: ObservableObject { static let shared = CloudAssistant() private var previousTask: Task<Void, Error>...

View answer
Rob's user avatar
  • 439k
1 vote
1 answer
25 views

AAC from HLS TS causes clicks when decoded to PCM per segment

I'm working on a custom HLS audio player for iOS. Each .ts segment contains AAC audio. I extract AAC from each TS file, decode it to PCM (using FFmpegKit), and schedule it using AVAudioEngine. ❗ ...
TaeHyeong Kim's user avatar
Answer

But when decoding each TS independently, the result is discontinuous and causes audible artifacts. This is your problem right here: the AAC TS segments are NOT independent. To decode segment N you ...

View answer
Gordon Childs's user avatar
1 vote
1 answer
52 views

Getting a list of other apps that can send notifications in Kotlin

Back story I have, thanks to the help of a certain blogpost, some code to retrieve a list of user-installed (i.e. non-system) apps on the user's device: class NotificationPermissionHelper(private val ...
Mike Warren's user avatar
  • 3,894
Answer Accepted

return onGetOp()(appOpsManager, "android:post_notification", android.os.Process.myUid(), packageName, ) According to the documentation, your ...

View answer
CommonsWare's user avatar
0 votes
2 answers
57 views

Anonymous account is overwritten by email and password account

I have this Cloud Function: exports.addUser = functions.auth.user().onCreate(async (user) => { const {uid, email} = user; const userRecord = { createdAt: admin.firestore.FieldValue....
Always Learner's user avatar
Answer

From the Firebase documentation on Authentication triggers for account creation: Firebase accounts will trigger user creation events for Cloud Functions when: A user creates an email account and ...

View answer
Frank van Puffelen's user avatar
1 vote
1 answer
51 views

Can Android OS kill the Main Activity?

I have read that Android OS can kill any activity which is not currently displayed on the screen. This implies that the OS can kill the main activity without ending the program. This makes no sense ...
Shaun Ross's user avatar
Answer

I have read that Android OS can kill any activity which is not currently displayed on the screen. This is a common misconception, stemming from some poorly written documentation, back in the day. ...

View answer
CommonsWare's user avatar
1 vote
1 answer
74 views

Frida: How to send byte[] array from JavaScript to Python

I have a Frida JS script inside a Python session, and I'm trying to pass an array of bytes (from a Bitmap image) from the JavaScript environment back to the Python environment. Here is my attempt: ...
Jugdish's user avatar
  • 382
Answer Accepted

Frida provides out of the box only methods for sending native byte arrays, thus raw data stored in ArrayBuffer or data at a certain NativePointer. Sending Java byte arrays in an efficient way requires ...

View answer
Robert's user avatar
  • 43k
-1 votes
1 answer
37 views

sending consumption request for free trial not working

I am making the following curl request A user signed up for a free trial in my app and when the free trial ended and they got charged, they requested a refund. So I sent apple a consumption ...
Chris Hansen's user avatar
  • 8,755
Answer

202 - Accepted is the success response from the send consumption information endpoint If you received a 202 then your transaction was accepted for processing by Apple. If Apple is sending further ...

View answer
Paulw11's user avatar
  • 115k
0 votes
1 answer
64 views

TabView and key press in SwiftUI on iPad

I want to use key presses to navigate between pages in a SwiftUI app. However, when I start the app and press e.g., right arrow, something interesting happens. Instead of calling the onKeyPress ...
Samuel Cederlund's user avatar
Answer

onKeyPress can only handle key presses when the view it is applied to has focus. Initially, the tab view does not have focus. When you press the arrow keys for the first time, you are actually setting ...

View answer
Sweeper's user avatar
  • 280k
1 vote
2 answers
48 views

MAUI: Android: Foreground service is not running

I have integrated foreground service like below in my MAUI application. MyForegroundService.cs under Platforms.Android // MyForegroundService.cs using Android.App; using Android.Content; using Android....
Matthew Pans's user avatar
Answer

startForegound in the service should be called in onStartCommand not onCreate. Not sue if this is your entire problem, but its not valid to call startForeground before actually being started.

View answer
Gabe Sechan's user avatar
  • 94.1k
0 votes
1 answer
51 views

Can't import MPAndroidChart libraries into Activity declaring in TOML and build.gradle (app)

I'm in Sdk 35. I've declared MPAndroidChart in my Android project: in TOML as mpandroidchart = "3.1.0" and mpandroidchart = { group = "com.github.PhilJay", name = "...
Zel's user avatar
  • 3
Answer Accepted

settings.gradle and settings.gradle.kts have the same role but have different syntax. settings.gradle is in Groovy, while settings.gradle.kts is in Kotlin. Groovy supports a wide range of string ...

View answer
CommonsWare's user avatar
0 votes
2 answers
52 views

Severe and Minor Location Fluctuations Using FusedLocationProviderClient in 24/7 Java Android Device (Mining Environment)

I am working on an Android Java app that runs 24/7 on regular Android devices deployed in a mining environment. The devices are rebooted once a week but otherwise stay running continuously. I am ...
Nitesh Singh's user avatar
Answer

You wont be able to stop the fluctuations as there are a number of different factors that can cause disruptions. Being in as you say a low network area means its probably going to be relying ...

View answer
tyczj's user avatar
  • 74.2k
2 votes
1 answer
41 views

Why is `ObjectIdentifier` of 2 different `__SwiftValue` the same in Swift?

I have this Swift struct: struct Foo { let i: Int } let f1 = Foo(i: 1) let f2 = Foo(i: 2) Then in LLDB, I cast them to __SwiftValue and print out: p (f1 as AnyObject) (__SwiftValue) ...
HL666's user avatar
  • 157
Answer Accepted

The documentation says: This unique identifier is only valid for comparisons during the lifetime of the instance. In the expression: ObjectIdentifier(f1 as AnyObject) == ObjectIdentifier(f2 as ...

View answer
Sweeper's user avatar
  • 280k
1 vote
1 answer
65 views

How to detect which app shared a file to my mobile app? (Android / iOS)

I'm developing a mobile application using .NET MAUI(ShareExtensions are native coded). In this app, users can share files to it from other apps like WhatsApp, Photos, Files, etc. I would like to ...
Alpay Çalışır's user avatar
Answer

There is no way to do this on Android. It's not part of the data passed in when an intent is launched (and all sharing does is launch an intent).

View answer
Gabe Sechan's user avatar
  • 94.1k
0 votes
2 answers
86 views

DatePicker not opening in iOS 18

I have a text element which displays date selected from Date Picker. When tapped on the text, app opens date picker over all the other elements in the view. This logic was working perfectly until iOS ...
tech_human's user avatar
  • 7,154
Answer

You should disable hit-testing on the Text, before you add the overlay. Text(viewModel.displayDate).font(.body).foregroundStyle(Color.blue) .allowsHitTesting(false) // <----- .overlay { ...

View answer
Sweeper's user avatar
  • 280k
0 votes
1 answer
42 views

iOS: Camera screen is black on OS version 18.3 and above not able to capture the image

I have been using camera API for an iOS application which launches the camera and captures the image. So user of my app has reported the issue that they are not able to capture the images sometimes ...
user_8275's user avatar
  • 289
Answer

The issue is that your AVCaptureDevice default method is probably returning nil for some devices. Note that not every iPhone has a built-in wide-angle camera. If you want to make sure it will not ...

View answer
Leo Dabus's user avatar
  • 237k
0 votes
2 answers
160 views

Why SwiftUI redraws the body of my custom View since nothing related to it changes?

Here is an example: struct DemoApp: View { @State var viewModel = DemoAppViewModel() var body: some View { VStack { DemoMonthView(date: viewModel.monthDate) ...
Bartłomiej Semańczyk's user avatar
Answer Accepted

In general, you can conform the view to Equatable to prevent unwanted body calls. If you only want body to be called when date changes, so you can write extension DemoMonthView: Equatable { static ...

View answer
Sweeper's user avatar
  • 280k
-1 votes
1 answer
52 views

Getting null values in Retrofit API response despite correct data class and endpoint

I'm working on an Android app using Retrofit and trying to fetch personal info from a WordPress-based API endpoint (wp-admin/admin-ajax.php). Even though the request is successful, the response body ...
Aurangzaib Buzdar's user avatar
Answer

I don't know if you are using any serializable, but in case you are not maybe that's the problem. Follow these steps : plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' ...

View answer
Skizo-ozᴉʞS ツ's user avatar
-3 votes
3 answers
149 views

Drawing multiple gradients and inner shadow in SwiftUI

How can I create the metallic rim gradient as well as inner shadow as seen in the image below? Here's my code: import SwiftUI struct GradientDishView: View { private let containerSize: CGFloat = ...
batman's user avatar
  • 2,458
Answer

Here is a slight modification of Benzy Neez's SteelRing. Instead of using an inner shadow, the shadow can be built into SteelRing directly using a drop shadow when stroking the border of the circle. ...

View answer
Sweeper's user avatar
  • 280k
1 vote
1 answer
39 views

Android ContentProvider returns null cursor when accessed from second app but works within provider app

Communication Between Two Android Apps Using ContentProvider Not Working Problem Statement I'm trying to share data between two separate Android applications using a ContentProvider. App A provides ...
danimadmolil's user avatar
Answer Accepted

To connect to a non-system ContentProvider, such as one provided by another app of yours, it appears that you need to add a <queries> element to the client app's manifest, identifying the app ...

View answer
CommonsWare's user avatar
1 vote
2 answers
89 views

URLSession GET request returns 403 in iOS app, but works in Postman with the same token

I'm building a chat app in Swift using URLSession. I have an authenticated GET request to fetch the current user's friends list. The request works perfectly in Postman using the same token and URL, ...
GiangHoGoVap's user avatar
Answer Accepted

By using Instruments.app, I found that the response status code to the request is actually 307 - a redirect. URLSession follows the redirect by sending a new request, without the authorisation header, ...

View answer
Sweeper's user avatar
  • 280k
0 votes
2 answers
58 views

Error: #if available(iOS 13, *) Expected ',' separator in Swift

I am encountering the following error when trying to compile my iOS project for Swift 5.0: #if available(iOS 13, *) Expected ',' separator The error occurs when using the @available attribute for ...
Jeeva S K's user avatar
Answer

#if available doesn't make sense. Availability checks are at runtime, to conditionally run code. On the other hand, #if is a compile time check, to conditionally compile code. import declarations are ...

View answer
Sweeper's user avatar
  • 280k
0 votes
2 answers
67 views

Android - How to accurately store the date & time(server time not system) when posting data to firestore

I am currently developing a chat app, and whenever I store data to Firestore, using the FieldValue.serverTimestamp() the date timestamp is saved to the database under the dateCreated field. The only ...
Me Compu's user avatar
Answer

The Firestore Timestamp is always set on the Firebase servers and is independent of any time set on the user's device. So there is no connection between them. If you want to be sure, you can set a ...

View answer
Alex Mamo's user avatar
  • 139k
0 votes
1 answer
70 views

How to search document by partial text of map/array value in Firebase?

Currently I use this approach for searching users in firebase: I'll find a user if search by part of the word in the name. For example: search "us" will return "User6 Name12" ...
Exicode's user avatar
  • 87
Answer Accepted

The current document in the first screenshot only contains substrings from the start of each word, so that's all you can search on. You'll need to populate the array with an exhaustive list of items ...

View answer
Frank van Puffelen's user avatar
2 votes
1 answer
59 views

Flutter, How to hide keyboard when screen recording using screen_protector package

Recently I implemented the screen_protector package in my app. It works, except that the keyboard is showing on recording result. How can I fix this? Or is it cannot be solved since I google it turns ...
NaNoTek's user avatar
  • 23
Answer Accepted

Using a random package found on the internet that hasn't been updated in 2+ years (like this package) is rarely a good idea. If something isn't a commonly used, well known, and frequently maintained ...

View answer
Gabe Sechan's user avatar
  • 94.1k
4 votes
2 answers
205 views

Executing a side-effect without an appropriate handler: What's are possible consequences?

Within a composable: I print a message to the terminal, using 'SideEffect'. SideEffect { println("SideEffect -> ${System.currentTimeMillis()}") } The result is: SideEffect -> ...
mewi's user avatar
  • 633
Answer Accepted

SideEffect is used in composable like Slider or TextField to update value only if a recomposition is successful. And also useful for logging recompositions, especially before before layout inspector ...

View answer
Thracian's user avatar
  • 68.3k
-1 votes
2 answers
28 views

Different dimension files based on xdpi

I created an app designed for a specific device. But now they have created a new version of this device with a slightly different screen. It has the same amount of pixels: 752x1280 and a densityDpi of ...
Eric de Haan's user avatar
Answer

How can I create a dimens.xml file in a folder structure so the correct file is read on both devices? Sorry, but that is not an option. You cannot have separate resource sets based on X and Y axis ...

View answer
CommonsWare's user avatar
1 vote
1 answer
28 views

How do you properly use CoreAudio Render Callbacks in Swift

I've recently got interested in generated audio again, but I'm having a bit of trouble. I've been following this tutorial, and converting it into Swift: https://gist.github.com/gcatlin/...
Ash's user avatar
  • 9,403
Answer Accepted

You told the remote IO audio unit that you were going to give it integer data: streamFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked But then you gave it float data, ...

View answer
Gordon Childs's user avatar
0 votes
1 answer
41 views

How to apply Content ViewController background to bottom SafeArea in UINavigationController?

While porting my existing UIKit based app to SwiftUI I struggle with a simple task: A UIViewControllerRepresentable holds a UINavigationController. The UINavigationController displays VCs with ...
Andrei Herford's user avatar
Answer Accepted

You should have the SomeSheetContent ignore safe areas at the use site. For example: .sheet(isPresented: $isPresented) SomeSheetContent() .ignoresSafeArea() }

View answer
Sweeper's user avatar
  • 280k
0 votes
1 answer
85 views

How to convert async function/method to publisher in Swift 6

I tried to make as simple example as possible using Swift 6 to produce this problem which I am having difficulty to solve: func getValue() async -> Int { 0 } func getValuePublisher() -> ...
Matic Oblak's user avatar
  • 16.8k
Answer Accepted

In terms of general description of the error, see the Swift user documentation. The general idea to avoid this sort of error is to make sure the Task is isolated to the same actor that this function ...

View answer
Rob's user avatar
  • 439k
0 votes
2 answers
47 views

Jetpack Compose Testing: Check that Software Keyboard appears/disappears

In my application there is a button that, in addition to something else, hides the software keyboard. How do I test such a requirement (that software keyboard is closed/hidden/invisible rather than ...
18446744073709551615's user avatar
Answer

There is no built in API to check if the soft keyboard is shown. There are various hacks people try, which may or may not work depending on the keyboard used, the device used, and the version of ...

View answer
Gabe Sechan's user avatar
  • 94.1k
0 votes
1 answer
52 views

kotlin.test.BeforeTest is not resolved

After updating Android libraries (including Kotlin) I found that @BeforeTest became unresolved (@Before is resolved, it belongs to org.junit). import org.junit.Before import org.junit.Test import org....
CoolMind's user avatar
  • 29k
Answer

Looking at Kotlin Multiplatform Gradle unit test not resolving kotlin.test reference I found that we should add this library: implementation("org.jetbrains.kotlin:kotlin-test-junit")

View answer
CoolMind's user avatar
  • 29k
1 vote
1 answer
52 views

kotlin sharedPreferences

In my old java app I had a dropdown from the action bar which presented a choice of adjusting the font size and the font type. This used the PreferenceFragment which has long been deprecated. I am ...
MunterMan's user avatar
  • 100
Answer Accepted

The package android.preference is deprecated in favor of androidx.preference which you can get by including this package in your gradle file implementation "androidx.preference:preference-ktx:1....

View answer
tyczj's user avatar
  • 74.2k
0 votes
1 answer
37 views

When I use navigation-compose to navigate to the second page, the first page disappears directly

I'm learning to use navigation-compose, which is a login page feature. But I encountered a problem in the process of using it, I hope you can help me. There is a flickering when the page switches, ...
漂亮大男孩's user avatar
Answer

The default exitTransition is fadeOut. If you want it to instead stay completely stationary as the second page runs your enterTransition, you need to explicitly set it to KeepUntilTransitionsFinished: ...

View answer
ianhanniballake's user avatar
1 vote
1 answer
46 views

Divider() Function Crossed Out using Android Studio

I am trying to make a todo list app using Android Studio and Kotlin. The divider() for some reason has a strike through on my compiler. Any solutions on that at all? I am having problems with getting ...
user avatar
Answer Accepted

The divider() for some reason has a strike through on my compiler. That means the function is marked with the @Deprecated annotation. The documentation for Divider() points out that it is deprecated, ...

View answer
CommonsWare's user avatar
0 votes
1 answer
30 views

Flutter - iOS API Misuse <CBCentralManager: 0x30032d2c0>

I've a Flutter app built using flutter_blue_plus, this works just fine on android but when I try to run it on iOS it gives an issue when I try to initiate a BLE scan. The log stream for the same being-...
Yolo-cell-hash's user avatar
Answer

It is a warning that won't necessarily affect the operation of your app. Exactly as the message says, the CBCentralManagerDelegate in flutter_blue_plus implements the willRestoreState method, but the ...

View answer
Paulw11's user avatar
  • 115k
1 vote
1 answer
56 views

SwiftUI ColorScheme changes when app is backgrounded

I have a basic project reading the environment variable for ColorScheme, what i noticed is given my app is in light mode, when I background the app, the color scheme always switches between dark and ...
Wy th's user avatar
  • 85
Answer Accepted

This is correct and is by design. When your app moves to the background, iOS needs to save a screen image for use in the app switcher. Since the device may switch between light/dark mode while your ...

View answer
Paulw11's user avatar
  • 115k
1 vote
2 answers
47 views

Android GrantPermissionsViewModel reports Package (mypackage) not found

I'm trying to ask for a permission (bluetooth, but I don't think the exact permission is relevant) in an Android app and the underlying GrantPermissionsViewModel is logging a "Package (my package ...
PhotoKevin's user avatar
Answer

<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> These are the permissions ...

View answer
CommonsWare's user avatar
1 vote
1 answer
47 views

Is there a way to read the ble-physical-connection mode in the iOS API?

Essentially I'm looking for something similar to android's BluetoothGatt.ReadPhy(). I had a look at Apple's docs but there doesn't seem to be anything there: https://developer.apple.com/documentation/...
XDS's user avatar
  • 4,234
Answer Accepted

There is no information available to apps on iOS regarding the Phy that has been negotiated with the peripheral.

View answer
Paulw11's user avatar
  • 115k
0 votes
2 answers
69 views

Animate a height and width change separately in a SwiftUI view

I'm trying to animate the height and widths of a view with different animation durations, but it just chooses one animation duration. How is this done, given an initial width and height, and final ...
AntcDev's user avatar
  • 89
Answer

You should use the animation modifier that take a body closure. This is how you separate animations into different "domains". Rather than animating a value change, it only animates the ...

View answer
Sweeper's user avatar
  • 280k
0 votes
3 answers
97 views

Custom SwiftUI container view using UIViewRepresentable - How to do it correctly?

The SwiftUI ScrollView lacks some features I need, so I used UIViewRepresentable to create a custom container based on UIScrollView. I found different tutorials showing how to create custom container ...
Andrei Herford's user avatar
Answer Accepted

It's not that ContainerViewB "blocks bindings". @Bindings do work here. The @States are indeed being updated. This can be shown using the following code: VStack { ContainerViewB { ...

View answer
Sweeper's user avatar
  • 280k
0 votes
1 answer
50 views

Is there a way in Flutter to detect which part of a Widget was pressed?

Is there a way in Flutter to detect which side of a button is pressed? For example, in the attached image, is it possible to tell when the '5' button is pressed whether the user pressed their finger ...
daniel's user avatar
  • 23
Answer Accepted

The idiomatic way to do this in Flutter is to break down the top-level widget into subwidgets, in your case one for each element in the screenshot. Then you can handle the onTap for each of these ...

View answer
Frank van Puffelen's user avatar
2 votes
1 answer
62 views

App Store Version Check Behave Differently on Different Devices

I have implemented a version checker in my iOS app that fetches the latest app version from Apple's App Store API. If the installed version is outdated, it displays an alert prompting the user to ...
user28016601's user avatar
Answer

If we look at the notes for libraries that offer such capabilities, they note this delay that you discuss. For example, Siren offers Words of Caution: Occasionally, the iTunes JSON will update faster ...

View answer
Rob's user avatar
  • 439k
0 votes
1 answer
62 views

How to render images @2x and @3x from a URL in a SwiftUI Image

I have requirement to load an advertisement image in my app and these are usually logos of companies. The thing about logos is that while they can be of a specific height, their width would change. So ...
Shawn Frank's user avatar
  • 5,243
Answer Accepted

You should create the UIImage using init(data:scale:). This initialiser allows you to specify the scale and it will be scaled accordingly when it is displayed. Alternatively, create a CGDataProvider ...

View answer
Sweeper's user avatar
  • 280k
0 votes
1 answer
56 views

How to Bind to property within @Observable from within @Observable using SwiftUI?

I am not sure if it is a good concept, but let's start from it here. I have a simple View: struct InAppPurchaseView: View { private let viewModel = InAppPurchaseViewModel() var body: some View ...
Bartłomiej Semańczyk's user avatar
Answer Accepted

@Observables track changes using the getters/setters of its properties (the @Observable macro inserts some code into the getters/setters to do this tracking). As long as a getter/setter is called ...

View answer
Sweeper's user avatar
  • 280k
0 votes
2 answers
43 views

Can android app crash lead to memory leak?

Can android app crash lead to memory leak? AFAIK - activity and services and receivers and content-providers of an app are processes. When the app crashes (eg NoSuchElementException), processes of all ...
Rishabh Gupta's user avatar
Answer

When your app crashes, the process is terminated. That means all resources allocated to the process are returned to the OS. So no, it can't cause a memory leak, unless there's an OS level bug in the ...

View answer
Gabe Sechan's user avatar
  • 94.1k
1 vote
1 answer
81 views

SwiftUI: matchedGeometryEffect and clipShape Animation Bug

Say I have a container view that I use to apply consistent styling to various contained views. struct FormattedContainer<Content: View>: View { let content: Content init(@ViewBuilder ...
colbrew's user avatar
  • 101
Answer Accepted

You should not clip content. You can add an in: parameter to specify what shape the background should be in: .background(Color.gray.opacity(0.2), in: .rect(cornerRadius: 20)) // remove clipShape! If ...

View answer
Sweeper's user avatar
  • 280k
0 votes
1 answer
56 views

SwiftUI NavigationSplitView: Confused due to an official example by Apple

I'm tinkering with SwiftUI-NavigationSplitView. I started with this example from the official Developer-documentation. Overview The UI, I have made is very similar: import SwiftUI struct ContentView: ...
cluster1's user avatar
  • 5,912
Answer Accepted

Without an explicit tag, ForEach on a collection of Identifiable elements automatically tags each view with the elements' ids. It is as if you have wrote: ForEach(articles) { article in Text(...

View answer
Sweeper's user avatar
  • 280k


15 30 50 per page
1
2 3 4 5
47