Post

Replies

Boosts

Views

Activity

How ordering of Unit Tests in Xcode works? My tests fail because of the ordering and dependencies
Hello, I’ve a problem with unit tests. Whenever I run the unit tests individually, they pass. However, if I run them altogether, some fail. Since the tests are based on shared data (Database), I know this may be the problem.  In order to solve this, I clear the database on setup function in each test. Yet, this doesn’t fix the issue. So I assume the unit tests work in parallel, which leads to race condition (so some fail & some pass). My questions are how unit test order works?  Can I force unit tests to run the tests sequentially?  Can I force it not to move to the next test until the current test is done? What about setup & teardown, do they always work til the end before running test functions? Thanks! 🙏
3
0
3.4k
Aug ’23
small icon is hiding screen in iPad
Hi, I’m new to swiftUI. I’ve been following this tutorial (https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation) and everything was OK until I ran it into iPad (10th Generation). Once I opened it, the list is hidden in this small icon (on the top left side). Is there a way to change this behavior in order to be similar to phone view? Thanks!
0
0
329
Jun ’23
Build input file cannot be found: Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
Hello, I cloned this repository, but when I tried to build it, I faced an error related to the entitlements list. I attempted to resolve the issue by removing the DerivedData folder and rebuilding, but then I received errors indicating that packages such as RxSwift and Maya could not be found. I then closed the Xcode and reopened it, but the original entitlements list error reappeared when I tried to build the project again. Appreciate any help.\ Thanks in advance!
2
0
6.9k
Apr ’23
why unit tests pass locally, but aren't working in Xcode cloud?
Hello, I have unit tests related to realm and it’s working on my side with my simulator & in Xcode cloud within the same branch. But, when it’s merged to the main branch I got a failed unit test relating to realm. I run all unit tests locally on main branch with the same simulator & iOS version as in Xcode cloud & all tests are passed. (while it's not the case on the cloud) I cannot catch the reason for this problem to start solving it. Appreciate any help. Thank you in advance!
1
1
1.1k
Feb ’23
[Quicklook - iOS 16] How to disable the sharing ItemGroup besides the title in quicklook?
Hello, I’m trying to hide the share icon in iOS 16.  In iOS 16, quicklook has an item group ('V') just alongside the title in the navigation bar. This item icon displays share sheet to download, share, and save the video. How could I hide/ get rid of it? I tried navigationController?.navigationItem.rightBarButtonItems = nil And it didn’t work (and actually shouldn’t), because this item is no longer in the right section Thanks!
1
1
1.3k
Oct ’22
Why UIDevice.orientation works on my side while it should be deprecated in iOS 16?
Hello, I’ve been doing some research about iOS 16 & found in Apple Documentation that UIDevice.orientation isn’t supported anymore in iOS 16. (Video: 23:14) My app, however, on the simulator works well with it. Does it mean it will work properly in real devices with iOS 16? I even switched the target iOS to 16 & still works well. I checked documentation again and seems UIDevice.orientation isn’t even deprecated  I also checked this thread, and it seems it’s not working on his side (but works on mine 😅) Thanks!
2
0
594
Sep ’22