Posts

Post not yet marked as solved
65 Views

How can I download the attachment in decodedMessage

In decodedMessage, I got the raw message Data. How can I get the attachment with this information? --Apple-Mail=_7074F225-9F70-4410-B0AC-15891A766688 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Content --Apple-Mail=_7074F225-9F70-4410-B0AC-15891A766688 Content-Transfer-Encoding: base64 Content-Disposition: ATTACHMENT; filename*=utf-8''%E5%8D%97%E4%BA%AC%E5%8D%87%E5%AD%A6%E5%AD%A32021.pptx Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation; name="=?utf-8?B?5Y2X5Lqs5Y2H5a2m5a2jMjAyMS5wcHR4?="; x-unix-mode=0700 X-Apple-Content-Length: 2299846 --Apple-Mail=_7074F225-9F70-4410-B0AC-15891A766688--
Asked
by Cotin.
Last updated
.
Post not yet marked as solved
186 Views

How to use StoreKitTest in UI Tests?

I created a UI Testing Bundle, set its testing target application to None. So I need to call XCUIApplication.launch to launch the testing target manually. Now I want to test the in-app purchase flow, I added the Configuration.storekit in the UI testing bundle, created a SKTestSession after launching the target App, but the target App didn't get the testing storekit environment. Is there a way to use the .storekit file and SKTestSession in UI testing bundle?
Asked
by Cotin.
Last updated
.
Post not yet marked as solved
156 Views

Testing filesystem authorization are not working for protected folders

According to WWDC 701 "Advances in macOS Security", Apple's suggestion is to use FileManager.default.isReadableFile, FileManager.default.isWritableFile to test filesystem authorization. But these APIs always return true and we can always delete files in the folder, no matter the user allows the app to access these folders or not.Following is the code and phenomenonslet path = "/Users/***/Documents" let file = "/Users/***/Documents/1.png" let isReadable = FileManager.default.isReadableFile(atPath: file) //return true let isWritable = FileManager.default.isWritableFile(atPath: file) //return true try? FileManager.default.removeItem(atPath: file) // file will be deleted guard let files = try? FileManager.default.contentsOfDirectory(atPath: path) else { return } //This will trigger user consent prompt for the first timeFile in the protected folder can be deleted before authorization. Is this Apple's Bug?
Asked
by Cotin.
Last updated
.