
Predix SDK for iOS © 2020 General Electric Company Contents Predix SDK for iOS Overview 1 Predix SDK for iOS 1 Asset API 1 Authentication API 1 NoSQL Local Database API 2 Offline API 3 Online API 3 PredixUIKit for iOS 3 TimeSeries API 3 Getting Started with SDK for iOS 5 Before You Begin 5 Adding the SDK to Your Project 5 Adding the Module Map 6 ii Predix SDK for iOS Copyright GE Digital © 2020 General Electric Company. GE, the GE Monogram, and Predix are either registered trademarks or trademarks of General Electric Company. All other trademarks are the property of their respective owners. This document may contain Confidential/Proprietary information of General Electric Company and/or its suppliers or vendors. Distribution or reproduction is prohibited without permission. THIS DOCUMENT AND ITS CONTENTS ARE PROVIDED "AS IS," WITH NO REPRESENTATION OR WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF DESIGN, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. ALL OTHER LIABILITY ARISING FROM RELIANCE UPON ANY INFORMATION CONTAINED HEREIN IS EXPRESSLY DISCLAIMED. Access to and use of the software described in this document is conditioned on acceptance of the End User License Agreement and compliance with its terms. © 2020 General Electric Company iii Predix SDK for iOS Overview Predix SDK for iOS The Predix SDK for iOS is a powerful software design kit (SDK) to accelerate the development of IIoT applications for Predix using iOS, macOS, tvOS, and watchOS. The overall application development process is simpler and faster with the use of a robust set of APIs that feel natural to a Swift developer. Predix SDK for iOS key features: • Asset API • Authentication API (UAA) • NoSQL Local Database API • Online API • Offline API • TimeSeries API For more information on the Predix SDK for iOS APIs, see the following: • Getting Started Guides • How to Guides • API Documentation Related Reference Before You Begin on page 5 Learn about prerequisites for using the Predix Mobile iOS SDK and find the SDK Download link. Asset API The Predix SDK for iOS Asset API allows your application to access Asset data from the Asset Service available on Predix.io. The SDK provides a simple native Swift API that converts Asset JSON requests and responses into Swift models that make it easier to use, display, and manipulate Asset data from Swift. • Predix SDK for iOS handles authentication with Asset, you simply need to provide the UAA endpoint and Zone ID. • Request data using native Swift objects. • Response data is represented with native Swift objects making it easier to filter, display, and find data that is most critical to your application. For more information on using the Asset API, see the Asset API documentation. Authentication API The Authentication API allows you to authenticate users and your application with the Predix User Account and Authentication (UAA). Authentication API includes: • Native authentication using User Credentials • WebView authentication using Authorization Code Grant • RefreshToken authentication using Biometrics (TouchID and FaceID) • Client Credential authentication for applications that do not use a Username and Password to protect their applications. © 2020 General Electric Company 1 Supported iOS Features • Native UI login • UIWebView login • WKWebView login • SafariViewController login • SFAuthenticationSession Support for Biometric Authentication - The SDK works with TouchID and FaceID out of the box. You can simply tell the Authentication API that you want to use biometric authentication and the SDK does the work for you. Privacy for User Credentials - The SDK respects user privacy and never stores the Usernames and Passwords. All tokens are secured in Apple's device Keychain and can only be accessed by the user who stored them. For more information on using the Authentication API, see Using Authentication API to Authenticate a User. NoSQL Local Database API The NoSQL Local Database API allows you to replicate and load balance your data. Following are some key features of the NoSQL Local Database API: Document Database Management - Document management allowing you to write, retrieve, or delete a document from a database. The central concept of the NoSQL database is the "document". The document encapsulates and organizes data in name/value pairs; and it is identified by a system-wide unique identifier (ID). Async Interaction - Async interaction to maximize mobile device resources and UI responsiveness. The PredixSDK Database API is largely asynchronous in nature. The API calls for most document interactions and running queries takes a Swift completion handler closure as a parameter. The closure is called when the requested operation is complete. This is similar to many other APIs within the Apple ecosystem. Note: Developers using the PredixSDK must have a thorough understanding of asynchronous patterns, Google Cloud Datastore (GCD), and Swift closures to enable the maximum performance and responsiveness from their PredixSDK-based applications. Data Replication - Easy set up for data replication and flexibility for many complex data iteration use cases. You can use the PredixSDK Database as a local data store and use it with the PredixSync service to synchronize documents to and from a backend server and to other users. Data replication is a complex task but the Predix system makes it easy to setup and provides flexibility for many complex data iteration use cases. Note: As with any offline data interaction, care must be taken to determine what type of data a user needs when offline. When designing your applications data model, it is important to consider that mobile devices have limited storage capacity and often have limited network bandwidth. A balance must be struck between having enough information to meet the applications use cases, and preventing an application from being too “chatty” or attempting to synchronize large quantities of data. Indexes and Queries - Ability to create indexes of the documents and run queries against those indexes. With indexes and queries, you can enable searches, perform sorting, summarization, and other more relational database-like data interactions. An index consists of a key (the data being indexed) and an optional value (additional data stored with the index). The data in the index is sorted based on a key. Queries can retrieve data from the index by either specifying a list of keys or a range of keys. These keys are simple data types or arrays to provide more complex sorting and retrieval scenarios. 2 © 2020 General Electric Company For more information on using the NoSQL Local Database API, see the Getting Started with the NoSQL Local Database API. Offline API The Offline API allows your application to access critical APIs when there is no internet connectivity. You can use the PredixSDK Database as a local data store, and use it with the PredixSync service to synchronize documents to and from a backend server and/or to other users. • Easy to setup of data replication mechanism • Flexibility for complex data iteration use cases For more information on Offline API, see NoSQL Local Database API Online API The Online API allows you to associate a UAA authentication session to a network request. Based on this association, the SDK manages the bearer token and populates the authorization header for you. This allows you to focus on your application logic and relieves you from the additional stress of managing the bearer token for your network requests to Predix Services. Online API includes: • Requests to Predix services or server-side apps automatically populate the bearer token for you. • Trace IDs are automatically generated allowing you to trace and diagnose a request using tools like Splunk. For more information on using Online API, see Using the Online API to make Network Requests PredixUIKit for iOS The PredixUIKit for iOS is a framework of data visualization components based on Predix Design System and some common visualization components. When used with Predix SDK for iOS, the PredixUIKit allows you to utilize the available data visualization components to accelerate the overall application development process. You can use the PredixUIKit for iOS to display your data stored in Predix Cloud with very minimal coding. The Predix UI components of the PredixUIKit are open source and are built specifically to work seamlessly with the Predix SDK for iOS. PredixUIKit Features: • Data Visualization • UAA Authentication • Time Series View For more information on PredixUIKit for iOS, see the Getting Started with PredixUIKit TimeSeries API The TimeSeries API allows your application to access Time Series data from the Time Series Service available on Predix.io. The SDK provides a simple native Swift API that converts Time Series JSON © 2020 General Electric Company 3 requests and responses into Swift models that make it easier to use, display, and manipulate Time Series data from Swift. • Predix SDK for iOS handles authentication with Time Series, you simply need to provide the UAA endpoint and Zone ID. • Request data using native Swift objects. • Response data is represented with native Swift objects making it easier to filter, display, and find data that is most critical to your application. For more information on using the TimeSeries API, see Using the TimeSeries API to Fetch Time Series Data 4 © 2020 General Electric Company Getting Started with SDK for iOS Before You Begin Learn about prerequisites for using the Predix Mobile iOS
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages13 Page
-
File Size-