BookShelf with book versions

BookShelf Embedded with book versions

this is an experiment of BookShelf Embedded. I added a feature to download a different version of a book such as English book01 or Japanese book01

Modified sample project is here. Please find _v suffixed folders.



command.setServerFolder("macos", "bookshelf")
--command.setServerFolder("win32", "bookshelf")

local books = {
    {project = "Book01en", serverFolder = "book01en"},
    {project = "Book01jp", serverFolder = "book01jp"},
    {project = "Book02en", serverFolder = "book02en"},
    {project = "Book02jp", serverFolder = "book02jp"},

local onLineImages = {
    {project = "Book01en", serverFolder = "book01en", image = "build4/assets/images/p1/bg@4x.png"},
    {project = "Book01jp", serverFolder = "book01jp", image = "build4/assets/images/p1/bg@4x.png"},
    {project = "Book02en", serverFolder = "book02en", image = "build4/assets/images/p1/bg@4x.png"},
    {project = "Book02jp", serverFolder = "book02jp", image = "build4/assets/images/p1/bg@4x.png"},


Project Properties > Monetization > In-App Purchase

Name : it also be used for the folder name in Book Server to store zip files

apple, google, amazon: For IAP Debug mode, please input the same value of Name field.

product IDs of the store services must be set for the final device build.

In versions field, input lang IDs such “en”, “jp”

For developing IAP Debug mode allows to test IAP with Corona Simulator

Please check the correct values are set in model.lua

the versions are added to in M.epsodes table

M.epsodes = {
    book01  = {
        name = "book01", dir = "book01", numOfPages = 6, 
        info = "book01 info", 
        versions = {"en", "jp"}

    book02  = {
        name = "book02", dir = "book02", numOfPages = 3, 
        info = "book02 info", 
        versions = {"en", "jp"}

when user purchase book01, user can download the default of book01 or en, jp. Kwik internally downloads or book01en/asset zip files or book01jp/asset zip files

for instance, Book01en is the kwik project of the version01 of book01

use copy_books.command to make asset zip files

MyCopy Book01en book01 en


page2-INFO has version01, version02 version03 layers.

“English”, “Japanese” are enabled to download each version once user purchases the book.

changes in the version model