Category "swift"

window.webkit.messageHandlers is null on ios 15

window.webkit.messageHandlers gives null on ios 15, but when I set config.limitsNavigationsToAppBoundDomains = true; it works properly. But I don't want to res

Why does this swift async-await code fails with leaked continuation?

I am experimenting with Swift async-await and AsyncSequence protocol, Here is the code: struct AsyncNumbers<Element: Numeric>: AsyncSequence { private

SwiftUI - MapAnnotation is showing up in wrong position

I am trying to display multiple map annotations to Apple Maps In SwiftUI, but the annotations are showing in some wrong perspective. All positions are displayed

Swift Mjpeg Streaming Only Showing Single Frame

I am trying to create a Mjepg stream. I have followed a tutorial and it's not a lot of code to get a stream to lead but I don't understand why it's not working

How to create array of objects in firebase

I am working on a project developing a car rental app. The app can be accessed by admin and user both with different roles. So at the moment i'm saving the car

Make URL string not auto search when Apple Maps is opening threw my app

I have a function inside my button to open up Apple Maps and search for Kebab. However when Apple Maps is opening, Apple Maps have already chosen a Kebab restau

ld: entry point (_main) undefined. for architecture arm64

not sure what to do. i keep getting this message "ld: entry point (_main) undefined. for architecture arm64" I am unsure if it has to do with my process but I h

How to gracefully restart CBCentralManager, in Swift

How do I gracefully stop all CBCentralManager activity and then, later, restart it? He's my plan. Is anything missing? Stopping... If inadvertently still scann

Why does UIToolBar turn transparent/translucent when table view scrolls under it

I have a UITableViewController and when the user taps an "edit" button, I display a toolbar at the bottom of the screen. I create a shadow on top of the toolbar

Unable to call Device Activity in Screen Time Api From Parent Device

Using shared authorization I am able to authorize the child's device and able to see all the installed apps on the child's mobile on the parent device. But when

how to change cell background colour on selected item in UICollectionView and change other Cell colour to default in swift

I am new in swift and I am trying to change cell background colour of UICollectionView but its not working my code is like this in cellForItemAt if(cell.isSelec

Getting CFNetwork, CoreMotion Crashes after releasing iOS Application

After releasing my ios application, I started to get lots of crash such as CFNetwork, CoreMotion etc. And then I thought, I did something wrong on my project. I

XCUITest How to dismiss date picker popover

In iOS 15 I've got a date picker in my app that uses the .compact style so it presents the date and time selection UI as popovers. I can't find a way to dismiss

Type erasure in Swift Concurrency AsyncStream

Experimenting with swift concurrency, I would like to have a clean API for exposing an async sequence of a given element type and a throttled version of the sam

SwiftUI - Detect when ScrollView has finished scrolling?

I need to find out the exact moment when my ScrollView stops moving. Is that possible with SwiftUI? Here would be an equivalent for UIScrollView. I have no idea

Not able to get stripe payment token in iOS Swift

I am implementing stripe paymentSDK and after implementing my code I am getting error in my console, here my code: View Controller Class func stripPayment(CVC:

Not able to get stripe payment token in iOS Swift

I am implementing stripe paymentSDK and after implementing my code I am getting error in my console, here my code: View Controller Class func stripPayment(CVC:

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