Post

Replies

Boosts

Views

Activity

Behavior of Bookmark URLs and Files App Recently Deleted – Clarification and Potential Bug
I am developing an iOS/iPadOS application and have encountered some behavior regarding Files App and security-scoped bookmarks that I would like to clarify. Additionally, I would like to report some behavior which might include a potential issue. Question1: Accessing deleted files via bookmark (Specification clarification) Our app saves file URLs as bookmarks, which file that user has selected on Files App or app-created so to open a file which user has modified previously in the next launch. When a user deletes a file in Files App (moves a file to Recently Deleted), the app can still resolve the bookmark and access the file for read/write operations. Is this behavior intended? In other words, is it correct that a bookmark can access a file that has been deleted in Files App but not permanently removed? Question2: Overwriting a file in Recently Deleted (Potential bug) We noticed that overwriting a file in Recently Deleted behaves differently depending on the method used. Current implementation 1.Create a temporary file in the same directory 2.Write content to the temporary file 3.Delete the original file ([NSFileManager removeItemAtURL:error:]) 4.Move the temporary file to the original file path ([NSFileManager moveItemAtURL:toURL:error:]) Result: The file disappears from Files App Recently Deleted. In contrast, using [NSFileManager replaceItemAtURL:withItemAtURL:] keeps the file visible in Recently Deleted. Is this difference designed behavior? If not, this may be a bug. Question3: Detecting files in Recently Deleted We want to detect whether a file resides in Recently Deleted, but we cannot find a reliable and officially supported method. Recently Deleted files appear under .Trash, but using the path alone is not a reliable method. We have tried the following APIs without success: [NSURL getResourceValue:forKey:NSURLIsHiddenKey error:] [NSURL checkResourceIsReachableAndReturnError:] [NSFileManager fileExistsAtPath:] [NSFileManager isReadableFileAtPath:] [NSFileManager getRelationship:ofDirectory:NSTrashDirectory inDomain:NSUserDomainMask toItemAtURL:error:] We could not obtain the Recently Deleted folder URL using standard APIs. [NSFileManager URLsForDirectory:NSTrashDirectory inDomains:NSUserDomainMask] [NSFileManager URLForDirectory:NSTrashDirectory inDomain:NSUserDomainMask appropriateForURL:url create:error:] Could you advise a safe and supported way to detect Recently Deleted files properly by the app?
6
0
338
1w
How does Numbers.app detect that a document was moved to Recently Deleted, and can third-party apps implement the same behavior?
The Numbers.app reopens the last edited document when the app launches. If the document was moved to another folder in the Files.app while the app was not running, Numbers.app correctly tracks the file and reopens it. However, if the document was deleted in the Files.app and moved to Recently Deleted, Numbers.app does not reopen the document when the app launches. Question : How does Numbers.app detect that a document has been moved to Recently Deleted? Can third-party apps implement the same behavior? What I tested : If a file is moved while the app is not running, resolving a bookmark successfully tracks the moved file. Files that are deleted via the Files.app appear in Recently Deleted, but those files are actually moved to the following directories: iCloud Drive /var/mobile/Library/Mobile Documents/.Trash/ On My iPad /var/mobile/Containers/Shared/AppGroup/{UUID}/File Provider Storage/.Trash/ App sandbox Documents directory ([On My iPad]/[Any App]) /var/mobile/Containers/Data/Application/{UUID}/Documents/.Trash/ When resolving the bookmark after deletion, the bookmark still resolves successfully and returns the new file URL inside the .Trash directory. I tried the following checks on the resolved URL: Checking file existence Checking read/write accessibility Inspecting bookmark resolution results Using APIs related to NSTrashDirectory See https://developer.apple.com/forums/thread/813329#813329021 All of these behaved the same as when the file was moved to a normal directory. None of these checks allowed me to detect that the file had been deleted. Additional experiment: I suspected that the app might simply check whether the path contains ".Trash", so I performed the following experiment. If a .numbers file is moved to /var/mobile/Containers/Data/Application/{UUID}/Documents/.Trash/ then The file appears in Recently Deleted in Files.app Numbers.app does not reopen the document when the app launches However, if the same file is moved to Documents/Trash Documents/.Trashed Documents/Any Folder/.Trash then The file does not appear in Recently Deleted in Files Numbers does reopen the document when launched This suggests that Numbers.app is not simply checking whether the path contains ".Trash".
2
0
85
1w
"An error occurred while registering installation with Gatekeeper." message shows when installing aribtatry app pkg file
Hello, I found that when installing an arbitrary app to macOS 12.0 by pkg file, it shows following error message. PKInformSystemPolicyInstallOperation failed with error:An error occurred while registering installation with Gatekeeper. Issue can not be replicated with macOS 11. Also even the error message has shown, installation seems to be completed properly. Have anyone seen similar issue with macOS 12?
1
0
978
Dec ’21
How to obtain particular data of app's subscription items in AppStoreConnect
We would like to obtain price data of our app's subscription items in order to facilitate our work on our application. I referred to the following document of AppStoreConnectAPI and found the API for acquiring the data. Although as a result, we are not able to get the [Initial Price] data that we wanted to get. https://developer.apple.com/documentation/appstoreconnectapi/read_subscription_price_point_information Example: id = "[unique id]" url = "https://api.appstoreconnect.apple.com/v1/subscriptionPricePoints/" + id + "/equalizations" params = "include=territory&filter[territory]=JPN&limit=200" #include=territory&filter[territory]=JPN res = requests.get(url, params, headers=HEAD) { "data": [ { "type": "subscriptionPricePoints", "id": "[unique id]", "attributes": { "customerPrice": "50", "proceeds": "35", "proceedsYear2": "43" }, As shown in the example above, the "Initial Price" information was not included. My question is: How do I get the "initial price" information for the subscription item in the following page or csv file? https://appstoreconnect.apple.com/apps/1262985592/appstore/subscriptions/1499075709/pricing If someone know any tips about this, please let me know.
0
0
357
Apr ’23
Behavior of Bookmark URLs and Files App Recently Deleted – Clarification and Potential Bug
I am developing an iOS/iPadOS application and have encountered some behavior regarding Files App and security-scoped bookmarks that I would like to clarify. Additionally, I would like to report some behavior which might include a potential issue. Question1: Accessing deleted files via bookmark (Specification clarification) Our app saves file URLs as bookmarks, which file that user has selected on Files App or app-created so to open a file which user has modified previously in the next launch. When a user deletes a file in Files App (moves a file to Recently Deleted), the app can still resolve the bookmark and access the file for read/write operations. Is this behavior intended? In other words, is it correct that a bookmark can access a file that has been deleted in Files App but not permanently removed? Question2: Overwriting a file in Recently Deleted (Potential bug) We noticed that overwriting a file in Recently Deleted behaves differently depending on the method used. Current implementation 1.Create a temporary file in the same directory 2.Write content to the temporary file 3.Delete the original file ([NSFileManager removeItemAtURL:error:]) 4.Move the temporary file to the original file path ([NSFileManager moveItemAtURL:toURL:error:]) Result: The file disappears from Files App Recently Deleted. In contrast, using [NSFileManager replaceItemAtURL:withItemAtURL:] keeps the file visible in Recently Deleted. Is this difference designed behavior? If not, this may be a bug. Question3: Detecting files in Recently Deleted We want to detect whether a file resides in Recently Deleted, but we cannot find a reliable and officially supported method. Recently Deleted files appear under .Trash, but using the path alone is not a reliable method. We have tried the following APIs without success: [NSURL getResourceValue:forKey:NSURLIsHiddenKey error:] [NSURL checkResourceIsReachableAndReturnError:] [NSFileManager fileExistsAtPath:] [NSFileManager isReadableFileAtPath:] [NSFileManager getRelationship:ofDirectory:NSTrashDirectory inDomain:NSUserDomainMask toItemAtURL:error:] We could not obtain the Recently Deleted folder URL using standard APIs. [NSFileManager URLsForDirectory:NSTrashDirectory inDomains:NSUserDomainMask] [NSFileManager URLForDirectory:NSTrashDirectory inDomain:NSUserDomainMask appropriateForURL:url create:error:] Could you advise a safe and supported way to detect Recently Deleted files properly by the app?
Replies
6
Boosts
0
Views
338
Activity
1w
How does Numbers.app detect that a document was moved to Recently Deleted, and can third-party apps implement the same behavior?
The Numbers.app reopens the last edited document when the app launches. If the document was moved to another folder in the Files.app while the app was not running, Numbers.app correctly tracks the file and reopens it. However, if the document was deleted in the Files.app and moved to Recently Deleted, Numbers.app does not reopen the document when the app launches. Question : How does Numbers.app detect that a document has been moved to Recently Deleted? Can third-party apps implement the same behavior? What I tested : If a file is moved while the app is not running, resolving a bookmark successfully tracks the moved file. Files that are deleted via the Files.app appear in Recently Deleted, but those files are actually moved to the following directories: iCloud Drive /var/mobile/Library/Mobile Documents/.Trash/ On My iPad /var/mobile/Containers/Shared/AppGroup/{UUID}/File Provider Storage/.Trash/ App sandbox Documents directory ([On My iPad]/[Any App]) /var/mobile/Containers/Data/Application/{UUID}/Documents/.Trash/ When resolving the bookmark after deletion, the bookmark still resolves successfully and returns the new file URL inside the .Trash directory. I tried the following checks on the resolved URL: Checking file existence Checking read/write accessibility Inspecting bookmark resolution results Using APIs related to NSTrashDirectory See https://developer.apple.com/forums/thread/813329#813329021 All of these behaved the same as when the file was moved to a normal directory. None of these checks allowed me to detect that the file had been deleted. Additional experiment: I suspected that the app might simply check whether the path contains ".Trash", so I performed the following experiment. If a .numbers file is moved to /var/mobile/Containers/Data/Application/{UUID}/Documents/.Trash/ then The file appears in Recently Deleted in Files.app Numbers.app does not reopen the document when the app launches However, if the same file is moved to Documents/Trash Documents/.Trashed Documents/Any Folder/.Trash then The file does not appear in Recently Deleted in Files Numbers does reopen the document when launched This suggests that Numbers.app is not simply checking whether the path contains ".Trash".
Replies
2
Boosts
0
Views
85
Activity
1w
"An error occurred while registering installation with Gatekeeper." message shows when installing aribtatry app pkg file
Hello, I found that when installing an arbitrary app to macOS 12.0 by pkg file, it shows following error message. PKInformSystemPolicyInstallOperation failed with error:An error occurred while registering installation with Gatekeeper. Issue can not be replicated with macOS 11. Also even the error message has shown, installation seems to be completed properly. Have anyone seen similar issue with macOS 12?
Replies
1
Boosts
0
Views
978
Activity
Dec ’21
How to obtain particular data of app's subscription items in AppStoreConnect
We would like to obtain price data of our app's subscription items in order to facilitate our work on our application. I referred to the following document of AppStoreConnectAPI and found the API for acquiring the data. Although as a result, we are not able to get the [Initial Price] data that we wanted to get. https://developer.apple.com/documentation/appstoreconnectapi/read_subscription_price_point_information Example: id = "[unique id]" url = "https://api.appstoreconnect.apple.com/v1/subscriptionPricePoints/" + id + "/equalizations" params = "include=territory&filter[territory]=JPN&limit=200" #include=territory&filter[territory]=JPN res = requests.get(url, params, headers=HEAD) { "data": [ { "type": "subscriptionPricePoints", "id": "[unique id]", "attributes": { "customerPrice": "50", "proceeds": "35", "proceedsYear2": "43" }, As shown in the example above, the "Initial Price" information was not included. My question is: How do I get the "initial price" information for the subscription item in the following page or csv file? https://appstoreconnect.apple.com/apps/1262985592/appstore/subscriptions/1499075709/pricing If someone know any tips about this, please let me know.
Replies
0
Boosts
0
Views
357
Activity
Apr ’23