Post

Replies

Boosts

Views

Activity

Is there any way to fix screen rotation in iPad apps that don't use the Requires Full Screen option?
Is there a way to lock the rotation of the app when the app is in full screen state in an iPad app that doesn't use Requires Full Screen? Disable Requires Full Screen option func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) I know that even if the above function returns a value that locks the rotation, the device is not. But iPad users who use my app send me an email asking if I can provide a function to lock the rotation of the app. I would like to know if there is a way to lock the rotation even when in full screen. Or can't Apple support it in a future update?
0
0
732
Oct ’22
Can you tell me the cause of the crash that occurs when AVSpeechSynthesizer is stopped?
We are providing the ability to speak text in our app using AVSpeechSynthesizer . Stop the AVSpeechSynthesizer at random I get a crash like the screenshot below. What causes this error to occur? It happens occasionally during testing, but it doesn't go away even if I fix it in various ways. Is this a bug in iOS or is there something I need to fix or add? If a crash occurs, the message below is also displayed in the log window during debugging. [AXTTSCommon] _BeginSpeaking: speech cancelled error: Error Domain=TTSErrorDomain Code=-4005 "(null)" [AXTTSCommon] _BeginSpeaking: couldn't begin playback TTS Create Code let utterance = AVSpeechUtterance(string: playText) if Singletone.sharedInstance().ttsIdentifier != nil { utterance.voice = AVSpeechSynthesisVoice(identifier: Singletone.sharedInstance().ttsIdentifier!) } else {         utterance.voice = AVSpeechSynthesisVoice(language: "en-US") }          utterance.rate = 0.4 utterance.pitchMultiplier = 1.0 utterance.preUtteranceDelay = -1.0 utterance.postUtteranceDelay =  -1.0 utterance.volume = 1.0          if self.synthesizer == nil { self.synthesizer = AVSpeechSynthesizer() self.synthesizer!.delegate = self }          self.synthesizer!.speak(utterance) TTS Stop Code self.synthesizer!.stopSpeaking(at: .immediate) self.synthesizer!.delegate = nil self.synthesizer = nil
1
0
1.2k
Oct ’22
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
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
Aug ’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
Aug ’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