Creating overlays for different apps in OSX - swift

I want to create an app for OSX which would work as an addon (displaying some overlaying information) to other app. Something like Poker Tracker for example - it shows extra information for poker games while playing on tables.
Just wondering is it possible using Swift? Can you point me to some direction what to look for? some libraries helping with such case? Never developed anything for OSX but keen to learn.
Thanks in advance.

Just wondering is it possible using Swift?
Yes, you can use Swift to create macOS applications. It's not magic, though -- your Swift code can only do things that are actually possible.
Can you point me to some direction what to look for?
Look for an API that lets other apps interact with the host application. That API will define what your "add on" application can reasonably do.
Without some sort of API or scripting interface, it's going to be very difficult to write a program that interacts with the host application. The best option is probably the Accessibility API in macOS. Accessibility is meant as an assistive technology, but it's often repurposed for tasks like automated testing. You might be able to use it to gain some level of control over the host app.
As far as I know it doesn't expose any API, so it would need to be image scraped.
This is really a tall order, and doubly so if you're asking basic questions about language capabilities. I think you'd have much better luck creating an efficient user interface so that the user could enter the relevant information directly, e.g. what cards the other users are showing, bet sizes, etc.

Related

iPhone Application logic

I need to develop a client application for a site that host and show images.
The client should shows all new images and take a picture and send to website.
I'm a newbie to iOS programming so this question:
In an application alike this, there's the need to create a Model? I ask this question because I think I can do anything with Controllers but maybe I'm wrong.
While there is never a "need" to create a model, it's good form to do so, and it'll likely save you many headaches down the road. Ultimately, you're going to need to deal with images and websites and how they interact with each other and whatnot, so you might as well do it in models from the outset.
I'm as guilty as anyone for wanting to see immediate results and hack together something quickly, but I always regret it later on, and have to spend more time than I'd expected refactoring it into something usable.
The MVC pattern as used in Mac OS and iOS applications isn't something best explained in an answer box but here's a link to some simple documentation about the roles of Models, Views and Controllers
Some good basic introductions to start with, which also have relevant links to the next stage of documentation are:
Cocoa Core Competencies
Cocoa Application Competencies for iOS
Read these excellent articles first. You'll learn better and faster if you do some basic reading.

Should I learn how web frameworks work before I use them?

