Viewers: in countries Watching now:
The iOS software development kit (SDK) includes the popular SQLite library, a lightweight yet powerful relational database engine that is easily embedded into an application. In this course, Bill Weinman teaches you how to build an RSS reader for iOS devices, integrating XML data and a streamlined interface. He explains how to use the SQLite database, display information in a table view, code view controllers, and create a preferences pane for your app. The resulting application is optimized for all iPhone and iPad displays.
Now, we have a working webView and we'd like to be able to pass pages off to Safari as a full-featured mobile web browser. Let's see how we do that. We'll navigate here to Chapter 6 of our exercise files, and we're going to make a working copy of our webView-02. I'm using the -done version. You can use the version that you created if you've been following along with the exercises. I'm going to rename that to -03 and open it up in Xcode by double-clicking on the Xcode project file here in the project folder.
So, I'm going to minimize that and come back up here to our actionButton method. And this our actionButton that gets called whenever we press that button. It has an NSLog right now. So, if I run this in the iPhone Simulator, and I'll bring up a page here, and you'll notice when I press this button, instead of launching Safari, it just displays this log message that says the URL that's been called.
And so I'll come back here in Xcode. I'm going to press Command+. to stop the simulator. I'm going to minimize that down there, and we're just going to replace this line with the line of code that will actually call Safari. And that looks like this. It's a method call on an object. So, I'm going to type in UIApplication.sharedApplication and openURL. And for the URL itself, I'm going to call self.webView.request.URL.
And so the webView itself keeps a copy of the URL for the current request that is being displayed. And so that gives us the URL. This openURL method is called on UIApplication.sharedApplication. So, UIApplication is a centralized point of control for all iOS applications. It provides access to system resources. sharedApplication is a property that gives the application instance, the individual application that you are using. So, you call methods on the sharedApplication property within UIApplication.
openURL is the system entry point for opening a URL resource with the associated application. Our HTTP or HTTPS applications will open in Safari. So, let's go ahead and run this in the Simulator, pressing Command+S to save and clicking on the run button here. And now, when I bring this web page up and I press this button here, it will load up Safari with that URL.
So now, we have a complete working webView. It's really a very simple task. Cocoa Touch provides a simple delegate-based webView that's powerful, flexible, and easy to implement, and it works very well.
Find answers to the most frequently asked questions about iOS SDK and SQLite: Building Data-Driven Apps .
Here are the FAQs that matched your search "" :
A: The RSSDB library had to be updated to work around a bug in the iOS 7 SDK.
There is a bug in the iOS 7 SDK that prevents the BWDB fast enumeration implementation from working on a device. The symptom is code that runs fine on the emulator, but not on a device. iOS devices use an ARM processor, while the emulator runs on your Mac's Intel processor. This points to the LLVM ARM code generator as the source of the bug. Because the bug appears to be in the LLVM compiler, it may be some time before it is fixed.
As a workaround we have changed the getFeedIDs and getItemIDs methods in the RSSDB library so they don't use Objective C fast enumeration.
Please note that this same bug also affects some of the BWDB testbed code in Chapter 2. The result is that it will run on the emulator but not on a device.
"Used type va_list (aka_builtin_va_list) where arithmetic or pointer type is required"
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.