sharedCredentialsFile.RegisterProfile(profile); is throwing "Access Denied" exception on iOS device. #2453
-
Describe the bugHello, I'm getting the following exception when I try to create a credential profile on iOS device, It works fine on iOS simulator because this path is not private on MacBook , however, it's private on iOS devices and not accessible. Access to the path '/private/var/mobile/Containers/Data/Application/7D0A3286-1CB0-4453-840A-D5525E4DBAA1/.aws' is denied. Also, to add to this I need the profile for "AmazonKeyManagementServiceClient()" The only time it works is by using a profile, using any overloads (like Accesskey, secret key, and region) is causing a crash. I tried all the 12 overloaded parameters and it only works with profile (with no overloads).
Expected BehaviorCreate profile with no errors. Current BehaviorThe "RegisterProfile" throw an exception when the app is deployed to an actual iOS device. Reproduction StepsJust use the above function to create a profile and use actual iPhone device. Access to the path '/private/var/mobile/Containers/Data/Application/70E84908-A88D-4B4A-A652-FE0492027F30/.aws' is denied. at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00192] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs:319 Possible SolutionThe profile should be saved in other places that allowed in iOS, or it would be better if the "FilePath" property is not read-only so I can set the location myself. Additional Information/ContextNo response AWS .NET SDK and/or Package version usedAWSSDK 3.7.13.20 Targeted .NET Platform.NET 6.0.5 (64-bit) Operating System and versionMACOS Monterey |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @ahmedanas84, Good afternoon. Looks like the answer is provided by you in the description itself. I'm unsure why you would attempt to create a profile on a device which is restrictive and does not logically provides access to secured areas of the underlying OS. You should be able to use other overloads of Converting this issue into discussion since this is not a bug. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @ahmedanas84,
Good afternoon.
Looks like the answer is provided by you in the description itself. I'm unsure why you would attempt to create a profile on a device which is restrictive and does not logically provides access to secured areas of the underlying OS. You should be able to use other overloads of
AmazonKeyManagementServiceClient
where you are able to provide access and secret key (along with other parameters). Please advise what is expected here since this is not a bug given the platform and functionality you are trying to use.Converting this issue into discussion since this is not a bug.
Thanks,
Ashish