Template:PT3 SWIFT IOS XCODE 2: Difference between revisions
From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT3_SWIFT_IOS_XCODE_2"> <div class="phd-slide-deck-header"><h3>Language - Swift</h3></div> <div class="phd-slides"> <div class="phd-slid...") |
No edit summary |
||
| Line 10: | Line 10: | ||
</p> | </p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x300/50/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x300/50/0_newproject.png"></div> | ||
</div> | </div> | ||
| Line 16: | Line 16: | ||
<h2>Setting up a New Project</h2> | <h2>Setting up a New Project</h2> | ||
<p>Next, select an iOS application | <p>Next, select an iOS application:</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x350/50/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x350/50/1_newios.png"></div> | ||
</div> | </div> | ||
| Line 26: | Line 26: | ||
<p>Name the project, select Swift as the language, and choose which devices will be supported:</p> | <p>Name the project, select Swift as the language, and choose which devices will be supported:</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x350/50/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x350/50/3_nameproject.png"></div> | ||
</div> | </div> | ||
| Line 32: | Line 32: | ||
<h2>Setting up a New Project</h2> | <h2>Setting up a New Project</h2> | ||
<p> | <p>Now that your project is created, you need to add the Phidget libraries.</p> | ||
Now that your project is created, you need to add the Phidget libraries | |||
</p> | |||
< | <p>Go to File > Add Package Dependencies</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x280/50/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x280/50/4_addpackage.png"></div> | ||
</div> | </div> | ||
| Line 45: | Line 42: | ||
<h2>Setting up a New Project</h2> | <h2>Setting up a New Project</h2> | ||
<p>This will | <p>This will pop up the Swift package manager.</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x325/50/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x325/50/5_packageblank.png"></div> | ||
</div> | </div> | ||
| Line 53: | Line 50: | ||
<h2>Setting up a New Project</h2> | <h2>Setting up a New Project</h2> | ||
<p> | <p>Type this URL into the search bar in the top right:</p> | ||
<div class="phd-command-line"><code> | <div class="phd-command-line"><code>https://www.phidgets.com/git/phidget22-swift.git</code></div> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/- | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_SWIFT_IOS_XCODE_2/-x270/50/6_packagewithphidgetURL.png"></div> | ||
<p>Then select the phidget22-swift package and click <b>Add Package</b></p> | |||
</div> | </div> | ||
| Line 63: | Line 62: | ||
<h2>Setting up a New Project</h2> | <h2>Setting up a New Project</h2> | ||
<p> | <p>Now you can access the Phidget libraries by adding the following line to the top of your files:</p> | ||
<pre data-syntax-language="swift">import Phidget22Swift</pre> | <pre data-syntax-language="swift">import Phidget22Swift</pre> | ||