Post

Replies

Boosts

Views

Created

In Live Text API, text selection or clicking the highlight button on the right does not work
I am implementing Live Text function using ImageAnalysisInteraction and ImageAnalyzer. After loading an image file into UIImageView , I am trying to implement a function to select like a TextView using Live Text function. On the right side of the UIImageView, a button to change the Live Text highlight state is displayed. However, there is a phenomenon that this button cannot be clicked. Also, even if you change the highlight state to Live Text, it is not selected like UITextView. imageView.addInteraction(interaction) I added an interaction to the imageview like this. Even if I keep changing preferredInteractionTypes to multiple types, there is no choice. interaction.view!.isUserInteractionEnabled = true imageView.isUserInteractionEnabled = true So I also changed the isUserInteractionEnabled value to true . Have any of you solved this problem?
0
0
1k
Oct ’22
Error when using Live Text API
I am developing a function using Live Text. (I used ImageAnalyzer and ImageAnalysisInteraction.) When executed, the following error log is displayed and the Live Text Button is displayed but not clicked or highlighted. That is, it does nothing. [Unknown process name] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem. [Unknown process name] If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable. [api] -[CIImage initWithCVPixelBuffer:options:] failed because the buffer is nil. Are there any possible causes and solutions for this not working? Or is there a setting I'm missing in order to use LiveText? Below is part of the code. Changing preferredInteractionTypes to all types doesn't change anything. UIImageViews are displayed by switching left and right through UIPageViewController and calling the LiveText function. Task { var analyzer:ImageAnalyzer? = ImageAnalyzer()             if analyzer == nil {                 return             }             let configuration = ImageAnalyzer.Configuration([.text])             do {                 let pAnalysis = try await analyzer!.analyze(image!, configuration: configuration)                 DispatchQueue.main.async {                                          //interaction!.preferredInteractionTypes = .automatic                     interaction.preferredInteractionTypes = .textSelection                     //interaction!.preferredInteractionTypes = .dataDetectors                     //interaction!.preferredInteractionTypes = [.textSelection, .dataDetectors]                     //interaction.preferredInteractionTypes = [.textSelection, .dataDetectors, .automatic]                     interaction.selectableItemsHighlighted = true                     interaction.analysis = pAnalysis                     interaction.setContentsRectNeedsUpdate()                 }             } catch {}             analyzer = nil }
0
1
1.4k
Sep ’22
Does repurchasing non-consumable items have the same effect as restoration?
I have a question about Apple in-app purchases. If a user purchases a non-consumable item that has already been purchased again instead of restoring it, does the same effect as the restoration occur, or does a new payment incur expenses for consumers? The app has a restore button and a process to restore. There are users who sometimes fail to restore, and I am thinking of guiding them to purchase again if the repurchase has the same effect as the restoration.
2
0
917
Sep ’22
Can you check with @available if your iOS app is running on Mac?
I don't want the function to be included if the iOS app is running on a Mac. (Designed for iPad) For example the sample code below @available(iOS 13.4, *) func keyPressed(_ key: UIKey) { .. } The keyPressed function is included when running in iOS or iPadOS. I would like to know if there is a way to prevent the keyPressed function from being included at launch time, even when running an iOS app as "Designed for iPad" on M1/M2 devices. "targetEnvironment(macCatalyst)" When this is called, false is unconditionally displayed, so the distinction cannot be made. #if ProcessInfo().isiOSAppOnMac func keyPressed(_ key: UIKey) { .. } #endif If you use the code above, ProcessInfo cannot be executed in RunTime, so false is output unconditionally. So far I'm looking for a possible way, but there doesn't seem to be any possible way. If anyone has solved this problem, please reply.
1
0
722
Sep ’22
Xcode 14 & iOS 16 purple warnings starting with "[Security] This method should not .. "
Updated to Xcode 14.0 and built with iOS 16 device. In purple it says "[Security] This method should not be called on the main thread as it may lead to UI unresponsiveness." A warning is displayed. location is @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {... There is a part where it is difficult to know exactly which function it is because a warning is displayed at the location. I also replaced the admob library with the latest version, but I have the same problem. Does anyone know the cause of this issue? I need help.
17
5
23k
Sep ’22
Question about backup of isExcludedFromBackup
I have a few questions about files that are allowed to be backed up by setting isExcludedFromBackup to false . Is it correct that the files allowed to be backed up are backed up by iCloud and iTunes sync? Are the files allowed for backup always/periodically backed up to iCloud? Or does it only sync when the user manually backs up the device? If the files allowed for backup are regularly backed up to iCloud, will there be a capacity issue? (User's iCloud capacity) If there is issue 3 above, is it a good solution to add an option to the app so that users can turn it on/off?
1
0
1k
Jul ’22
Dynamic Libraries Link and Licenses
When building the external library project, I selected "Mach-O Type" as "Dynamic Library" and built it to create a framework file (folder). And this framework file was imported and used in our app and distributed to the App Store. Is this situation required to release the entire source code of our app under the LGPL 2.1 (or LGPL 3.0) license? Enter file in the Mac command line and press Enter, “dynamically linked shared library” is displayed.
2
0
1.7k
Mar ’22
Swift Array removeAll() performance (slow)
Using Swift Array I found removeAll() to be very slow and not perform well. Especially the larger the array (the more objects it contains), the slower it was. Is there a way to achieve good performance while performing the same function as removeAll() of an array? "= []" This method also performed the same. And the way to declare the array after making it optional had the same performance. swift / xcode is the latest version and is being tested on iOS 15.4 / iOS 14.8 / iphone6s. Or can't Apple make a new function that speeds up the performance of removeAll()??
2
0
1k
Mar ’22
How to forcibly decompress a compressed file (Zip)
There are files that fail to decompress on Mac or iOS. Even using open source for iOS, they all fail. Clicking on the MacBook to open it fails. However, some compression programs on Mac or PC will successfully decompress it. Is there any way to forcefully open or decompress such a compressed file (Zip)? I tried the Apple Archive method, but that method also fails with an error now. (Personally, I would like to be able to force such a file through the Apple archive.)
2
0
1.2k
Mar ’22
How to communicate with other apps in the standalone Apple Watch app
I haven't developed an Apple Watch app yet. I have an existing app for sale. Users of that app sometimes send me requests for functions using Apple Watch in the app by email. Considering future maintenance, I would like to sell the Apple Watch app as a paid app. However, I know that watch app support cannot be turned on/off by in-app purchases in existing apps. Is there any way for the standalone Apple Watch app to communicate with my existing paid/free apps?
1
0
703
Feb ’22
How to get the Mac OS version ?
My app is for iOS (not a Mac app). It can be installed and run on M1 Mac. ProcessInfo().isiOSAppOnMac returns True . In this case, is there any way to get the OS version information of the Mac device where this app is currently installed? All APIs that get the current version information return the iOS version. For example, Mac 12.0 returns iOS 15. Mac 11.0 and Mac 12.0 both return to iOS 15. And some APIs started in iOS 15 crash on Mac 11.0. So we currently want to know how we can get the Mac OS version information of the actual device in the above case. (Additionally, not Mac Catalyst.)
1
2
1.2k
Oct ’21
Black screen when running the app on the iPad app
This is the app we are currently selling. If you follow the steps below, you may experience a black screen phenomenon. Run the app and go to the home screen. Turn off the screen of the device and do not use it for a long time. Turn on the device's screen and launch the app from the home screen. Randomly, the entire app screen is black and nothing works. If you completely close the app and run it again, it will run normally. It has been reported to us since iOS 15. And in iOS 15 and iOS 14.8, a user sent us an email about the same phenomenon. This only happens on the iPad, not the iPhone. Supports iPad multitasking UIApplicationSupportsMultipleScenes is not supported. Can anyone advise us on the cause or solution of this symptom?
1
0
1.1k
Oct ’21