Automating iPhone simulator and taking screen shots? - iphone

Basically im trying to automate the process of importing data and taking screen shots.
To import data I a feature to do this within my app.
I then need to move through various screens taking screen shots.
I've looked at some automated testing options but these don't seem to do screen shots or modify the ui so screen shots would be affected.

The best way to take screen shots with the simulator is to just press cmd + s at the right moment.
However, there is a better way involving some code: Automate Screenshots on iPhone Simulator?
I know that you can automate GUI tests, and it can take screenshots for you.
Hope this helped! ^_^

An iOS app built for the Simulator is really running in the Mac OS X environment, and so can call out to run shell scripts, sockets/pipes to/from other processes, etc., including launching an Applescript UI Script poking at the Simulator Menu Items and Save dialogs.

Related

How Do You Diagnose MAUI Splash Screen Issues

I use a custom PNG for the splash screen in my MAUI app. It works fine on all of the IOS emulators I run the app on. It works fine on the Android emulator it runs on. However, when I connect my physical Android device to my computer and deploy to it, the splash screen does not appear.
I've tried looking at the device log, but there are literally thousands of entries in there which make it problematic for troubleshooting. What are the recommended debugging or diagnostic steps I can realistically use to track this down?
EDIT:
I managed to grab the device log entries during the splash screen loading and thought I would paste them here to see if anyone can make any more sense of what's going on. Here's a color coded version of it that I formatted in Excel:

PhotoScroller Zooming/Appearance

I have been looking through the code and .xib files which are included in the Photoscroller app provided by Apple. Through all of this and a few internet searches I have not been able to locate where the button which controls whether the image is 1x or 2x zoom is located in the code or any events which are fired as a result of clicking it.
If someone cant point me to where this button is held that would be very helpful. My end goal is to implement the tiling in full screen so any advice on this would also be appreciated.
Thanks for any help you can provide.
The 1x/2x button is not in the application at all. The app is set to iPhone only so when you run it on the iPad it still runs at iPhone size. Any time you run an iPhone only app on an iPad it will display the 1x/2x button allowing you to zoom the app to a bigger size. You can see the difference by going to the Project Build Settings and changing Targeted Device Family to iPhone/iPad and running it again.

How to mirror Photoshop window to iPhone/iPad screen for mockup/development?

