paste permission is newly introduced in iOS 16, first it was appearing every time you paste an item, which was fixed in iOS 16.0.2 to pop up only the first time you paste to that app.
however when running a unit test and asserting like this:
XCTAssertEqual(UIPasteboard.general.string, "123")
I get the paste permission every time which makes the unit tests stuck in the permission in that test.
looks like the issue is happening with other people: https://developer.apple.com/forums/thread/715328
Does anyone have a way to bypass this permission in unit testing?