I used the Date class such as "currentTime = Date()", but I get a date that is off by 5 hours exactly. How do I get the current time? Is there a time zone setting I have to set?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
If I've already set contraints using code in iOS, how do I change the constraits?
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?
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.
I clicked the delete button to an App ID in my developer account and I got a message saying "All certificates associated with the App ID will be deleted and any provisioning profiles associated with this App ID will be invalidated." Why would the entire provisioning profile be invalidated? What about the other App IDs in that provisioning profile? Does that mean I wouldn't be able to use the provisioning profile for those other App IDs at all?
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?
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?
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.
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?
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.
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?
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.
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.
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)
}
}
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).