Is it possible to live preview a photoshop document on an iPhone or iPad? I tried it with VNC, but it only transfers a limited range of colors which is suboptimal. Is this possible with Apple's Developer Tools?
Easier, free way that works both on windows and mac : https://itunes.apple.com/lv/app/ps-play-for-photoshop/id651937919?mt=8
PS Play - works with Photoshop's Remote Connections (Edit->Remote Connections). Just add your computer's IP address and the password configured in Photoshop and you're done.
I came to this page with the same question. looked at the answer --> the app --> reviews and decided I'd use what I had to get it done. The results are awesome!
Requirements:
Iphone /Ipad App: Air Display ($9.99)
Photoshop CS4+
1.) Download Air Display.
Air display is by far the best app out there for mirroring or creating an extra screen with your iOS device. I looked at all flavors of VNC/DNS. VNC is for screen sharing and the results don't exactly make you cheerful. Air Display uses your iOS device as an extra screen like your desktop setup. $9.99 is premium pricing but well worth it. There are many uses for the app after you buy it. Check out their site here:
http://avatron.com/apps/air-display
2.) Setup Air Display
These instructions are covered in the app. You'll end up with this sort of setup:
Take into account your hot corners.
3.) Create a mirrored window for your document
Create a new window for your document.
Menu Bar --> Window --> Arrange --> New Window For [Your Document]
4.) Setup your window
A new document tab will pop up with the same name as the original. Drag this tab to your extra screen and there you go. Mirrored photoshop on your iOS device!
Now this new window will mirror the document on your main screen. The great part is this new photoshop window can be set up with its own View attributes (guides, rulers, etc). Here's some more tips:
You'll know your working with the right window when your in Photoshop and the main windows actions are greyed out. Now the menu bar will affect the mirrored window
Use These Settings:
Full screen
Fit on screen
Actual Pixels
Turn Off Guides (CMD ;)
Turn Off Rulers (CMD R)
There you go. An awesome mock up interface for Photoshop --> iPad
For anyone coming across this question now, check out Skala Preview (link below). If you have CS5 or higher, it even allows for live previews. Only problem for me is it requires iOS 5 and OSX 10.7, and I'm quite happy on 10.6.
http://itunes.apple.com/us/app/skala-preview/id498875079?mt=12
The only way that this would work built in (that I am aware of) is if a UIWebView managed to open it. Otherwise I think you're out of luck.
You could try manipulating a photo that is synced to the device then syncing the device with iTunes.
I'm more inclined to think that you would be better off writing an app specific to this task and just have it open the file over wifi or something like that.
I came up with using a Photoshop action which saves a PNG to a web server. Atomic Web Browser supports a full screen mode which then shows this PNG embedded in a HTML file which reloads once per second. It works good enough.
You've tried the rest, now try the best!
Xscope is an app for mac & iphone. Install it, and not only will it give you a bunch of useful tools, but one of those tools is called 'mirror'.
You simply:
Jump into Photoshop and go to Edit / Remote Connections... to set a password
Open Xscope on mac and put that same password in your preferences
Then in Xscope, click the 'Mirror' button, then the 'Photoshop' button (see http://d.pr/i/ziaC)
Open the Xscope Mirror iPhone app and press the button to connect to your mac
And that's it. You should then be able to see your canvas. The app also lets you scale the image larger or smaller based on ratios, and even take snapshots for later reference.
It's a pretty cool app. Promise to God I don't work for them!
http://xscopeapp.com/

Developing iPhone app to Run on iPad - Auto Set 2x

Is there a way to programmatically set the iPad to run the iPhone app at 2x as it is launched (yet keep the iPhone app native). I understand I can create NIB files for each hardware platform, but for ease, I just would rather the app launch as if the user had tapped the 2x on the iPad. Thanks...R.J.
No. The pixel-doubling malarkey is not under your app's control, and is pretty much a crutch for apps that weren't designed for the iPad. If you didn't go nuts with specific pixel measurements in the original code, it shouldn't be difficult to move to the larger screen.
It's not quite program control, but you can get an app to start up in 2x mode on iOS 4.2.
I've had a couple of apps that have always started up in 2x mode, and very nice it was too, but I only worked out why this was today!
Steps:
Run iPhone app (e.g., from Xcode)
Use '1x' and '2x' buttons to select desired zoom level
Press home button to get back to launcher
Double tap home button to bring up task manager
Kill your app (hold finger down until icons start to dance, then press the '-' button on your app's icon)
(If you ran under the debugger in step 1, Xcode will tell you the program got a SIGKILL, and might stop somewhere random in the call stack; you can ignore this.)
Now next time you run the program, it will start up with the zoom level you selected in step 2!
I didn't test absolutely every method of closing the program, but this preference doesn't get saved if you stop it from Xcode (e.g., using Run|Stop menu item), and it doesn't get saved if your program terminates using exit. Closing it using the launcher is the only way I've found so far...

IPhone application won't launch correctly

So I'm developing and iPhone game right now and everything has been working just fine when I test it on my first gen iPod touch. Last night, I added in some NSUserDefaults stuff to save a few variables for it. I ran it on the simulator a few times and it worked perfectly, but when I built the app and put it on my iPod, all I got when I launched it was a black screen. Anyone have any ideas? They would be much appreciated, thank you.
I recommend deleting the application from your iPod Touch first then trying to install it again. When are you trying to read from NSUserDefaults? In your applicationWillFinishLaunching call? If so, try to comment that out to ensure that it really is the source of your problem.
You need to run it on the iPod touch with the debugger switched on - you should be able to track this down.
Do you know about setting a breakpoint for exceptions - if you tell the debugger to break on objc_exception_throw it is extreemly useful in these cases.
Do you have a custom Default.png file? If no, then you will see a black screen while your application loads. Depending what type of (possibly unending) operations you are doing on load this might be the reason you are seeing a black screen. Remember the simulator runs on top of the processor in your mac which is significantly faster than the processor in your iPod Touch.