We run some localization checks by taking screenshots in CircleCI. We compare new screenshots with images taken from what we expect - any differences are flagged.
The problem with CircleCI is MacOS Mojave changes the background on the time of day, so some of the images which contain part of the background are constantly flagged as different.
I have tried running all the commands I could find to remove or change the background:
via osascripts - it times out as I believe Mojave has the permission
popup. I haven't found a way to bypass it.
via sqllite - these commands don't seem to work with Mojave.
Ultimately this might not be exactly what CCI is built for, but it is necessary for us to run these tests in CI. Has anyone been able to disable desktop pictures? (Using xcode 11.1 image, which is MacOs Mojave)
For the record, I was able to get around this with a bit of a hack. CCI support were not helpful and unable to provide a solution, so I found opening safari was the only app I could find that would open mostly full screen. This then became the background.
Steps
Remove the dock, so any corner gaps still don't show the background
Open safari.app
There is still a thin sliver just above safari, but some python to put a block of solid colour there works for me.
Comparisons are then equal.
Code to do so:
defaults write com.apple.dock autohide -bool true && killall Dock
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
defaults write com.apple.dock no-bouncing -bool TRUE && killall Dock
defaults write com.apple.dock tilesize -float 1; killall Dock
open -a safari http://invalid.website # Not a real website, but shows an error. Otherwise create your own html page to open
Related
Lots of random commands simply don't work. I don't have any extensions enabled or OS level keybinding apps like karabiner or anything. I checked keyboard settings on mac and disabled anything with SHIFT+CMD+L and I still can't get "Select All Occurrences of Find Match" working in the interactive playground.
Nevermind, had to restart my computer after disabling the hotkey from keyboard settings. All works well now.
I've recently made an app and could successfully run and test it until this suddenly happened,
fail to run program
It doesn't looks like an issue, but the "run" button is unavailable. Usually it should look something like,
successfully run a program
As in the image, first there are two buttons, run and stop, after that there is the name of the program/app and its icon (fun facts) and then the iphone simulator it will run on (iphone 6). On the image on top, the failed to run program attempt, it is totally different, first the run button is disabled, second, the icon is a gear and not the app icon, and third, there is no simulator, it appears "my mac".
I don't know why this happened but this cannot let me run the app. I searched in the apple documentation and didn't found anything. If someone knows how to solve this please tell me.
The simplest solution is to rebuild your project from scratch. This is not difficult because you still have all your code. So, start with a new project from the iOS template. Copy your code from the old project into the new project.
And try to avoid renaming your project from now on, because there is a bug in some versions of Xcode where it crashes and destroys the project in just the way you describe in your question.
And update to the latest version of Xcode, because it is less likely to cause this problem (though in fact I have not found it reliable for renaming projects even now).
I've been trying to use the various Instruments provided in Xcode to check for memory leaks and some lag I get when using my Application.
However, despite looking at several tutorials. I keep getting an error every time I try to use Xcode. When starting the tests, I am greeted by a panel prompting me to pick an instrument.
After picking the Time Profiler, I hit Choose, and am immediately prompted by the following screen:
This usually isn't what I see in any of the tutorials. And it's also where the problem starts. No matter what I pick, or what Instrument I choose to import data with, I always get the following errors:
I was told I should reinstall Xcode. So after removing the Application, and reinstalling it, I tried again. Same error.
I've tried looking for solutions online as well. All I found was this similar SO Question
, which had no answer to it.
Does anyone know why this is occurring, and what I can do to resolve it?
This might work:
sudo chmod a+rwxt /Library/Caches/com.apple.dt.instruments
Open Terminal app from application.
Simply Copy & paste & then press Enter.
Exit Xcode, Then again launch the instruments with your testing app , this time it should load it then asking for selecting the templates from dialog box.
sudo chmod a+rwxt /Library/Caches/com.apple.dt.instruments
All d best.
I've developed and application for iPhone. It works fine on os4 but it does not work on os3.1. In fact works but there are some problems; after splash screen a what screen appears. while I leaving the application I can see the application is opened successfully but just see while exiting.
So I wonder if there is a tool which says which apis have problems with os3.1? So I have a chance to replace them.
If you want to check a specific API, just run this in your code somewhere with an appropriate response. For example, to see if print is supported, run this...
if (NSClassFromString(#"UIPrintInfo")) {
}
Set your project's Base SDK to iphone-os-3-1, then build. All the error messages about classes, methods, and functions that don't exist must designate things added since iphone-os-3-1, since your project built and linked fine against the iphone-os-4-0 SDK.
If you don't have the iphone-os-3-1 SDK, try this instead:
Open your project's Build Settings.
Find the "Preprocessor Macros" setting.
Edit it and add __IPHONE_OS_VERSION_MAX_ALLOWED=30100
Now, try building. This should cause everything introduced after iOS 3.1 to be labeled unavailable, producing the same errors as if you had switched to the iphone-os-3-1 SDK.
It's a good idea to get a second installation of Xcode for this situation, in this case you need 3.2.1 with SDK 3.1.3 - I wish I could help you with a download link since it is no longer shown on Apple's page, but I have googled in the past and found direct, official download links which will work as long as you are signed in with your developer account, so good luck.
The annoying bit is that you need to go through your project files and set "Base SDK" to 3.1.3 and then back once you have completed the exercise. But it is the easiest way to flag what you can't do in 3.1.3. "sudo rm -rf" (I feel nervous even typing that) has an excellent method there but you need to have an inkling of what might be safe and what might not before you implement it or else you end up with code 10x the size it needs to be.
Apple really needs to sort out this issue - hopefully by flagging methods that are prior to your specified "Deployment Target", in the same way that deprecated methods are flagged.
my client wants me to make an application which works on pre4.0 os... i understand that if i make 1 like that then it wont work on the latest os...
But my actual problem is that though i did the coding correctly coz the application was just a simple WebIcon... i cant load it onto the 7290 simulator...
i tried javaloader -u load MyApp.jad and javaloader -u load MyApp.cod... but i get the following error
Error: unable to open port...
earlier it couldnt find javac... so i placed javac in the System32 folder... now the below shown error is displayed and further the simulator doesnt connect with even the 4.0 IDE....
even tried compiling in the 4.0 IDE itself... but i get the following error...
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d MyDir
Don know wat to do... plz help...
screenshot of the simulator...
alt text http://www.freeimagehosting.net/uploads/d9e1840ce0.jpg
Well friends at last i tried uploading the applications .cod and .jad along with the optional .jar onto my company's server... and guess wat... it did download using the jar file but after trying all the techniques mentioned here... i guessed this was it...
But the application though gets listed in the applications but doesnt show up on the menu... and neither does it run in anyway...
Hence im closing with the research here... thanx a lot guys...
I load my programs doing the following:
(Note: This is on an Curve 8310--which has a memory card slot--not sure if you can plug in the phone and use it in HardDisk mode)
Plug the phone into the computer to enable HD mode
Copy the .jad, .jar and .cod to the memory card (or device memory in your case if HD mode works for this) of the phone
Click the Media Icon
Open the menu within media and hit explore (Here I have an option for memory card OR device memory) -- Select the device memory
Finally, find and select the .jad file -- the phone will ask if you want to download--just hit yes, and this will prompt for the install
Again, I realize this is a different (older) phone which you are using, so this method may not work.
Hope it helps!
Greg