Post

Replies

Boosts

Views

Activity

app logging
Does Cocoa Touch provide a convenient way for apps to perform logging? Perhaps something similar to the print() command except it is kept after the app is installed?
Topic: UI Frameworks SubTopic: UIKit Tags:
6
0
1.7k
Jan ’22
Does unifiedContacts(matching:keysToFetch:) return only unified contacts and leave out non-unified contacts?
When I use the Contacts Framework with Swift for iOS 15 using Xcode 13, when I use CNContactStore instance method unifiedContacts(matching:keysToFetch:), what happens to those CNContact objects that are not linked with any other CNContact objects, would they be returned as non-unified contacts, or would they be left out since they are non-unified contacts?
2
0
896
Nov ’21
Has anyone figured out how to create a CNContainer in an iOS device?
Apple Documentation says that there is only one CNContainer in an iOS device of type local. Creating a container of type exchange requires using Exchange, and creating a container of type cardDAV requires a server also. Is there any way to create a container of type unassigned? I would need to do this programmatically in Swift to use in my iOS app. This question and the posts it mentions give no answer.
2
0
1.9k
Dec ’22
How do I make a link to a specific answer instead of the entire post?
How do I get the answer id of an answer in a thread? I would like to know how to create a link to a specific answer of a post so I can refer to a specific answer rather than to the top of the page of the post. I noticed one link went to this address - https://developer.apple.com/forums/thread/67535?answerId=195112022#195112022. That's where I learned about the "answerId" item.
2
0
672
Mar ’22
Why does a participant of a share not have a record referenced by the root record?
I am able to share a record in CloudKit using the instructions in the Apple Documentation, including the CloudKitShare sample, but when another user accepts the share, only the root record is saved in the sharedDatabase. There is supposed to be another record that has a reference to the root record. I'm not sure what code to include in this post. Perhaps someone can tell me that much or know of a common programmer mistake that causes this error. Here is the basic code, after I have removed code not essential to the problem, to make my code easier to read. @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {     func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata) {         let container = CKContainer(identifier: cloudKitShareMetadata.containerIdentifier)         let acceptSharesOperation = CKAcceptSharesOperation(shareMetadatas: [cloudKitShareMetadata])         container.add(acceptSharesOperation)     } }
2
0
486
Apr ’22
Is it safe to update to macOS 12.3.1 without disrupting Xcode 13.3?
Before I update my macOS to 12.3.1, form 12.3, I want to know if anyone has installed it and if it interfered with Xcode. I heard that macOS updates faster than Xcode so that at times the new macOS requires a new Xcode that hasn't been released yet. I checked Mac App Store, and there isn't a version released after Xcode 13.3 (13E113).
2
0
1k
Apr ’22
How do I update CloudKit whenever there is a change in Contacts in iOS?
Is there any way to run code in iOS whenever new information are added to certain contacts in contact store? If I use Notifications, I would have to have a process running at all times, since contacts are able to be changed by Apple's Contacts app. I have looked at App Extensions and there are no extensions I that can be used. There is a way to run a background process but I recall that has a limited lifespan. Am I correct about this? I need to update data in CloudKit that saves contacts information that can be shared with other users using their own Apple ID's. CloudKit subscriptions notify my app when something changes in CloudKit, but I also need to update records in CloudKit when something changes in Contacts. Anyone have any ideas how this might possibly be done?
2
0
1.1k
Jun ’22
change constraints in code
If I've already set contraints using code in iOS, how do I change the constraits?
Replies
6
Boosts
0
Views
5.2k
Activity
Feb ’23
app logging
Does Cocoa Touch provide a convenient way for apps to perform logging? Perhaps something similar to the print() command except it is kept after the app is installed?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
6
Boosts
0
Views
1.7k
Activity
Jan ’22
How do I show microseconds of a date object?
How do I get the microseconds of an object of type Date? I'm open to any suggestions. I'm not able to set the dateFormat property of DateFormatter to be able to show microseconds.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
0
Views
5.0k
Activity
May ’22
UnicornChat
Anyone ever tested Apple's sample code for SiriKit UnicornChat? How do I figure out what to say to Siri to see if the sample works?
Replies
2
Boosts
0
Views
1.8k
Activity
Nov ’22
Does unifiedContacts(matching:keysToFetch:) return only unified contacts and leave out non-unified contacts?
When I use the Contacts Framework with Swift for iOS 15 using Xcode 13, when I use CNContactStore instance method unifiedContacts(matching:keysToFetch:), what happens to those CNContact objects that are not linked with any other CNContact objects, would they be returned as non-unified contacts, or would they be left out since they are non-unified contacts?
Replies
2
Boosts
0
Views
896
Activity
Nov ’21
All items in Project navigator in Xcode 13.1 black
Recently, the items in Project navigator of all my projects show as black instead of in color like before. What's causing this. I also noticed other changes when I create a new iOS app project.
Replies
2
Boosts
0
Views
744
Activity
Dec ’21
Where is my DerivedData folder for Xcode
My DerivedData folder is supposed to be in Library/Developer/Xcode/DerivedData. Why is it not there. Is there a setting in Finder that is hiding files from me? Did my Xcode get installed with folders in a different location than usual?
Replies
2
Boosts
0
Views
22k
Activity
Dec ’21
Does TestFlight show what Logger logs from my app?
Am I able to see what Logger logs from my app when it's running on a device belonging to an external tester if my app doesn't crash? Am I able to see the logs if my app does crash? I am using Swift with Xcode for iOS.
Replies
2
Boosts
0
Views
9.6k
Activity
Jan ’22
What is the default assumption if Apple Documentation does not say whether a certain method can or cannot be run on a background thread?
If Apple Documentation does not say whether a certain method is allowed to be run on a background thread other than the main UI thread, does that mean it can or cannot be run on a background thread?
Replies
2
Boosts
0
Views
511
Activity
Jan ’22
Has anyone figured out how to create a CNContainer in an iOS device?
Apple Documentation says that there is only one CNContainer in an iOS device of type local. Creating a container of type exchange requires using Exchange, and creating a container of type cardDAV requires a server also. Is there any way to create a container of type unassigned? I would need to do this programmatically in Swift to use in my iOS app. This question and the posts it mentions give no answer.
Replies
2
Boosts
0
Views
1.9k
Activity
Dec ’22
How do I make a link to a specific answer instead of the entire post?
How do I get the answer id of an answer in a thread? I would like to know how to create a link to a specific answer of a post so I can refer to a specific answer rather than to the top of the page of the post. I noticed one link went to this address - https://developer.apple.com/forums/thread/67535?answerId=195112022#195112022. That's where I learned about the "answerId" item.
Replies
2
Boosts
0
Views
672
Activity
Mar ’22
Why does a participant of a share not have a record referenced by the root record?
I am able to share a record in CloudKit using the instructions in the Apple Documentation, including the CloudKitShare sample, but when another user accepts the share, only the root record is saved in the sharedDatabase. There is supposed to be another record that has a reference to the root record. I'm not sure what code to include in this post. Perhaps someone can tell me that much or know of a common programmer mistake that causes this error. Here is the basic code, after I have removed code not essential to the problem, to make my code easier to read. @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {     func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata) {         let container = CKContainer(identifier: cloudKitShareMetadata.containerIdentifier)         let acceptSharesOperation = CKAcceptSharesOperation(shareMetadatas: [cloudKitShareMetadata])         container.add(acceptSharesOperation)     } }
Replies
2
Boosts
0
Views
486
Activity
Apr ’22
Is it safe to update to macOS 12.3.1 without disrupting Xcode 13.3?
Before I update my macOS to 12.3.1, form 12.3, I want to know if anyone has installed it and if it interfered with Xcode. I heard that macOS updates faster than Xcode so that at times the new macOS requires a new Xcode that hasn't been released yet. I checked Mac App Store, and there isn't a version released after Xcode 13.3 (13E113).
Replies
2
Boosts
0
Views
1k
Activity
Apr ’22
How do I update CloudKit whenever there is a change in Contacts in iOS?
Is there any way to run code in iOS whenever new information are added to certain contacts in contact store? If I use Notifications, I would have to have a process running at all times, since contacts are able to be changed by Apple's Contacts app. I have looked at App Extensions and there are no extensions I that can be used. There is a way to run a background process but I recall that has a limited lifespan. Am I correct about this? I need to update data in CloudKit that saves contacts information that can be shared with other users using their own Apple ID's. CloudKit subscriptions notify my app when something changes in CloudKit, but I also need to update records in CloudKit when something changes in Contacts. Anyone have any ideas how this might possibly be done?
Replies
2
Boosts
0
Views
1.1k
Activity
Jun ’22
What would happen if I add an index to a record type into production that wasn't there before in CloudKit?
What would happen if I add an index to a record type in development that isn't there in production, then I deploy the development into production?
Replies
2
Boosts
0
Views
876
Activity
Jun ’22