Variable check failing on one computer but no where else

Hello,

I am new here and the only reason I have registered is because I am totally stuck with a very strange problem and I am hoping someone here may be able to help me please.

Have developed a lot of code in the past, but I am relatively new to xCode and Swift.

I followed the really great tutorials here on creating a NSTask application and everything is working perfectly, I have had 7 people test the app and they all give glowing reports. Except the person I am building the app for :frowning:

I have a command line script that executes without problem and in a captureStandardOutputAndRouteToTextView function I check the outputString for certain values. If those values are there then variables are switched from false to true.

Then in the main taskQueue.async terminationHandler section of the code I check to see if those variables are true or not and if they are adjust the UI so that the user can move on to the next stage, or an error message is displayed.

The problem is that even though the values are all true, the check is failing on just one computer. Does anyone have any ideas why this might happen please?

Thank you for your time and consideration :slight_smile:

This makes me wonder if you have some default formatting in that string, and it is different in a different locale. Dates and numbers can come out different in different places.

1 Like

Thanks @sgerrard :slight_smile:

I did think about this, the string is encoded to UFT8 and I would imagine this is enough, but I could be wrong?

let outputString = String(data: output, encoding: String.Encoding.utf8) ?? ""

I have had an update from the person I am building the app for and apparently ‘it’s started working’, which is great, but it doesn’t explain what happened and why.

I can’t fix something that isn’t broken, it’s kinda irritating :smiley:

Hi @kel,
glad that you have got it working and I wouldn’t be able to provide any solution.

I have also faced a couple of such clients, remotely and otherwise, where when they test something in their own environment, there are a lot of steps that they can miss or omit and simply provide feedback “It does not work”.

In fact very recently, I have some Testers in an Enterprise environment that simply keep posting screenshots and changing the workflow of stories, etc. It helps to setup and monitor the environment and running when you require an approval.

I have even had someone that entered the wrong username and password complain that the app does not work.

That’s life and that’s clients.

cheers,

Jayant

This topic was automatically closed after 166 days. New replies are no longer allowed.