What is the Perspective Mobile App?
The Perspective mobile application enables users to access and interact with their Perspective projects from their mobile devices. Similar to a Vision client and Perspective session, the app needs to be connected to a Gateway for users to access their Perspective projects. While you can launch a Perspective session on a mobile web browser, the app enables built-in hardware from the mobile devices, such as the camera, the accelerometer, or the NFC Scanner.
How Does the Mobile App Connect to the Perspective Project?
The Perspective mobile application incorporates a webview component embedded within native code. Initially, it performs several straightforward HTTP requests to retrieve Gateway and project information initiating the webview. Once the preliminary data is obtained, the webview loads the project’s URL directly.
Additionally, we utilize JavaScript injection within the webview to manage Native Actions, such as location and NFC functionalities. These actions are also handled through the webview.
For more information on webviews:
- Apple: WKWebView Documentation
- Android: WebView Documentation
Troubleshooting Limitations
Remote debugging of the running Perspective client from a PC or Mac using Safari or Chrome is not possible due to the following sandbox restrictions:
- No Stack Trace: There is no stack trace available for debugging purposes.
- Log Management: Logs are discarded upon relaunching the application, which limits the ability to review historical data.
- Mobile App Logs: The only real method for debugging is through the Perspective mobile app logs.
Best Practices for Troubleshooting App Connection Issues
Baseline Checks for Projects not Appearing
One of most common occurrences unrelated to connection issues is missing project selections when the mobile app is opened. If you are experiencing this scenario, make sure the following items are true:
- The project should not be marked as inheritable.
- Project Properties > Perspective > General > “Hide from launch page and apps” should not be checked (unchecked by default),
- Must have Views in the projects.
- Browser is pointed to the same Gateway as your Designer.
https://forum.inductiveautomation.com/t/perspective-project-not-appearing/30866
Can the User Reach the Gateway from the Phone’s Browser App?
If a user cannot connect to the mobile app, but can still reach the Gateway, consider the following:
- Firewall/network shouldn’t be an issue especially if the project can be opened in the browser.
- There is likely an issue with the configurations or the app itself.
Can Other Users Connect to the Project using the Mobile App or is it Just This User?
If other users can connect to the mobile app, consider the following:
- Verify the user’s permission and roles within Ignition Perspective, and ensure that the user is allowed access.
- Check the user’s credentials.
- Review network and device issues that could be affecting the connection.
Look at the Perspective App Logs
The Perspective App Logs may contain relevant errors or warnings that can assist with troubleshooting.
How to Obtain Perspective App Logs
For IOS
You can obtain the logs in the Perspective app for IOS by following these steps:
- Open Ignition Perspective app.
- On the top left corner, tap on the settings icon.
- Tap on View Logs.
- You’ll be asked how you want to save or view the logs.
- You can email the log to yourself.
- After saving, you can open the log with a text editor (like Notepad++).
For Android
You can obtain the logs in the Perspective app for Android devices by following these steps:
- Open Ignition Perspective app.
- On the top right corner, tap on the settings icon.
- Tap on Advanced Settings.
- Tap on View Logs.
- You’ll be prompted to open the log with your choice of text editor.
How to Read Perspective App Logs
The following log entry below indicates a successful GET request to the specified URL.
To better understand the GET request above, review the following variables defined below:
- Timestamp: This indicates when the log entry was recorded, including the date and time (with milliseconds).
- Request Type: GET: This indicates the type of HTTP request being made.
- URL: https://demo.ia.io:443/system/gwinfo: The endpoint being accessed.
- Host: demo.ia.io: The host of the request.
- Body: None: There’s no body sent with this GET request.
- Status Code 200: Indicates a successful request.
- Response Headers:
- Content-Length: 373: The size of the response body in bytes.
- Date: The date and time the response was generated.
- Strict-Transport-Security: Enforces secure connections.
- x-content-type-options: Prevents MIME type sniffing.
- x-frame-options: Prevents clickjacking.
- x-xss-protection: Enables cross-site scripting protection.
- Response Body:
- 373 bytes: Indicates the size of the response body received.
- Network Duration: 0.8228100538253784s: Time taken for the network request.
- Serialization Duration: 1.7249956727027893e-05s: Time taken to serialize the response data.
- Result: success(373 bytes): Indicates the outcome of the request and the size of the response received.
How to Obtain Crash Logs from iPhone and Android
Crash logs from an iPhone:
- Open Settings.
- Tap Privacy & Security>Analytics & Improvements.
- Tap Analytics Data.
- Locate the log for the app that crashed. The filename will use this format: <AppName>_<DateTime>_<DeviceName>. So search for any reference to Perspective or Ignition.
- Tap the crash log to open it.
Crash logs for an Android:
- Open up the Play Store.
- Search up Logcat Reader.
- Install Logcat Reader Professional.
- Once installed, open up the app.
- Search for inductiveautomation or perspective.
- Tap on the log to view the messages.
The following is an example of a crash log.
Known iPhone issues
Impact of TLS Certificate Change on Perspective Mobile App
If your server uses a TLS certificate issued after September 1, 2020, with a validity period longer than 398 days, connections from the Perspective Mobile App may fail. This could result in app errors or issues loading content.
- Check your server’s TLS certificates, particularly the main Ignition Gateway certificate, to make sure they meet the 398-day validity limit.
- Renew any invalid certificates to avoid connection problems.
- Test app connections after making updates.
For more information: https://support.apple.com/en-us/102028
Requirements for Trusted Certificates: https://support.apple.com/en-us/103769
Comments
0 comments
Article is closed for comments.