iOS - Setup DevApp
As part of setting up module, you will be already configured with Q2DevApp
within your
module folder.
q2-demo-ios
├── Package.swift
├── q2-demo-ios
│ ....
├── Q2DevApp
│ └── Q2DevApp.xcworkspace
├── ....
└── settings.json
In order to use specific online banking URL tied to your sandbox update settings.json
located at root of the repository.
Overview of settings.json
The settings.json
file, located at root of the repo is a key configuration file used to
define the behavior of your Q2DevApp
during development. It closely mirrors the
configuration of the Q2MobileApp
, ensuring that your module behaves consistently both in
development and in the final app. By correctly setting up this file, you ensure that your
Q2DevApp environment is properly configured to run the modules you are working on.
This guide explains the structure of the settings.json
file, what each section does, and
how to modify it to suit your development needs.
Key Sections in settings.json
-
targetURLBase This is the base URL that points to your online banking environment (such as your sandbox, sales demo (a.k.a. SDX), or any other environment you are working against). In most cases, this should point to your sandbox environment.
-
targetPageName This is typically set to
"uux.aspx"
, and generally, you should leave it as is unless otherwise informed. It represents the base page for your application, but it can be extended with additional parameters if needed. -
enableDevMode This is typically set to
true
in order to enable developer mode to view console log in Safari Javascript console and some other developer feature. -
modules This is an array of objects, and it’s one of the most important parts of the configuration. It defines the modules that will be loaded into the DevApp. When you develop a new module, you will add it to this section. We will discuss how to configure this section in detail below.
Example of settings.json
Below is an example of a typical settings.json
file for DevApp:
{
"targetURLBase": "https://stack.q2developer.com/sdk/native/ardent",
"targetPageName": "uux.aspx",
"enableDevMode": true,
"modules": [
...
]
}
Understanding the modules
You can read further around what should go in module by going here: Configure Settings for Module
Key Considerations
-
nativeLogin
andpush
flags can generally remain set tofalse
unless you are specifically told to disable them. -
targetURLBase
should ideally point to your sandbox environment to match your development setup. However, it can also point to other environments if needed.
Conclusion
By understanding and configuring the settings.json
file, you ensure that your Q2DevApp
setup is correctly aligned with the Q2MobileApp environment. This configuration allows you
to maintain a consistent development experience and ensures that your modules are properly
integrated into the app.
Once you have updated your settings.json
to reflect your environment, you are ready to
configure settings for module.