Post

Replies

Boosts

Views

Activity

How to replace the functionality of deprecated CKContainer.requestApplicationPermission(.userDiscoverability) ?
I am developing a Cloud Sharing app, but I have been unable to find a solution to this problem. CKContainer.requestApplicationPermission(.userDiscoverability) was deprecated in iOS17. However, without it I find that none of the following APIs return a user's RecordID: CKContainer.default().shareParticipants(forEmailAddresses: [emailAddress]) CKContainer.default().userIdentity(forEmailAddress: emailAddress) (deprecated) CKContainer.default().discoverUserIdentity(withEmailAddress: emailAddress) (deprecated) CKFetchShareParticipantsOperation(userIdentityLookupInfos: lookupInfo ) For users who have given permission in response to CKContainer.requestApplicationPermission(.userDiscoverability), these APIs return the user's RecordID in the response's CKUserIdentity. But for user's who have not been asked for permission, their CKUserIdentity does not contain their user RecordID. After iOS17, how can we ensure that the response's CKUserUserIdentity contains the user's RecordID ? I use the user's RecordID as part of my lookup (by email address) for other users, to confirm if they have already registered with the App. If not, I need to send them an invitation using the UICloudSharingController. If they have already registered, I can set up a share with them without the 'UICloudSharingController'. Thanks for any suggestions.
0
0
139
Jan ’26
IP Address for Socket Server and Client
I am developing an App using the Networking framework, which can be either a Socket Server or a Socket Client, such that 2 devices can communicate remotely. For the most part I have it working, except: I am not sure of the best way to determine the IP Address for the Socket Server in order to allow the Client app to connect. I am currently using either of Cloud Functions, or lookup webpages (such as ipify.org) and even reading the IP addresses locally from within the device (this returns many, but not all of them connect successfully). These options seem to work if the Socket Server app is connected to the internet with an IPv6 address, but I find that when the Socket Server app is connected with an IPv4 address, the Client app never successfully connects. How should I: a) force the Socket Server app to have/use an IPV6 address at all times? or b) allow the Client app to connect successfully via an IPv4 address? And is there a simple way to know what IP Address the Socket Server is listening from?
8
0
791
Jan ’25
Custom Property when creating a NWConnection
I am developing an App using the Networking framework, which can be either a Socket Server or a Socket Client, such that 2 devices can communicate remotely. I would like to include the Client's userUID when creating a NWConnection, such that when the SocketServer accepts the connection, it knows immediately which user is connected. (Currently I achieve this by sending the UserUID in Welcome/Introduction messages, which seems an unnecessary overhead, and because I am using UDP, I also have to make sure these messages are acknowledged, before safely using the connection.) Is there a way to add this custom data into the NWConnection?
2
0
439
Oct ’24