swift – Can anyone review this unit test class from iOS and tell me if I'm using the right approach?

I'm learning to write test cases in iOS with Swift. I was stuck when testing static Functions of mine Utilities Class, so I tried to mock this class and then test the cases. Please let me know if it's the right approach or tell me how to do it. Here is my code:

import XCTest
@testable import ConnectAndSell

class UtilitiesMock{
    func getBuildNumber() -> String{
        return Utilities.getAppBuildNumber()
    func getVersionNumber() -> String{
        return Utilities.getAppVersion()

class UtilitiesTests: XCTestCase {
    //system under test
    var sut:UtilitiesMock!

    override func setUp() {
        // Put setup code here. This method is called before the invocation of each test method in the class.
        sut = UtilitiesMock()

    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        sut = nil

    func testBuildNumber() {
        let buildNumber = Bundle.main.infoDictionary?("CFBundleVersion") as! String
        XCTAssertEqual(buildNumber, sut.getBuildNumber())


    func testVersionNumber() {
        let versionNumber = Bundle.main.infoDictionary?("CFBundleShortVersionString") as! String
        XCTAssertEqual(versionNumber, sut.getVersionNumber())


Architecture – Solutions for Generating Signed Builds for IOS and Android

I've developed a small game engine and successfully generated Xcode and Android Studio project files on a Windows computer. Now I want to allow the user to generate signed builds in the cloud and publish them. Is there a way to do this?

I also want to have a Github-like cloud service and build generation capability.

Many thanks.

Ease of Use – The best way to display secondary list items in an expandable list is to create a new screen. iOS mobile app

I design a page with an accordion list (not sidebar menu) in a financial iOS app. I'm trying to show that each primary list item is expandable / collapsible (indicated by up / down arrows) and that secondary items in each primary list item lead to a new page (indicated by right arrows).

This is how the list looks compressed:
List reduced

And expanded:

List expanded

Is a mix of so many rafters confusing and confusing? What is the clearest way to indicate this?

ios – why can not I get notifications on my iPad?

I have an iPad Pro with iPadOS version 13.2.3. I receive notifications that appear on my screen, but only take a few seconds. Sometimes I can swipe down from the top of the screen (I'm using my iPad at home in landscape orientation), and the notification shuts down but shifts back up after I let it go. This method of getting the notification works only occasionally. Why this? Why can not I always retrieve a previous notification? Sometimes it takes 10 tries to pull it down, and sometimes I give up before I get it down.

ios – Override the automatic brightness setting of the iPhone?

Apple seems to have completely removed the automatic brightness switching in the last iOS versions – the only "automatic" settings now apply to the light / dark mode and night shift.

I do not mind if the night shift changes the white point of my screen, but in normal daylight, I heartily refuse to constantly decide how bright the backlight should be.

I'm reading my book, it feels a little bleak for the ambient light I'm in, so I quickly adjust the brightness a bit higher …. As I read, I can see that the system just overrides and shuts me down.
So I turn it on … the system turns it off. Rinse and repeat ad nauseum.

I really feel it's something I should be responsible for.

Does anyone know the magic dance necessary to prevent this?

Enter image description here

Picture of settings in case I missed something Reall Really obviously.

ios – How to limit the frequency of calling a BGProcessingTaskRequest?

With the following code I try to limit the times that a BGProcessingTasRequest is called. I do not have to do it several times a day, just once, and I want to respect the user's battery life. However, when the code is tested, it will never be executed (even if a day is replaced by an hour). When I comment out the guard statement, the task is scheduled several times an hour. Is there a logical mistake or something that I do not think about? (I know that when the processing task fires mine Date saves too UserDefaults right).

private func schedulePersonalRecordsProcessingTask() {

        let request = BGProcessingTaskRequest(identifier: "com.myndarc.personalRecordsProcessing")
        request.requiresNetworkConnectivity = true 
        request.requiresExternalPower = false

        request.earliestBeginDate = Date(timeIntervalSinceNow: 60) 

        //Only update PRs no more than once a day
        let now = Date()
        let oneDay = TimeInterval(24 * 60 * 60)

        let lastBGTaskUpdateDate = defaults.value(forKey: backgroundTaskForPRLastDateKey) as? Date ?? .distantPast

        guard now > (lastBGTaskUpdateDate + oneDay) else {
            return }

        do {
            try BGTaskScheduler.shared.submit(request)
        } catch {
            print("Could not schedule app refresh: (error)")

How do I prevent floating point / decimal numbers in Google Sheets from being converted to text? (IOS)

I have a cell with the value 2.2, which is displayed as text. I can not convert the value format from text to number.

Screenshot 1 shows that the cell format is a number
Screenshot 1

Screenshot 2 shows that using the type formula, the cell value type is text

Enter formula info:

I am currently using Google Sheets v1.2019.46202 on iOS 13.1.3

ios – iPhone 6s Bluetooth Disconnects when music and videos are playing

Bluetooth can be easily connected to all Bluetooth devices such as car, headphones, speakers, etc. However, when music or videos are started, the Bluetooth connection will be disconnected immediately.

It works flawlessly when connected to the PS4 controller via Bluetooth.

I'm working with iOS 12.1.2 on the iPhone 6s jailbroken with the latest version of unc0ver. The Bluetooth connection is disconnected even when not interrupted.

I've tried all the methods to reset the network settings and disconnect and disconnect all devices without success. Before I do a factory reset, I'm just wondering if I can do anything to make sure it's not a hardware problem.

ios – Can I use Siri to remember a parking lot?

Can I save a specific GPS location with Siri and navigate back to it later? It seems possible, but I do not know what the language statement would be.

I occasionally use a car-sharing program that only offers two-way rentals. In other words, I have to leave the car exactly where I picked it up. It would be helpful if I could use Siri to mark the location where I picked up the car so I could later get a detailed navigation instruction to that car park.