Getting started with Baker Framework 3.2
Publishing a rich, interactive book on App Store is easy! Let's see how it's done!
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:
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.
Which device will you target?
Baker supports both iPhone/iPod and iPad, choose which platform you want to target and design your book accordingly.
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.
Now that your book is ready, let's wrap it up into a nice package to include it in Baker:
- 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.
- 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 contain 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.
Now it's time to see Baker 3.2 in action (this part is specific for Baker 3.2, an old and unsupported version). 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.
- A Mac. Sorry, there's no Xcode for Windows.
Ok, ready to go? Let's start testing your app on the simulator:
- Download the latest Baker Framework package and unzip it
- Replace the default book folder inside Baker with your own book folder
- Double click on the Baker.xcodeproj file to open the project in Xcode
- Check that the "Scheme" dropdown on the top-left corner of the Xcode interface is showing "Baker > iPad 5.0 Simulator"
- 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):
- You have to prepare the application from the iTunes Connect website.
- You have to create the compiled application for Release, following the instruction from the iOS Provisioning Portal under Distribution.
- 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 :)