-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
The PredixUIKit for iOS is the easiest way to use ready-to-use user interface (UI) components that easily integrate with the Predix SDK for iOS and follow the Predix Design System.
For a complete list of features, see the features list from the main documentation page
This guide is for users familiar with Xcode, the Swift programming language, and the Swift coding concepts. If you are not already familiar with these technologies and concepts you may want to consider reading Apple's Getting Started documentation before continuing with this guide.
Before You Begin:
- Read the README file.
- You are using a Mac (you can not develop iOS/MacOS/TVOS/WatchOS applications on Windows or Linux).
- Download Xcode 9.2 or later
- Download and install the latest version of Carthage
- If you are behind a firewall/proxy ensure access GitHub from the Mac Terminal
- If you haven’t already, install the latest version of Carthage
- Create a folder where you are going to create your project
- Create a file named
cartfile
(thecartfile
needs to be a plain text file. TextEdit can can do this by selecting Format->Make Plain Text) - Enter the following dependencies into the
cartfile
:
binary "https://raw.githubusercontent.com/PredixDev/PredixSDKForiOS/master/Carthage/ios.json" >= 0.7
github "danielgindi/Charts" >= 3.0.4
github "PredixDev/PredixMobileUIKit" >= 0.3
- Open the Terminal and navigate to the folder where you created the
cartfile
- Run
carthage update
- Once carthage has finished running move on to the next section
Open XCode and create a Single View App Xcode
File > New > Project > iOS > Single View App
- Open your application's project in Xcode
- Locate the
PrediMobileUIKit.xcodeproj
in finder and drag it into your Xcode project under the main project. If you usedcarthage
the directory will be ./Carthage/Checkout/PredixMobileUIKit
- Select your base Xcode project
- Select the General tab in the editor window
- Scroll down to the Embedded Binaries section and press the
+
button
- Press the
Add Other...
button - Navigate to the base directory you created when you started the guide and then find the PredixSDK.framework and PredixMobileUIKit.framework and then select open. If you used
carthage
the frameworks can be found in ./Carthage/Build/iOS
- Open the projects Storyboard and select the View Controller
- Set the following:
class: PredixDonutView
module: PredixMobileUIKit
If the set up is successful, you will see the following image in the Interface Builder:
- Open the projects
ViewController.swift
file and include the following imports:
import UIKit
import PredixMobileUIKit
import PredixSDK
- Compile the project.
If your build is not successful, please try these tips
- Select you project, then your target and finally the Build Settings tab.
- In the search box enter "framework search path"
- Make sure the property for the framework search path is
$(PROJECT_DIR)/../Carthage/Build/iOS
if you used Carthage (you may need to adjust this to point to the folder where the frameworks are if you compiled and downloaded the projects yourself).
download the complete Carthage example project
Getting Started
Features
- Data Visualization (Coming soon!)
- UAA Authentication View (Coming soon!)
- Time Series View (Coming soon!)
How-To Guides:
- Getting Started
- Authentication (Coming soon!)
- Time Series View (Coming soon!)
- Data Visualization (Coming soon!)
- Troubleshooting Tips (Coming soon!)
API Documentation: