How to create a new Appemble App for iOS

Steps for creating a new app

  1. In Finder - Copy appemble-ios-template. Rename appemble-ios-template to name of your project.

  2. Click on yourProject. You will see 3 files.

    • appemble-ios-library
    • appemble-ios-template (Cannot be renamed in finder)
    • appemble-template-workspace.xcworkspace (Can be renamed. On pressing enter, a dialog pops up. Click on close.)
  3. Double click on the file with extension .xcworkspace. This will launch xcode and open this project.

  4. Click on Project Navigator and then rename appemble-ios-template to your desired project name, by single tapping on the project name. Clicking it once will make the name editable. Enter your project name as shown below.


    _images/newproj3-small.png

    Once return key is pressed, you will be prompted to change at a list of places say Rename to that.


    _images/newproj4-small.png

  5. Click the project, go and select Target with the same name, for e.g. in the figure below, project was renamed to yourproject and there is a Target with name newproject. After target is highlighted, go on Summary tab and change Bundle Identifier property from com.appemble. to com.yourcompanyname.

    Note

    Bundle Identifier is an important property which uniquely identifies your app on Apple app store.

    _images/newproj5-small.png

  6. In yourproject/Project/Application/appinfo.plist, replace the appemble-system.sqlite and appemble-content.sqlite as required, as show in fig. below.

    _images/newproj-appinfoplist.png

  7. In yourProject/Project/Resources/xmldblib/config.properties, replace db appemble-system.sqlite with yourProject-system.sqlite that you specified in the above step.

    DATABASE_NAME=``appemble-template``-system.sqlite

    Note

    The name of yourProject-system.sqlite in appinfo.plist must match with the name in xmldblib/config.properties

    _images/newproj-config.png

  8. In yourProject/Project/Resources/assets

    • Rename appemble-content.sqlite with yourProject-content.sqlite that you specified in the above step.
    • Rename appemble-system.sqlite with yourProject-system.sqlite that you specified in the above step.

    Note

    The name of yourProject-system.sqlite and yourProject-content.sqlite in appinfo.plist must match with the name in assets folder

  9. In yourproject/Project/Resources/app-def, modify or add new files as per your requirements.

    • screen_deck.xml
    • appearance.xml
    • your screens
    _images/newproj-dirstruct.png

  10. Image files go in yourproject/Project/Resources/images folder

  11. Good to have optional step - Change Scheme.

    • Click on appemble-ios-template in scheme
    _images/newproj-temp-managescheme.png
    • Click on Manage Schemes

      • Select Scheme appemble-ios-template, click on - at the bottom to delete it.
      _images/newproj-templatescheme.png
      • Click on +, it will show Target as yourProject and Name as yourProject. Click OK.
      _images/newproj-scheme.png
      • Select iPhone/iPad x.x Simulator (If My MAC x bit is selected, you will not be able to run the project)
      _images/newproj-finalscheme.png
  12. Click on Product -> Run

    This will launch the application on iPhone Simulator. You just created your first application successfully!!

Good Read

Tutorials

Frequently Asked Questions

I cannot click on the name of the project in order to rename it. It is not becoming an editable field.

Click on Navigator button, the leftmost button below Run

_images/newprojfaq1.png

When I click on Product, Run is not active?

Make sure that the scheme is set to iPhone Simulator.


When I run, I am getting blank screen?

Make sure that yourproject-system.sqlite file is there in yourproject/Resources/assets. If it is not there, then right click on assets and click on Add files to yourproject. Select the files and click on Add.


How to add images?

In Finder, go to yourproject folder and in yourproject/Resources/images add the images. When you are in XCode, right click on the yourproject/Project/Resources/images folder, click on Add files to yourproject. Select the files and click on Add.