SDK Documentation & Reference.Documentation Pdf



General FAQ's


How do I add logo/splashscreen on application startup?

You need to add an image file - Default.png - to the project, and it will be used automatically by iOS. Note the Capitalised "D" - without this it will not be recognised.

How to set image behind page so it is visible when user scrolls page?

You need to add file "nk_background.png" image to the project, it will be used automatically by NimbleKit engine as a background image behind the scrollable webview.


Resources


Community Forums

Got an issue you want to discuss with other NimbleKit users? Or want to share a solution or some code? Check out the NimbleKit User Forums, where help & support is always available.

Tutorials

See the Tutorials section for a list of various How-To's.

Wiki

Check out the Wiki for user contributions and various resources.


Troubleshooting


Threading

There is a limit of 10 seconds for all javascript functions to run. Some NimbleKit functions are asynchronous and some of them synchronous, main problem here is even if you use synchronous function which runs for less then 5 seconds it still can be executed for more then 5 seconds if before there was a call to asynchronous functions which are still executing, synchronous function will have to wait for them to finish. For instance all functions related to interface elements are asynchronous and used during loading time to build interface. All of those functions will return immediately, but in background will still work, which means if you call something like file reading during load time you can end up with crash because all file operations are synchronous and it will wait for all background functions to finish. Solution to this problem is simple, load all interface elements in head section and if you need to do some synchronous operations on load time move them to separate function and specify it to "onLoad" property of body section, so it's called after all interface is loaded.

The "warning: no rule to process file" error and how to cure it

After adding a javascript file to a project, you might get an error message similar to this when compiling:

warning: no rule to process file '$(PROJECT_DIR)/jquery.min.js' of type sourcecode.javascript for architecture i386

Whenever a .js file is added to a project, Xcode adds it to the "Compile Sources" folder. Go to Targets (in the "Groups & Files" pane on the left of Xcode), click the arrow next to it, then click the arrow next to your projects name, and drag the .js file from the "Compile Sources" folder to the "Copy Bundle Resources" folder. Do a "Build - clean all targets" from the main menu to build again and the problem should have been cured.

Registering NimbleKit

After NimbleKit SDK is purchased, projects can be activated to run on iOS devices. To do that open project and navigate to file named YOUR_APPLICATION_NAMEDelegate.m and enter serial in "serial" field - for example:
Nimble *nimble = [[Nimble alloc] initWithRootPage:@"main.html" window:window 
       						serial:@"YOUR-SERIAL-HERE"];