Never used Xcode before? No worries. We’ll walk you through your first steps.

If you want to know more about Xcode, read more about the Integrated Development Environment "IDE" from Apple.

STEP 1

Creating an Xcode file from a Lightwell project.

Open up the Lightwell you’d like to publish. On this project screen, navigate to the panel on the left-hand side and click the “Publish” button. A popup will appear.

In the first text field (Company/Individual Name), enter your name. Lightwell will automatically fill in the second text field (Bundle ID). A Bundle ID is simply a way for Apple to uniquely identify your app.

Finally, click on “Create new Xcode project”. You'll see another pop up like the one to the right. Click on “Export Project”. In this example, we’re saving our Xcode files to our Desktop.

STEP 2

Opening up your new Xcode file.

Navigate to where you saved your Xcode Project. For us, it was our Desktop. You should see a folder titled named after your app.

Double click on MyLightwellProject.xcodeproj file. This will open up your project in Xcode.

Now that you have your project open in Xcode, the next step will be to get it ready to publish to the App Store. To do this, we need to tie your app to your individual Apple ID.

STEP 3: 

Let's start signing your app!

Linking your app to your Apple ID is an important part of publishing to theApp Store. It lets Apple know that the app that’s being published is being created by a real, verifiable company or person. This process is known as“Signing” and it’s a lot like writing your signature on an important document.

If you don't see the My Lightwell project at the top make sure the folder icon on the left is selected. In the middle of the screen you’ll see a section labeled “Signing”. If this is your first time opening Xcode it will say "No accounts found".

Click on the “Add Account” button. It will now ask you to sign in with your Apple ID.

Note: To test your app on a device you can use any Apple ID. (In the future to publish your app to the App Store, you'll need to enroll your Apple ID to the Apple Developer Program).

After successfully signing in, you can close the Accounts window. Now the Signing section will be updated.

Make sure that the "Automatically manage signing" checkbox is checked. Open the "Team" dropdown and select your name. It will display with "(Personal Team)" following it like it is shown below.

STEP 4

Linking your iOS Device to Xcode.

The next step is easy! First, plug in your iPhone or iPad into a lightning cable connected to your computer. Then, navigate to the top navigation bar in Xcode.

Next to the play and stop button, you'll see a "My Lightwell App" button next to a button with the name of an iOS device (like "iPhone 7 Plus”). Click on this and at the top of the following drop down, you should see the name of your own, personal iOS Device. In my case, it would be called “Mike Jaoudi’s iPhone”.

Next, hit the “Run” button.

If it is the first time you've plugged in this iOS device, Xcode will need to do a little work to set it up. The whole process can take up to 5 minutes so we recommend getting up for a nice stretch or some coffee. ☕

After Xcode has finished up, tap on the Run button again.

You should get an error like the one below. This is totally normal.
All this means is we need to do a little fiddling in the Settings app on our iOS device.

STEP 5

Giving your iOS Device permission to run apps from Xcode.

Like the title says, we need to let our iOS Device know that it’s okay to run apps from Xcode and our Apple ID.

Start by opening up the Settings app on your iOS Device. Find and tap on “General." Once in General, find and tap on “Device Management.”

Tap on your Apple ID email address. On the next screen, make sure you tap “Trust [your Apple ID Email Address]”. 

Once you tap this you’ll see a pop up to confirm. Once again, hit “Trust”.

STEP 6 

Running your app on your iOS Device through Xcode.

Last but not least, hop back over to Xcode and hit the Run Button again.

Your app should now run on your iOS Device. If you’re having trouble, read below where we’ve provided a couple Troubleshooting items.

Troubleshooting

Q: I clicked "My Lightwell Project" in Xcode but I don't see a Signing section.

A: Sometimes Xcode opens the information for the entire project instead of the individual project file. This is a pretty simple fix.

When clicking the dropdown, you'll see under the "Targets" section, "My Lightwell App". Click the app and you'll see the app settings.

If you've already selected the "My Lightwell App", make sure that the "General" tab is selected at the top.

Q: Xcode said my build failed. What should I do?

A: If your build failed, ensure that you have your iOS device selected and not an iOS simulator (See Step 4).

Sometimes, Xcode will reselect an iOS simulator by mistake.
If the build is still failing, that means that a team was not selected in the Signing section (See Step 3) .

If your build is still failing, shoot us an email at support@lightwell.pro and we'll be happy to help you out! : )

Did this answer your question?