Parsing WML on the iPhone - iphone

I have a WML based source of data which I need to parse in an iPhone app.
What would be the easiest way to achieve this?
I'm currently looking into the various XML libraries available on the iPhone but would appreciate a nudge in the right direction.
Currently playing around with ElementParser, it seems that WML isn't close enough to XML as I'd hoped..

What is the data going to be used for? If you want to be able to display a web page on the iPhone you might want to try running an XSLT over the WML to produce standard HTML that can be displayed easily (assuming your WML is valid XML).
The best library for doing this would probably be libxslt as the native iPhone libraries seem to be lacking in this area.

Related

Best way to convert this flash application to iphone compatible?

I have an interactive flash animation which i need to be able to use on an iPhone, embedded within an iPhone app.
I'm not able to link the animation here but a screenshot of the interface (which is pretty self explanitory) can be found here - http://imgur.com/i4bUgTB
It's a very simple interaction with just dragging answers into boxes and checking whether the answers are correct. My question is what would the easiest/best way to convert this to something that can be used on the iPhone?
My initial thoughts would be to use Canvas but i've not looked deeply into what it can do so I was hoping that someone could point me in the right direction.
Thanks for your advice.
Flash embeds logic inside it via scripts. What you are referring to is not an "animation" but a working application.
You should check this link if you use Actionscript 3, I never did that myself.
If the scenario of the app is as you describe, then using your flash sources inside your iOS app shouldn't be too difficult to achieve IMHO.

Stream screen from Mac to iPhone

I want to create a program that stream the screen of my Mac to my iPhone. Kind of like it is done in Liveview. I'm still relatively new to Objective-C, so I don't know where to start to make such an application.
It seems you have to have something installed both on your Mac and on your iPhone, but how would you actually stream the screen of your Mac to your iPhone?
Hope someone can point me in the right direction.
Update of question
Thanks for the answers. Still seems a bit vague to me and I'm not sure I really need full video streaming. Implementing also seems to be a pain, since there aren't any real good resources for it.
Taking a screenshot every second or so and streaming it to my iPhone as an image, would actually be ok. I've figured out how to stream an image with Bonjour from my Mac to my iPhone.
The screenshot I need to send to my iPhone is of the design that I'm currently working on in photoshop. I've figured out how to take a screenshot and how to get a list of all open windows. But how to make a snapshot of an open PSD-file, I don't know.
Any suggestions on that?
It's a very big subject, so not really something that can be tackled with a simple response. However, I would suggest that one approach would be to write a VNC client for the iPhone. Indeed, this open source exists that's probably worth a look:
http://code.google.com/p/vnsea/
Tim
I would go with the frequent screenshot approach. You would prepare a screenshot of the item you want to transmit and then use some easy library like my DTBonjour to transmit these objects via WiFi to iOS clients.
https://www.cocoanetics.com/2012/11/and-bonjour-to-you-too/
If you were using layer-backing then you could also use the renderLayer... methods which would also include sub-layers.
The most fidelity you'd get from encoding the individual screen shots in a streaming video format, though this is way more work.
This is called RFB (or RDP), and most remote-screen applications use RFB/RDP protocol and libraries which implement it.

Page-Based app load epub

I am new to iphone app developing and need to display an epub file in an app that I am working on. I would like to use UIPageViewController as that allows paging ect. As of yet I have not been able to figure out how to load the content into a uiwebview and still get the paging function. If someone could point me to any sample code that would help me I would greatly appreciate it.
You really can not use that, since you need ot use UIWebView. I do not think that any other view offers enough of a head start to make it worth it not to use a UIWebView.
There was a lot of discussion about this found here:
Reading ePub format
also see this:
Best approch for creating ePub reader similar to iBook or Stanza application

Android/iPhone Image parsing

I wanted to write an Android and/or an iPhone app that entails taking a picture of something (right now, I just want to limit to text) after which the app parses the text to make use of it. For example, perhaps taking picture of a sentence (or may be just fragments) will be then parsed by the app to bring up more information about the book. Title, author, ISBN etc. And even may be information about other books that are similar in content to this book.
Is this possible to do something like this? Is there an API that exists already that parses the content of an image? How is an image stored in Android and iPhone? Is it possible to implement the app in one platform and not the other?
I'd appreciate any input or advice that you guys have to offer. Thank you!
You're looking for this, possibly.
It's called OCR, or Optical Character Recognition.
Also check out ZXing a great library for decoding one- and two-dimensional barcodes. There are both iPhone and Android versions.

Newbie wants to create a PDF reader for ipod touch - what's the best approach?

I want to make a small app that displays a PDF, presenting zoom-able single pages with a previous-next page function.
The Core Graphics API is pretty much the same in Cocoa and Cocoa touch. Read up on CGPDFDocument, it should provide you with everything you will need to render PDF pages. You won't need to read the PDF spec or use a library to parse PDF files directly. You will probably to learn more about Core Graphics / Quartz 2D / etc. to understand how to use those functions inside of a Cocoa app.
Based on the gradually evolving Apple policy of rejecting application submissions that duplicate functionality already on the iPhone I would worry about spending too much time even as a newbie on something that is part of the core iPhone feature-set.
This is pretty trivial. The CGPDFDocument functions will allow you to do anything you'd want to do with a PDF file.
The iPhone and iPod touch can view PDFs already, as one of the TV adverts in the UK shows an email with a .pdf attachment (of swimming lessons) being viewed. It can also view .doc, .xls, and so on, so if he is creating a viewer type application then supporting those as well could be a nice feature addition later on.
This means there is a PDF framework on these devices that you will need to access. Presumably Apple can provide support here if he is a paid up developer. Syncing the PDFs to the device is the actual real difficulty, as this isn't supported by iTunes. I assume that you would need to write a network based synchronisation tool, or have an online cloud for holding people's PDFs.
The device doesn't support Flash, so using PDF to Flash conversion tools will not work.
I found this HTML5 framework that should work on an iPad http://bakerframework.com/
but I didn't test it yet.