Getting Started with iOS Newsstand App Automation - ios

I am currently testing few features of a newsstand app manually. The kind of testing I do is pretty basic. To list a few:
Launch and exit the App
Launch, Navigate to menus and Login, Logout
Launch, take screenshot of splash screen
Launch, test the color of some text.
and so on. As there are 100s of tests like this, I want to automate these.
I do not have a Mac. Are there any tools (open source preferably) for achieving this?
Please note that I am kind of learning this myself and my company would not provide the cost required at this time. Its more of a PoC. So, when I have something concrete they will support eventually.
Please advice what tool I can use to achieve this (I hear a lot of things about Cucumber but I dont know Ruby. I am willing to learn, if that is the only best tool available).
Also, a sample code snippet on how to launch a newsstand app on the real device through an automated way would be cool.
Thank you!

Apple provides a Automation f/w as part of Instruments.
There are various tutorials/getting started guides available. Try searching "UIAutomation getting started" in google.
Some other third-party options for iOS application test automation:
Monkey Talk
Calaba
Telerik Test Studio
UI Spec
I had evaluated these tools some time back and decided to use Apple's UIAutomation f/w. It has many flaws but we have been able to use it successfully.

You will need OSX and XCode for automation. All UIAutomation frameworks are based around the instruments executable provided by Xcode.
I can also recommend the Illuminator framework which I wrote to overcome a lot of the bugs and shortcomings in Apple's UIAutomation.

Related

Any way to run an iPhone simulator on a web app?

Is there an iPhone simulator plugin anywhere? We want to load some of our apps to our demo website for marketing purposes.
Does anyone know of anything that can do this?
Thanks
It's impossible, unless Apple releases some sort of plugin itself (which I can confidently say, will never ever happen). The closest you can get is to use some mockup templates/scripts to simulate the behavior of your app with Javascript/CSS/HTML5 canvas.
You can look into some web apps which provide similar functionality. Of course, not like the real thing, but at least, they can be a good starting point and even complete solutions for relatively simple projects. I've googled web iphone app mockup and got a few results: https://www.fluidui.com/editor/live/ or http://iphonemockup.lkmc.ch/ may be helpful.

Using packagemaker to build iOS app installer

I'm developing a sophisticated engineering calculation iPad app for a specific customer (much like the poster of this question). I'm getting ready to release a first version to them, and trying to get this distribution issue sorted out. There are pretty much 5 methods covered throughout that post (general App Store, B2B, Enterprise, Ad Hoc, and stuff requiring Jail Breaking), and most of the searching I've done has shown those same 5 options. I've been looking into TestFlight to manage the Ad Hoc distribution for beta testing right now, but down the road I'm going to need to allow my customer to mass install my app onto as many devices as desired (hopefully without needing to involve me at all by that point). So in the end, none of these 5 options are really attractive as a final solution.
A colleague found this App Doc that mentions something call packagemaker, which sounds like it's a Terminal tool, but I can't really find much on it (the Apple Doc simply says "create the package as you normally do", which is pretty much meaningless since I normally don't - and everything else I can find is from around 2009, and I've learned that anything described in those old posts is almost certainly wrong by this point when it comes to the Apple world). From what I can tell, packagemaker should let me build an installer executable that I can send to my customer, and they could just run that installer and it would put the app on their device. This is how we currently distribute similar software for Windows environment devices, and it would be ideal for what I'm trying to do.
Does anyone know if packagemaker can be used as I've described to install iOS apps? If so, can anyone point me toward a beginner-orientated tutorial on how to use it?
Packagemaker sounds like overkill. The old tuts should still work though, it hasn't changed much (or at all) since 10.5. It's a separate download from Apple Developer center.
You could use testflight, though I presume you want to install B2B apps, and not ad-hoc apps for testing.
In that case just create a bash script that builds and/or deploys your app to a connected device with xcodebuild and related tools. If you're concerned that your end user will find Terminal use appalling, write a tiny Cocoa app to support & run the script, and put the script and your iPad app into the bundle.
For example the app's User Interface could query the user for paths, the device, and whatever is necessary to deploy your app and pass it to the bash script which you can run easily with NSTask.
This is certainly going to be many times faster than getting into PackageMaker, and figuring out how it works - cause it really doesn't work in a straightforward way, unfortunately.

IOS Making Storyboards Quicker

I've a more experienced ios developer so I'm simply trying to streamline the storyboard creation process. I'm not a big UI guy and I'd rather be in the code than interface builder.
Does anyone know of a solution out there that can expedite this process?
I've looked at app creators like appcelerator an mosync but their just not flexible enough for the projects I've been getting in lately. I get mostly fireworks designs but sometimes I outsource some imaging for PSDs if that helps. Any suggests?

iOS sample projects to learn from

