Posts

Post not yet marked as solved
4 Replies
1.6k Views
I wanted to show count down timer in live activity. Since we can't use Timer in extensions, I used Text.init(timerInterval:pauseTime:countsDown:showsHours:) to show timer. But I need to show different text when the timer ends. How to achieve this behaviour?
Posted Last updated
.
Post not yet marked as solved
0 Replies
445 Views
I attempted to utilize the Background Assets feature for an iOS app. While debugging, I employed the following command to trigger the installation event: xcrun backgroundassets-debug -b <bundleID> -s --app-install -d <Device ID> This command worked flawlessly on an iPhone. However, when I attempted to trigger the installation event on a Mac, I encountered the following error message: The requested device to send simulation events to is not available. Verify that the device is connected to this Mac. Please note that the xcrun backgroundassets-debug -l command only displays a list of connected devices.Mac is not listed in that list.
Posted Last updated
.
Post not yet marked as solved
1 Replies
593 Views
I tried to add iOS 17 version check inside WidgetBundle but the widget extension keep on crashing . Getting Thread 1: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value. After removing the iOS 17 check it works fine. Is there any way to provide version check inside widgetBundle?
Posted Last updated
.
Post not yet marked as solved
3 Replies
601 Views
Hi I tried to use compositional layout, while using stage manager rare the app getting crashed. Please refer below error message Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid absolute dimension: inf. The dimension must be a finite value.' let itemSize = NSCollectionLayoutSize(widthDimension: .absolute(cellWidth),heightDimension: .absolute(cellHeight)) let item = NSCollectionLayoutItem(layoutSize: itemSize) let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(cellHeight)) let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitems: [item]) group.interItemSpacing = NSCollectionLayoutSpacing.fixed(cellSpacing) let section = NSCollectionLayoutSection(group: group) section.contentInsets = NSDirectionalEdgeInsets(top: 10,leading: inset, bottom: 0,trailing:inset) section.interGroupSpacing = lineSpacing Why am I getting this error after providing exact height and width?
Posted Last updated
.
Post not yet marked as solved
0 Replies
744 Views
Hi , i tried to download image using background assets framework. I tried to use install and update events to test the extension. But the extension always delegate to backgroundDownload(_ :failedWithError :) function with following error Error Domain=BAErrorDomain Code=202 "The requested URL is not permitted to be downloaded until the application is launched." UserInfo={NSLocalizedFailureReason=The requested URL is not permitted to be downloaded until the application is launched.} I used the following url to download the image https://w0.peakpx.com/wallpaper/934/165/HD-wallpaper-avatar-aang-aang-airbender-aire-appa-avatar-legend-leyenda.jpg Why am i getting this error and how to resolve this?
Posted Last updated
.
Post not yet marked as solved
0 Replies
829 Views
Hi folks, I tried to use apple's text recognition feature by using UIAction.captureTextFromCamera(responder:identifier:). It works fine in iPhone and iPad 3rd Gen. But in iPad 4th Gen the action is not get triggered. Kindly provide assistance . if #available(iOS 15.0, *), self.canPerformAction(#selector(captureTextFromCamera(_:)), withSender: self) {       let cameraAction = UIAction.captureTextFromCamera(responder: self, identifier: nil)       let cameraButton = UIButton(type: .custom)       cameraButton.addAction(cameraAction, for: .touchUpInside)       cameraButton.setTitle("Scan-Text", for: .normal)       view.addSubview(cameraButton)       // Then set constraints     } _Note: The button to trigger the action is visible only the action is not get triggered. _ Device specs: Name: iPad Air 4th Gen Os : iOS 16
Posted Last updated
.
Post not yet marked as solved
2 Replies
519 Views
Hi, i'm new to ios development. Can someone give some example to how to use the Metacharacters in RegularExpression pattern? var regex = try! NSRegularExpression(pattern: "[\D]", options:[]) this shows invalid escape sequence in literal error
Posted Last updated
.