OS - iOS: Difference between revisions

From Phidgets Support
No edit summary
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<metadesc>Communicate over USB with sensors, controllers and relays with Phidgets! Program in iOS using objective C or Swift.</metadesc>
[[Category:OS]]
[[Category:OS]]
__TOC__
__TOC__
Line 4: Line 5:
==Quick Downloads==
==Quick Downloads==
Already know what you're doing? Here you go:
Already know what you're doing? Here you go:
 
{{iOSQuickDownloads}}
*[{{SERVER}}/downloads/libraries/Phidget22.dmg macOS Installer Download]
*[{{SERVER}}/downloads/libraries/Phidget-iPhone.zip iOS drivers]
 
You may also be interested in the [[#Advanced Information|Advanced Information]] section of this guide located below.


==Getting Started with iOS==
==Getting Started with iOS==
Welcome to using Phidgets with iOS. If you haven't already, check out the [[:Category:UserGuide|user guide]] for your device. If you are ready to go, the first step in creating an iOS application with Phidgets is getting the Phidget Network Service up and running!
Welcome to using Phidgets with iOS. If you haven't already, check out the [[:Category:UserGuide|user guide]] for your device. If you are ready to go, the first step to creating an iOS application with Phidgets is learning about the Network Server!
===Network Service===
 
Phidgets cannot be connected directly to iOS devices, therefore, in order to use Phidgets with your iOS device, you must have a host computer that is running the Phidget Network Service. Select the operating system of your host computer from the list below to set up your network service:
*[[OS - Windows#Phidget Network Service| Windows]]
*[[OS - OS X#Phidget Network Service| macOS]]
*[[OS - Linux#Phidget Network Service| Linux]]
*[[OS - Phidget SBC#Phidget Network Service| Phidget Single Board Computer]]
 
===Installing Drivers===
 
You should now have the Phidget Network Service running on your host computer. Starting to code your application is now in sight!
 
The next step is downloading drivers for your macOS development machine:
 
*[{{SERVER}}/downloads/libraries/Phidget22.dmg macOS Installer Download]


The last thing to install is the Phidget libraries that you will code your program against. Here they are:
===Network Server===
Phidgets cannot be connected directly to iOS devices, therefore, in order to use Phidgets with your iOS device, you must have a host computer that is running the Phidget Network Server.  


*[{{SERVER}}/downloads/libraries/Phidget-iPhone.zip iOS drivers]
[[Image:iOS-connection.jpg|link=|center]]


Note the three main files that are included in the iOS drivers download:
*Host computer: the computer that is physically connected to the Phidgets via USB and is running the Phidget Network Server.
*Client computer: a computer running a Phidgets application that accesses Phidgets connected to the host computer. When developing for iOS, your iOS device acts as the client.


* {{Code|iphoneos/libPhidget22.a}}
* {{Code|iphonesimulator/libPhidget22.a}}
* {{Code|phidget22.h}}


You will need to reference these files in your Xcode application. More information is provided in the programming language guides that are linked below.
The next step is to install the Phidget libraries on your host computer, and get the Phidget Network Server up and running. Follow the ''Getting started'' guide, and continue with the ''Network Server'' guide for your operating system. When you are done, come back and finish this guide!
*[[OS - Windows| Windows]]
*[[OS - OS X| macOS]]
*[[OS - Linux| Linux]]
*[[OS - Phidget SBC| Phidget Single Board Computer]]


===Programming===
===Programming===

Revision as of 18:51, 6 February 2018

Quick Downloads

Already know what you're doing? Here you go:

Getting Started with iOS

Welcome to using Phidgets with iOS. If you haven't already, check out the user guide for your device. If you are ready to go, the first step to creating an iOS application with Phidgets is learning about the Network Server!

Network Server

Phidgets cannot be connected directly to iOS devices, therefore, in order to use Phidgets with your iOS device, you must have a host computer that is running the Phidget Network Server.

IOS-connection.jpg
  • Host computer: the computer that is physically connected to the Phidgets via USB and is running the Phidget Network Server.
  • Client computer: a computer running a Phidgets application that accesses Phidgets connected to the host computer. When developing for iOS, your iOS device acts as the client.


The next step is to install the Phidget libraries on your host computer, and get the Phidget Network Server up and running. Follow the Getting started guide, and continue with the Network Server guide for your operating system. When you are done, come back and finish this guide!

Programming

Now that you have everything set up, all you have to do is code! Select from one of the following programming languages to get started: