Getting Start with Baker eBook Framework !!

Posted: January 25, 2012 in iPhone Dev

Creating a book for Baker is like building a website, all you need to start is:

Assuming the points above have been taken care of, the next step is answering these questions:

  1. How will you divide your book in HTML pages?
    Baker books are composed by multiple HTML pages. Since HTML pages aren’t limited in length you can choose to have a whole chapter of your book on a single page.
  2. Which device will you target?
    Baker supports both iPhone/iPod and iPad, choose which platform you want to target and design your book accordingly.
  3. Which orientation will you target?
    Baker supports both landscape and portrait orientation, choose the one you like for your book… or provide a beautiful style for both.

If you have an answer for all these questions then you can really start to create your book. Remember that you can take advantage of all the HTML5 and CSS3 features and all the JavaScript libraries available for WebKit. If you want to test how your work is coming along, try your pages in Safari Mobile: Baker will render them in the same way.

Package

Now that your book is ready, let’s wrap it up into a nice package to include it in Baker:

  1. Create a folder called “book” and copy all your book files into that. All the HTML files and book assets must be in the “book” folder, no file outside the folder will be seen by Baker.
  2. Create a file called “book.json”, with all the parameters required for Baker to display your book correctly. This file is known as a manifest and it must conform to the HPub standard. Here you’ll find a complete explanation of all the parameters available.

After these simple steps are completed, your “book” folder will be an HPub package, ready to be baked into an app!

Bonus: as you may have noticed, the HPub package is just a list of HTML pages. This means that, once you make sure all the pages are linked to each other, you can publish it on the web without any additional work and your users will be able to view it in a standard browser.

First Build

Now it’s time to see Baker in action. There are two things you need before proceeding:

  • The latest version of Xcode, which you can download from the Apple Developers website for free if you are a registered Apple developer. If you are not yet registered, you can enroll into the iOS Developer Program from here.
    If you don’t care about registration and want to test Baker only on your local machine then you can download Xcode from the Mac App Store.
  • Mac. Sorry, there’s no Xcode for Windows.

Ok, ready to go? Let’s start testing your app on the simulator:

  1. Download the latest Baker Framework package and unzip it
  2. Replace the default book folder inside Baker with your own book folder
  3. Double click on the Baker.xcodeproj file to open the project in Xcode
  4. Check that the “Scheme” dropdown on the top-left corner of the Xcode interface is showing “Baker > iPad 5.0 Simulator”
  5. Click on the “Run” button

If all is well you should see your Baker app opening up in the iPad Simulator and displaying the first page of your book.

If something went wrong, try to re-run after a complete cleanup: remove the app from the simulator (delete it as you would do with an app on an actual iPad) and clean the Xcode build by selecting Product -> Clean Build Folder…(you will need to press the alt button while opening the Product menu to see it)

Customize your book

You’re almost done. Now let’s put a little icing on your app before you send it to the App Store.

  • Rename your app
    In the Project Navigator sidebar select “Baker” (topmost entry) and then press the “enter” key: you should then be able to change the name. Rename the project as you want (this will be the name of your app on the store).
  • Choose targeted device family
    In the Project main window (it should have opened when you clicked on the topmost entry in the Project Navigator) click on “Build Settings”. Search for the entry “Targeted Device Family” under the “Deployment” section and choose the devices you want to target from the dropdown menu.
  • Choose iOS deployment target
    In the Project Build Settings, right under the “Targeted Device Family” entry, you should see another one called “iOS Deployment Target”. Choose for which version of iOS your app should be available: Baker should work from iOS 4.0 to the current latest version.
  • Change your application icon
    You should provide some custom icons for your application. Follow the Apple Custom Icon and Image Creation Guidelines for creating them and then replace the icon files in the Baker “Resources” folder with yours.
  • Check out Baker extension HPub parameters
    Other than the standard HPub settings, Baker offers a series of parameters to customize your book’s look. They are listed and explained here.

That’s it. Now try to run your app in the simulator again as you did before: if all is well then you are ready to go!

Don’t trust the simulator too much: remember that your users will see the app on a real iPad or iPhone. Always test your publication thoroughly on an actual device before releasing it.

Publish on the Apple App Store

To deploy your app on the App Store follow the detailed instruction provided by Apple (requires login):

  1. You have to prepare the application from the iTunes Connect website.
  2. You have to create the compiled application for Release, following the instruction from the iOS Provisioning Portal under Distribution.
  3. You have to upload the compiled application.

This is entirely managed by Apple, so you can use their official channels and tutorials to try to understand how to do it.. or ask on the web. There are also some interesting additional tips from Apple.

That’s all folks, Cheers 🙂

Credit From: http://bakerframework.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s