Category "swift"

fetch last item of core data array

In my swift code below my goal is fetch the last image of the core data array. Right now my code is having a runtime error with indexpath. I dont know if you n

Trying to change a variable set as var, but can't change it within the structure it exists

Working on the upload section of my app, after uploading a file from the iPhone, the server puts the file through multiple processing stages. I use a struct tha

Can't show image from url in swiftUI with URLSession [duplicate]

i'm new to swiftUI and trying to create simple app for showing images from API of images i got the images from url but can't show it in Imagev

SwiftUI TabView: how to detect click on a tab?

I would like to run a function each time a tab is tapped. On the code below (by using onTapGesture) when I tap on a new tab, myFunction is called, but the tabvi

Retrieve array of substring matched with regex in swift

Is there any way to retrieve an array of words prefixed with @ sign in a string? "@City == xyz AND @Hobby == gardening" -> ["@City","@Hobby"] I tried below

Store redux data that can be accessible with swift and java

I want to rewrite my React Native application with Java for Android and Swift for iOS. The thing is, I don't want to lose application data so that the user has

NSOpenPanel, NSSavePanel runModal dismisses immediately with cancel, but only on M1 running 11.4

I have one user who reports that the Open and Save panels have been "auto dismissing". ie the Open Panel dialog appears then immediately dismisses itself, takin

Error installing OpenSSL-Apple Cocoapod. Build fails

I am trying to install OpenSSL-Apple Cocoapod as a dependency on a project but the build fails like so [!] /bin/bash -c set -e ./build-libssl.sh --version="1.1.

ARCHS[@]: unbound variable in Xcode 12

Our iOS project is built successfully in Xcode 11. However, on Xcode 12, it shows an error like this: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/

SwiftUI - NavigationView title and back button clipped under status bar after orientation change

Whenever I rotate the device to landscape and back again, the top of the NavigationView (including the title and back button) get clipped under the status bar.

Core Haptics not playing in iOS 15 with certain AVAudioSession configurations

I'm using Core Haptics to play a custom "heart beat" pattern, while simultaneously playing music using AVAudioPlayer. Specifically, I'm creating a simple CHHapt

When exactly is drawInMTKView called?

MetalKit calls drawInMTKView when it wants a your delegate to draw a new frame, but I wonder if it waits for the last drawable to have been presented before it

cocoa touch framework missing symbol called

I have a framework that depends on a couple of pods such as IQKeyboardManagerSwift, It used to work fine when I generate framework file and integrate it in a pr

MapBox Maps iOS SDK: Is there a way to animate PointAnnotation when it's being selected

I migrated from old Mapbox Maps SDKs for iOS and macOS v6.x.x to mapbox-maps-ios v10.1.0. A lot of API got changed. I was able to restore same functionality usi

SwiftUI function that returns either Text or Button?

I have a simple function to return either Text or Button, but I get the following error: Function declares an opaque return type, but the return statements in

Firebase Cloud Messaging with Apple push notifications stopped working when I changed my app Bundle ID

I have an App that I had to change the Bundle-ID for. Once I did this Push Notifications stopped working. I replaced the app on Firebase with one with the new B

SwiftUI Create Picker with possibility to add elements

I'm trying to build a swift app with categories, I created a Picker for my categories but I would like to be able to create a Category inside the Picker itself.

Dismissing WebView with custom navigation bar

I have this code: ForEach(news){ item in NavigationLink { WebView(url: URL(string: item.url)!) .navi

How to know when SwiftUI keyboard search button tapped in .searchable search window

I am using the .searchable modifier in SwiftUI. Is there anyway to know when the user presses the search key on the keyboard? I know how to do this by using a

UITapGestureRecognizer on UIDatePicker not working in iOS 15

I have a row for a user to select a date, and I'm using the UIDatePicker to do this. When a user taps on it, I want it to change some text on the row as well as