I'm interested in creating a basic web application (for learning, but I want to finish within a few months), and I've read that using a web framework can make that task much easier.
After reading about different frameworks online, it seems to me that using frameworks would hide a lot of detail on they work. I fear that if I use a framework, I won't really know how my website is running.
Is it important to understand how frameworks do what they do, or am I worrying too much? (eg. I don't know how the Linux kernel works, or the C compiler, etc.)
Even if you don't have a particular interest in web frameworks, I would say it's good to play with a few and then crack them open if only for the exposure to new design patterns and solutions that can be applied anywhere in development. (MVC in particular when talking about most web frameworks)
It is (to some extent) important to understand how frameworks work, but you'll never learn that without using them.
So, start using some framework and you'll get basic understanding of it. And then, if you have interest, you can always dig deeper into it (maybe even submit patches and participate in its development). But not in the opposite order.
Using your analogy, you don't become Linux kernel developer without being Linux user for some time.

Advanced iOS Interface Design?

I've done a bit of iPhone development (3 apps in the appstore currently) but the interface has been pretty plain. I've used the stock components for the most part (UITableViewController, etc.) with a little bit of customization, but for the most part everything looks pretty generic. I'd like to get started developing apps with a richer user interface, but haven't found any good resources to get me started.
What resources have you all come across that outline how to create more advanced iOS interfaces (both iPhone and iPad)? Books? Blog entries? Just looking at the apps I have installed right now, some of the interfaces I've been very impressed with are the ESPN Score Center, XFINITY TV, Facebook, etc.
What about 3rd party interface component libraries? Are there any you recommend that provide more advanced interface components than those in the stock iOS library?
I'd love to take a look at any resources that you recommend for getting started.
I love Ray Wenderlich's tutorials. He's got one on Core Graphics which allows you to draw your own Table Views with headers, buttons, and bezier-curved footers!
Here's a little secret that often gets overlooked: a lot of the cool UI elements you see are stock Apple elements that have been customised to the brink of no return.
The main reason for this is Apple have put a lot of time and effort into making components that just plain work. A UIScrollView, for example, has had many more combined hours of testing than any app you write could hope to achieve.
The trick is to know exactly how to customise elements. A UITabBar is a good example: I've seen several apps that use their own custom tab bars. The problem is, often they don't handle edge cases particularly well. You might have issues if somebody tries to hit two items at the same time (I've actually seen an app that used their own implementation of a tab-bar crash if you pressed two items at the same time).
But if you use Apple's UITabBarController and either subclass, categorise, or otherwise overload it to get the customisation you want, you get a lot of the low-level event handling stuff for free.
You would be amazed with what you can do with a UITableViewController, and you get things like view recycling for free (some of the apps I've worked on have things like independent cell resizing, customised animation of cells, horizontal implementations of a tableview, etc).
Not a particularly useful answer, I grant you, but the point I want to get across here is once you've designed your kick-ass UI step back and consider what can be achieved with the existing toolset before rolling your own. You'll thank me when you come to bug fixing!
I also like Three20. Until now I didn't use it in my projects, but I played with it. And there's some really cool stuff in it. ;-) I think that's one way to extend your standard User Interfaces.
Another really cool part is designing your own elements. I like this really. Because you then have in your App something nobody else has. :-D
I've started looking into using Opacity for Mac, it's a pretty neat desktop application where you can generate your own graphical elements (buttons, switches, icons, etc) and then automatically generate the CocoaTouch / Quartz2D classes and headers to drop in your app ... Some elements work best when they're natively drawn on the device, rather than stored/loaded as pngs, or whatever. Moreover, you get #2x Retina display support for free. While not an interface dress-up framework, the fact that it generates Quartz2D code for you makes this a real contender for anyone who's remotely graphically creative but short on complex 2D programming skills.
Speaking of beautiful interfaces, if you're looking for inspiration or actual graphical elements to put in your interface, I frequently get some great ideas at 365psd ... they actually provide the Photoshop documents to reproduce some eye dropping UI goods, for FREE. Some places may just give you a PNG, but this does little good if you want to scale it (#2x or iPad) or customize it to fit your needs. It's like open source for graphical UI design.

Designing a iPhone application

I am into designing a new iPhone application. My application is will contain almost all iPhone SDK concepts including core data, server integration, location services. Is there any design decisions I should keep in mind?
My plan was to go by designing a controller class for each iPhone app screen and also any utility classes to be used. Any guidance will be really appreciated.
I forget who said this first, but it goes like this: The first project you do in any new technology will probably be very bad!
This is similar to these sage words from Fred Brooks - "Plan to throw one away; you will anyway"
So the best way is to wade right in, get dirty, light up the dark corners and learn what works for you. Then you'll most likely have some very specific questions based on your experiences!
This is a tough subject to talk about generally. Design approaches that work for some will fail for others.
It would probably help to know more about what you are trying to do. For a counter-example, I'm working on a game. I create an OpenGL context and from that moment on I'm managing assets like shaders, textures, mesh data, sounds,... . The way I've designed my project will pretty much be useless to you.
However the best advice that I can come up is to really figure out what you are trying to do. Create mockups of your GUI and document workflows. Do sketches of GUIs. Become an expert in the domain in which you want your application to work. Develop a deep understanding of what you are trying to do.
Once you have the GUI figured out, start working on the other end of the Model-View-Controller approach - figure out what data you need in order to provide the GUI that you've designed. Not all data structures are equal. What's the best data design for the domain you're working on?
Once you have the view and model figured out you need to glue everything together with controllers. There's lots of trick and traps here. Do you use threading to prevent the GUI from blocking? Do you make direct calls to objects or do you decouple and use notifications?
But this is the public appearance of your application. You might want to track usage data - consider what you wish to track and append that to your design. Errors happen, so think how to approach them.
However, it's hard to be more detailed without more details than what you've provided. Every application has it's own quirks and gotchas. It's nearly impossible to talk about this in a general sense.

IPhone: Creating a Facebook like UI, Skinning Apps, Not following the AHIG

How do you design a UI like Facebook?
Is it hard to implement a custom skin into a iphone app? How is it done?
Do I need to follow apple's guideline? What if I don't want to?
How do you design a UI like Facebook?
Facebook's iPhone app appears to be built around using UITableView in various guises. It looks like it adheres to the Apple Human Interface Guidelines.
Is it hard to implement a custom skin
into a iphone app? How is it done?
Skins are just graphic elements that are designed to have their image components swapped out. They are not difficult to implement.
Do I need to follow apple's guideline?
What if I dont want to?
Apple will not penalize you for a non-standard interface. The only interface restrictions are (1) some issues of obscene content and (2) you can't create the illusion that the device itself is broken, has crashed or otherwise failed.
A bit of advice. Don't use non-standard interfaces.
Good interfaces are almost by definition standardized so that users don't have to think about them. Novel interfaces slow users down even if they have no problems otherwise. Just try switching rapidly between Mac, Windows and Linux sometimes. None of the interfaces has major problems per se but having to stop and think how to do something in each particular interface is a pain. You can create the same problem by using a good but non-standard interface within an app.
That is assuming of course that you can actually create a good interface. There are far, far more ways to make bad interfaces than there are to make good ones. Most interfaces fail even those designed by interface gods. The standardized interfaces are the result of tens of thousands of hours of testing and years of experience. You're unlikely to whip out something really new and useful your first time out.
If you try something novel I suggest you mock it up first and then test let people test it without giving them any instruction. You'd be surprised how complex it can get. We used to just make photoshop mockups and then ask test users what they thought each element did or which element they would choose to accomplish a particular task. We were surprised at how poorly our (the developers) perception of the interface overlapped with the perception of the users.
In sum, a novel interface is more likely to hurt your app than help it.
With regard to how to build an app like Facebook, check out Three20. In particular, the TTLauncherView is the class that implements the Springboard-like grid of icons.
3- You don't need to follow the AHIG. But be careful if you don't, because it's very easy to go wrong doing so. Users like to not have to learn anything new. They know the typical Apple software UI, so if you use it, users will know how to use your app as soon as they buy it. If you don't use it, it is important to make sure that the UI is exceedingly easy and intuitive, and looks good to an iPhone user's eyes (and fingers).