Post

Replies

Boosts

Views

Activity

Testing a locale with space as thousands separator and dot as decimal point
MacOS system settings allow the user to select one of a number of number formats. My app behaves differently depending on the format (taken from the system Locale), so I need to test every combination. Thus far I have been successful at creating Locale objects with various identifiers that map to the different formats, like: let westEuropeanLocale = Locale(identifier: "en_DE") However, I can't find a locale that maps to using . as a decimal point, and space as a thousands separator, even though it's a standard option (3rd in this list): Any suggestions on how to create a test for this number format?
1
0
225
3w
Get the title view of an editor style UINavigationItem (iOS 16+)
I'd like to match the behaviour of the new Freeform app by offering an Export as PDF function accessible from the title menu. I can't figure out how to get the actual view that displays the document menu to supply as the UIActivityViewController's popoverPresentationController source view. The Freeform app shows the PDF document sharing popover directly under the little arrow to the right of the document title, so there must be a way.
3
0
1.1k
Dec ’22
Slow framework unit test failure (~5s)
Starting from Xcode 12.4 (I think), failing unit tests in framework targets take about 5 seconds to complete. Successful tests complete almost instantly (as expected). For example, the following test:     func testExampleFailure() {         XCTFail()     } Takes 4.356 seconds to execute on my 2019 MacBook Pro: Test Case '-[FrameworkTests.FrameworkTests testExampleFailure]' failed (4.356 seconds). This seems to only affect unit tests in Framework targets (unit tests for App targets are unaffected). I have also tested this in fresh Framework template projects across multiple Macs, so it appears to be an Xcode bug. I'd hoped Xcode 13 would fix this issue, but it persists for me on Monterey. Perhaps someone could suggest a workaround?
9
7
3.8k
Oct ’22
Testing a locale with space as thousands separator and dot as decimal point
MacOS system settings allow the user to select one of a number of number formats. My app behaves differently depending on the format (taken from the system Locale), so I need to test every combination. Thus far I have been successful at creating Locale objects with various identifiers that map to the different formats, like: let westEuropeanLocale = Locale(identifier: "en_DE") However, I can't find a locale that maps to using . as a decimal point, and space as a thousands separator, even though it's a standard option (3rd in this list): Any suggestions on how to create a test for this number format?
Replies
1
Boosts
0
Views
225
Activity
3w
Get the title view of an editor style UINavigationItem (iOS 16+)
I'd like to match the behaviour of the new Freeform app by offering an Export as PDF function accessible from the title menu. I can't figure out how to get the actual view that displays the document menu to supply as the UIActivityViewController's popoverPresentationController source view. The Freeform app shows the PDF document sharing popover directly under the little arrow to the right of the document title, so there must be a way.
Replies
3
Boosts
0
Views
1.1k
Activity
Dec ’22
Slow framework unit test failure (~5s)
Starting from Xcode 12.4 (I think), failing unit tests in framework targets take about 5 seconds to complete. Successful tests complete almost instantly (as expected). For example, the following test:     func testExampleFailure() {         XCTFail()     } Takes 4.356 seconds to execute on my 2019 MacBook Pro: Test Case '-[FrameworkTests.FrameworkTests testExampleFailure]' failed (4.356 seconds). This seems to only affect unit tests in Framework targets (unit tests for App targets are unaffected). I have also tested this in fresh Framework template projects across multiple Macs, so it appears to be an Xcode bug. I'd hoped Xcode 13 would fix this issue, but it persists for me on Monterey. Perhaps someone could suggest a workaround?
Replies
9
Boosts
7
Views
3.8k
Activity
Oct ’22