Post

Replies

Boosts

Views

Created

captureTextFromCamera action is not get triggered in iPad Air (4th gen)
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
0
0
1.1k
Oct ’22
The requested URL is not permitted to be downloaded until the application is launched error in background assets
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?
3
0
1.2k
Jun ’23
Invalid absolute dimension: inf. The dimension must be a finite value
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
1.3k
Jul ’23
How to Debug Background Assets in macOS?
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.
0
2
959
Oct ’23
iOS 18.1 beta - App crashes at runtime while using Translation.TranslationError in project
I'm trying to cast the error thrown by TranslationSession.translations(from:) as Translation.TranslationError. However, the app crashes at runtime whenever Translation.TranslationError is used in the project. Environment: iOS Version: 18.1 beta Xcode Version: 16 beta yld[14615]: Symbol not found: _$s11Translation0A5ErrorVMa Referenced from: <3426152D-A738-30C1-8F06-47D2C6A1B75B> /private/var/containers/Bundle/Application/043A25BC-E53E-4B28-B71A-C21F77C0D76D/TranslationAPI.app/TranslationAPI.debug.dylib Expected in: /System/Library/Frameworks/Translation.framework/Translation
1
1
1.3k
Aug ’24
how to match/search Metacharacters using RegularExpression?
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
Replies
2
Boosts
0
Views
821
Activity
Nov ’21
captureTextFromCamera action is not get triggered in iPad Air (4th gen)
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
Replies
0
Boosts
0
Views
1.1k
Activity
Oct ’22
The requested URL is not permitted to be downloaded until the application is launched error in background assets
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?
Replies
3
Boosts
0
Views
1.2k
Activity
Jun ’23
Invalid absolute dimension: inf. The dimension must be a finite value
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?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
0
Views
1.3k
Activity
Jul ’23
How to show count down timer in live activity?
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?
Replies
4
Boosts
0
Views
3.1k
Activity
Jul ’23
How to update live activity UI after performing LiveActivityIntent action
I tried to implement interaction to live activity.Since we don't have force update like in widget, how to update the UI (like remove or add View) After performing the intent action.
Replies
0
Boosts
0
Views
835
Activity
Jul ’23
Accessing Live Activity enabled status from other targets
Is it possible to get enabled status of app's live activity through areActivitiesEnabled inside other targets (other than main target)? seems it always returns true.
Replies
0
Boosts
0
Views
805
Activity
Jul ’23
iOS version check inside widget extension
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?
Replies
1
Boosts
0
Views
1k
Activity
Aug ’23
How to Debug Background Assets in macOS?
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.
Replies
0
Boosts
2
Views
959
Activity
Oct ’23
iOS 18: SplitViewController Primary View Controller Title Disappears When Split View Expands
In iOS 18, with the elevated tab bar, the title of the primary view controller in a UISplitViewController automatically hides when the Split View is expanded. However, the title label is still present in the view hierarchy. How to resolve this issue?
Replies
5
Boosts
3
Views
1.2k
Activity
Jul ’24
iOS 18 - How to change the tint color of elevated tabbar?
iOS 18 introduced the elevated tab bar for iPad devices. However, the tint color for UITabBar items is not changing. Adjusting the barTintColor and tintColor properties of the tab bar items does not seem to have any effect.
Replies
11
Boosts
1
Views
5.4k
Activity
Aug ’24
iOS 18 Beta - Not able to reorder tabs in Compact mode on iPad while using UITab
To enable editing in the elevated Tab Bar or sidebar on iPadOS, we need to use UITabBar. However, using UITabBar restricts reordering in compact mode with the bottom tab bar. Instead of showing the tabs, the editing view only displays the message 'Drag the icons to organize tabs.' How can we resolve this issue? Find demo project here
Replies
0
Boosts
0
Views
611
Activity
Aug ’24
iOS 18.1 beta - App crashes at runtime while using Translation.TranslationError in project
I'm trying to cast the error thrown by TranslationSession.translations(from:) as Translation.TranslationError. However, the app crashes at runtime whenever Translation.TranslationError is used in the project. Environment: iOS Version: 18.1 beta Xcode Version: 16 beta yld[14615]: Symbol not found: _$s11Translation0A5ErrorVMa Referenced from: <3426152D-A738-30C1-8F06-47D2C6A1B75B> /private/var/containers/Bundle/Application/043A25BC-E53E-4B28-B71A-C21F77C0D76D/TranslationAPI.app/TranslationAPI.debug.dylib Expected in: /System/Library/Frameworks/Translation.framework/Translation
Replies
1
Boosts
1
Views
1.3k
Activity
Aug ’24
iOS 18 Beta - Proper error code is not given by TranslationError
All errors in TranslationError return the same error code, making it difficult to differentiate between them. How can this issue be resolved?
Replies
1
Boosts
0
Views
733
Activity
Aug ’24
How to hide elevated tabbar in iPadOS 18?
In iOS 18, the tab bar has been moved to the top on iPad. How can I hide this tab bar? Using TabBarController.tabBar.isHidden = true isn't working.
Replies
2
Boosts
0
Views
3.1k
Activity
Aug ’24