Post

Replies

Boosts

Views

Activity

How do I turn off certain features on my iOS app when it's installed on a specific device?
I remember getting a message while running my iOS app on an iOS device that said I have to turn Developer mode on in my iOS device and I found the setting and turned on developer mode. I'm looking for that setting again so I can turn it off on iPhone I use, so that my app can check if Developer mode is on, and if it's not on, certain features are disabled, particularly one that deletes data on the device. That is intended to delete test data. I don't want actual data on my iPhone to be deleted. I need this precaution. When I looked at Developer Settings in Settings app on my iPhone 8 using iOS 15.6.1, there doesn't seem to be any way of turning off developer mode. Is there something I can check on my device that I can use to let my app know that I don't want certain features to be available on my app for that specific device?
1
0
1.1k
Oct ’22
Anyone want a "guard catch" statement to be implemented in Swift?
Has anyone ever heard about any requests for swift to implement a "guard catch" statement? It would be like a do catch statement that allows code execution to continue like a guard statement does, and would provide an Error object to be used with a return statement or any of the key words a guard statement allows when the guard condition fails. It would look like this: guard do { . . . } catch { . . . return error }
1
0
731
Dec ’22
What does .allowReadWrite property of UICloudSharingController allow the current user to do if his/her participant permission property is readWrite?
Is the owner and the the app the only ones that can change the value of CKShare.publicPermission using UICloudSharingController? I mean, can a participant change the the value of CKShare.publicPermission using UICloudSharingController if the permission property of that participant is readWrite and the participant has access to the presented UICloudSharingController and its availablePermissions property includes allowReadWrite? What exactly does UICloudSharingController.PermissionOptions.allowReadWrite grant read and write access to? Does that mean the current user can change the CKShare.publicPermission property? I don't think the user can change the values of the permission properties of participants if he/she changes CKShare.publicPermission. The way participants are affected is that they may lose access to the CKShare, but their permission property can only be set by the owner. Am I right about this?
1
0
749
Dec ’22
How do I restrict a share to only be shared by specific users in iOS 16?
Has anyone noticed that with the latest iOS (16.1.2), UICloudSharingController doesn't restrict who can have access to the share when you set the availablePermissions to include .allowReadOnly and exclude .allowReadWrite. It behaves as I expect in the previous versions of iOS. Anyone know anything that would help me with this problem?
1
0
713
Dec ’22
Why is the text not complying with contour tag?
I got this SSML from w3. org. AVSpeechUtterance(ssmlRepresentation:) is not complying with the contour. It doesn't change hz. <?xml version="1.0"?> <speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" xml:lang="en-US"> <prosody contour="(0%,+20Hz) (10%,+30%) (40%,+10Hz)"> good morning </prosody> </speak> override func viewDidLoad() { super.viewDidLoad() guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else { print("SML did not work.") return } self.utterance = localUtterance self.utterance.voice = self.voiceNoelle } self.synthesizer.speak(self.utterance)
1
0
786
May ’24
What files used by Xcode can I delete?
I ran out of disk space and I think I've come to the point that I need to delete files used by Xcode. Can I delete Simulator altogether? It doesn't look like I can run the latest Xcode without iOS 18 installed with it on my Mac Pro. Is there any way I can exclude iOS 18 support using the current Xcode? Would it be a good option to uninstall the latest Xcode and use a previous version of Xcode instead, since I'm not developing for iOS 18? Since I've been working on only macOS apps, is it possible for me to delete anything that has to do with developing for iOS?
1
0
643
Nov ’24
How do I set the default contacts container for my iOS app to the contacts container that is saved in iCloud?
I am writing an iOS app using Swift and Xcode 13.1. I am using the Contacts Framework, and I read that each app has a default contacts container, and the default container in an app can be different than the default container in another app, and there is not a default container for the entire device. What determines which is the default container for the app made by an Xcode project? I didn't set the default container for my app and somehow the contacts container for a Google account became the default contacts container for my app. How do I use code to set the default contacts container for my app? How do I find out which is the default container of Apple's Contacts app that comes with iOS? I would like to set my app's default contacts container to the same default container of Apple's Contacts app, if that is the contacts container that is saved on iCloud. If not, I would like to set my app's default contacts container to the contacts container that is saved in iCloud. I assume that only one contacts container is saved on iCloud.
0
0
548
Dec ’21
Is there any way to programmatically cause a text message or a phone call to not cause the phone to sound which has the Emergency Bypass on?
Hi. Is there a way to programmatically allow my iOS app to prevent all calls from making a sound or causing the iPhone to vibrate, other than unselecting Emergency Bypass from each contact? If not, is there any way to temporarily or permanently unselect Emergency Bypass on any given Contact? If not, is there any way of programmatically shutting off the iPhone?
0
0
962
Feb ’22