I am just starting iOS development. I read some tutorials, watched stuff on iTunes U and wrote some sample code myself. Now I want to take the next step. I want to learn about best practices for iOS development in XCode.
Are there any well written and well organized iOS projects that one could take a look at?
(As I see it, iOS is not exactly the place for open source enthusiasts, however.)
Thanks
Mike.
I agree with several of the other answers that state that looking at many, many projects for mini-examples of what you want to do in your own app is the way to go.
However, you asked for an example of an app demonstrating best practices.
You could do worse than to read Matt Gallagher's blog, Cocoa with Love from beginning to end. However, the app example you asked for is right here.
Not only will it show a variety of techniques, some novel design and best-practices, but also he points out where he feels that he might have done something better.
It's a great read.
I would suggest the following process: (it worked for me)
Think of an advanced app. that you eventually want to be proficient enough to create.
Make a top-down problem-solving tree containing the necessary skills required to build your final app.
Use this tree to divide your final app. into 'sub apps'. Start at the bottom of the tree, find a tutorial specifically for that skill, and make a "Hello World" app. that uses that skill.
Keep progressing upwards, creating 'sub apps' as you go.
When you are finally ready to make your final app. (it will take a while), you will have a good handle on how iOS development works. It will also be a great test of your knowledge via direct application!
Getting the hang of iOS development can be tricky; it really does require a top-down approach, and every online resource I've found takes a linear one. The only way that I think a linear approach to learning iOS development would be manageable, is to take it one small task at a time.
As for specific resources, I always google "[what I want to do] iPhone SDK" and browse the tutorials and forum posts that come up.
Here are some open source iOS apps. However, they aren't very well documented and are also very advanced.
TKAWebView - A subclass of UIWebView that handles authentication and downloading.
Welcome to your Mac - An iOS app. to VNC into a PC/Mac and do some cool stuff.
InAppSettingsKit - A settings screen creator for your apps.
Good luck!
The people behind the Parse platform have made two complete projects.
For each project there is the complete source code, a tutorial and the resulting app is also available from the AppStore.
Anywall: https://parse.com/anywall
Anypic: https://parse.com/anypic
They both rely heavily on the Parse platform as the data source, but you still get a feel for an iOS project.
Molecules is a great open-source app that uses 3D OpenGL to render complex models of molecules.
Just keep coding my friend. You'll learn over a period of time. The best way to get dirty in a mud fight is to jump into it... Weird analogy but you get the point.
Maybe someday, we all will learn from you then !
Like you said there many and many source codes are available internet, but most are incomplete.
I found some Open source codes of REAL application currently available through Apple app store are given here
Free iPhone App Source Codes of real apps
and also, you can find many answers here on stackoverflow question - Are there any Open-source iPhone applications around?
You can download free IOS sample projects from http://devcodemarket.com
I realize this is an old thread but I've also been looking for good objective-c code examples recently and I just realized that TextEdit's source code is available at the Mac Developer Library webpage.
Also, here are some popular objective-c libraries that have caught my attention:
CocoaPods
AFNetworking.
you can also go through UICatalog from Developers Library and download the sample code. just google it and you will find a project containing all basics of iphone.
I don't think there is any perfect project that can demonstrate all the qualities of great code. Developers have stylistic preferences and may make mistakes. That said, you should look at a lot of different projects and try to look at the conventions used.
I'd suggest starting on GitHub. Besides for seeing code, you'll see what libraries are out there, which may help further your projects later on. Here's the Objective-C page on GitHub.
(Also, I (GitHub link) think you're wrong about iOS devs not being in favor open source. Yes, there's money to be made, but you can't sell a CSV paring library on the App Store as is.)
Have a look at https://github.com/mozilla/firefox-ios
That is Firefox for iOS, written in Swift.
Cocoacontrols has a wide range of controls written using Objective-C & Swift.
I believe these days, this is one of the most famous website for iOS Developers.
But, before you jump onto this, you have to learn Objective-C & Swift very well, so that you will understand how to use the controls in your app which makes your app smooth.

How can I develop an iPhone application in Perl?

Could someone provide a good link to book about how to develop iPhone application with the Perl programming language?
Why would you want to use Perl? You'd miss out on everything the iPhone SDK gives you, and you wouldn't be in the iTunes App Store.
If you are trying to use Perl because it's the only language you know, just bite the bullet and learn Objective-C. Use the right tool for the right job. Despite how much I enjoy working in Perl, I don't think it's the answer to every problem.
However, if you did want to use the Perl route, you could use it to drive an HTML-based app. You end up installing a mini-website with local storage, etc, on the iPhone. Building iPhone Apps with HTML, CSS, and JavaScript is in O'Reilly's Open Feedback Publishing System, so you could see how to do that for free. Perl might be a tiny, server-side component of that.
Generally Perl is not a good choice here. Without jailbreaking the iPhone, you will need to compile perl into a static library and link it against your byte-compiled code (or build a small app that glues the two together). This seems a lot of work for little benefit, since Perl has no bindings to the various Cocoa and UI elements you'll need to manage your run loop. Why do you want to use perl here?
Jailbroken development is outside the license agreement. Searching "perl iphone" will give you several links on the subject, but I really can't go much further into that.
If you insist on Perl, relax your constraint on it being an iPhone "application". Make it a web application targeted for the iPhone!
Pros
You can use all the Perl you want! Even Catalyst!
Any version of Perl you want, in your own configuration.
Cross platform with other mobile/Internet devices.
Way easier to deploy updates and bugfixes.
Cons
Requires a constant internet connection.
Is accessible outside of the iPhone enviroment.
Isn't in the iTunes store.
Tradition breaker.
If you mean backend to a iPhone application (via XMLRPC), then we are all behind you I believe.
I think Perl is a fine choice for writing a web based mobile app.
mate it with one of these tools for creating a native look and feel for a variety of mobile platforms:
http://code.google.com/p/iui/
http://www.phonegap.com/
http://www.jqtouch.com/
my 2 award winning iPhone mashups run on Perl :)
http://imoviemash.com
http://imusicmash.com
Al

Resources