How do I, in iOS 16.1.2, restrict access to the participants of a share to be able to be changed by only the owner of the share? - cloudkit

How do I implement UICloudSharingController so that in iOS 16.1.2, only the owner of the share can add or remove participants of the share, with the exception that a participant can remove himself from the share. When I set availablePermissions to [.allowPrivate, .allowReadOnly], when in iOS 16.1.2, UICloudSharingController says at the top that anyone who has access to the link can edit.
When I set availablePermissions to [.allowPrivate], there is no text at the top under Collaboration, and when I try to share, I get an error says "An Error Occurred" and "Unable to start collaboration".

Related

HUAWEI can't get user email info in https://oauth-api.cloud.huawei.com/

i do authorization in my app with huawei -
https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/get-user-info-0000001060261938
i want to get access token, then male request to obtain user info, but can't get
emailenter image description here
enter image description here
Two things you can check:
Image 1 shows the request parameter getNickname set as 1. According to the doc: "When getNickName is set to 1, the nickname is returned." Therefore it is possible for the response only show a displayName only (not an email). The email is usually masked as a display name.Attempt to can change getNickname = 0 and try again.
If above change is not working, according to the developer documentation, "...information, such as the...email address, can be obtained only if the app has the permission to obtain the information."
You can check that your app has the permission and has been properly applied to your app and try again.
Share
Edit
Follow

How to solve Swift FileManager couldn’t open file because of permission and implement file access

I made a music app for macOS that need the access of the file on disk. I can get the proper url, but I can't access the file. To figure out that problem, here I create a concise code snippet to concentrate on the question itself.
.onAppear {
var url = FileManager.default.homeDirectoryForCurrentUser
url.appendPathComponent("Downloads/Test.txt")
var text: String = ""
do {
text = try String(contentsOf: url)
} catch {
print("ERROR: \(error.localizedDescription)")
}
}
The output would be like this
ERROR: The file “Test.txt” couldn’t be opened because you don’t have permission to view it.. So I noticed App Sandbox in Targets > Signing & Capabilities. But at the list of file access (as you can see in the following picture), there's only User Selected File, Downloads Folder, Pictures Folder, Music Folder and Movie Folder. So I come up with 3 questions:
What that User Selected File means? Is that means that the user can select some specific file for my app to access? If it is, how can user selects them?
How can I get access to other folders like Desktop Folder if I remain the App Sandbox capability here?
I also noticed the trash icon on right-upper corner. If I delete App Sandbox, I can access every folder I want with the user's agreement by a default system pop-up. But what the deletion of App Sandbox means? Does it make my app "untrusted" somehow when user install it or others? Does it cause any security problems?
And It couldn't be better if you can tell me the conventions major developers follow when meet this problem. I would highly appreciate your help.

VK Oauth: Authenticating user, giving error

I created an application in VK. But, when I try to authenticate a user, I am getting the following error:
{
error: "invalid_request",
error_description: "redirect_uri has wrong domain, check application settings"
}
Also, when I am creating application, I don't get any option to specify redirect-url.
Can anybody please help me, as to how should I resolve this error.
Go to https://vk.com/apps?act=manage, select needed app and click Manage. Click Settings on the left sidebar and edit Authorized redirect URI, Base domain and Site address fields (Under the Open API title)

Having trouble getting facebook sample to work - the one called "Feed Dialog".

Does anyone have a working xcode project they could upload / share?
I'm having trouble getting this to work clean without errors.
The example is located here.
[https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/][1]
I have the project working to this extent -
The main viewcontroller is displayed with a button that allows the user to send a post to facebook.
When clicked, facebook indicates that the user has already authorized the app to post to their page. He clicks OK on the facebook message and then the user sees the 'share' dialog and is allowed to enter text for his post.
As the sharedialog is presented to the user, I get this warning in my console
2012-09-29 11:04:25.190 gw_fakeapp[8016:fe03] FBConditionalLog: handleOpenURL should not be called once a session has closed
My problem comes when the user clicks "share", I get the error:
2012-09-29 11:04:32.217 gw_fakeapp[8016:fe03] *** Terminating app due to uncaught exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: an attempt was made reauthorize permissions on an unopened session'
*** First throw call stack:
(0x14c9022 0xfe2cd6 0x14c8ee1 0x171d1 0x14367 0x3ad8 0x14cae99 0x14814e 0x386a0e 0x14cae99 0x14814e 0x1480e6 0x1eeade 0x1eefa7 0x1ee266 0x16d3c0 0x16d5e6 0x153dc4 0x147634 0x1da9ef5 0x149d195 0x1401ff2 0x14008da 0x13ffd84 0x13ffc9b 0x1da87d8 0x1da888a 0x145626 0x28ed 0x2815)
terminate called throwing an exception(lldb)
Does anyone have a working project I could compare mine with?
Thank you!
Phil
You can download sample of codes from developer.apple.com which describe about Facebook post publishing.
Here is the link: https://github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.1.pkg

iphone twitter and sharing

Has anyone encountered the following error message when sending to Twitter?
"Error: Incorrect signature"
And on the debug console:
<0xf14cf80 SHKTwitter.m:(356)> Twitter Send Status Error: {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}
So far as I can tell I've followed the install instructions on http://www.getsharekit.com/install/#download and it is working with Facebook, e-mail etc. just not Twitter.
It would be great if someone has seen this error before and goes "aha!".
All I did to enable twitter Sharing is:
Regitered my App as a Twitter APP (Application Type: Browser)
#define SHKTwitterConsumerKey #"My..."
#define SHKTwitterSecret #"My..."
#define SHKTwitterCallbackUrl #"http://www.anything.com/callback" // You need to set this if using OAuth, see note above (xAuth users can skip it)
\#define SHKTwitterUseXAuth 0 // To use xAuth, set to 1
\#define SHKTwitterUsername #"" // Enter your app's twitter account if you'dlike to ask the user to follow it when logging in. (Only for xAuth)
Note that for the callback function you can enter any URL you want. even www.google.com. Just make sure it is the same URL in your code.
The issue is that you're signed into your twitter account, and allowed the app to connect to your profile.
However, days go by, the Key and Secret change, and now you're seeing this error. It's because you have to log out and re-log back into Twitter. I spent waaay too much time finding this out when I created a new Twitter App to hook into (and organize my apps) and found this error.
Basically, ShareKit is saving your login info, auto-logging you in, and getting the error when twitter says the app doesn't have permission to connect to your profile.
Follow these steps to log yourself out and test again :
http://www.getsharekit.com/docs/#logout
Check this previous SO question, it might be able to help you solve the problem:
Twitter API status update always returns "Incorrect signature"