# Creating your own iOS App using Cloud SDK & Device Setup Library

**URL:** https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165
**Category:** Developer Tools
**Created:** [February 6, 2017, 12:19am UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165 "2017-02-06T00:19:24Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![mdzura117](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@mdzura117](https://community.particle.io/u/mdzura117)
#### Post date: [February 6, 2017, 12:19am UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/1 "2017-02-06T00:19:24Z")

</div>

Does anyone know where there is a proper, up-to-date tutorial for creating your own iOS App using the Cloud SDK and Device Setup Library?

I’ve been trying to follow the official tutorial from here ([https://docs.particle.io/guide/how-to-build-a-product/mobile-app/#how-to-get-started-](https://docs.particle.io/guide/how-to-build-a-product/mobile-app/#how-to-get-started-)), as well as user guides from other community members, but I keep getting stumped with numerous errors and no documented troubleshooting information to follow.

I am literally just trying to do the bare minimum of authenticating and setting up my device. I’m using Xcode 6.2 and my minimum target platform is iOS 8.2. I am also coding in Objective-C. I followed the instructions to set up Cocoapods, and it appears the dependencies needed were download properly. However one of the errors I receive refers to “SparkSetup.h” cannot be found, and there are many others. I’ve even tried using the already created iOS example app, but that keeps throwing errors too. I’ve included some screenshots of these errors.

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/2/20eed8093e5a0712b4341bf3f0af67f80a29143c.png) ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/1/15acd6f6e47b61683767b5489bd90197319698c9.png)

Any help is greatly appreciated as this is becoming very frustrating. I took iOS app development in school over a year ago, so this is my first project that I’m trying to attempt.

Thanks!

---

<div class="post-metadata">

### Author: ![ido](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ido/32/11595_2.png) [@ido](https://community.particle.io/u/ido)
#### Post date: [February 7, 2017, 10:17pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/2 "2017-02-07T22:17:17Z")

</div>

Can you describe how you installed the Particle SDK in your project?  
(also post your `Podfile` if you chose to use Cocoapods)

Also is there a good reason for using such an old version of XCode?  
I am not sure I can provide support for XCode 6. Unless there’s a good reason - please update to latest XCode (8.2.1 AFAIK).

---

<div class="post-metadata">

### Author: ![Ric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ric/32/514_2.png) [@Ric](https://community.particle.io/u/Ric)
#### Post date: [February 7, 2017, 11:37pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/3 "2017-02-07T23:37:30Z")

</div>

@ido I’m having difficulties with this too. I followed the following steps

1. Created a new Xcode project in Xcode 8.2.1, then closed Xcode
2. In Terminal, navigated to the root folder of the project, and typed **pod init** to create the pod file
3. edited the pod file in Xcode so it contained only “Spark-SDK”
4. typed in **pod install**

here is the terminal output

Erics-iMac:~ janicedelmar$ cd PodTest272  
Erics-iMac:PodTest272 janicedelmar$ pwd  
/Users/janicedelmar/PodTest272  
Erics-iMac:PodTest272 janicedelmar$ pod init  
Erics-iMac:PodTest272 janicedelmar$ open -a Xcode Podfile  
Erics-iMac:PodTest272 janicedelmar$ pod install  
Analyzing dependencies  
[!] The dependency `Spark-SDK` is not used in any concrete target.

I don’t know what that error message means. I’m not getting any .xcworkspace file created in my folder.

---

<div class="post-metadata">

### Author: ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)
#### Post date: [February 8, 2017, 10:46am UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/4 "2017-02-08T10:46:56Z")

</div>

I think that error means your Spark-SDK is not in a target specification. For example, I used this in Podfile. I think you’d substitute PodTest272 for SDKTest1, and optionally leave out SparkSetup if you didn’t need that.

```auto
target 'SDKTest1' do
  pod "Spark-SDK"
  pod "SparkSetup"
  pod 'AFNetworking', '~> 3.0'
end

```

---

<div class="post-metadata">

### Author: ![Ric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ric/32/514_2.png) [@Ric](https://community.particle.io/u/Ric)
#### Post date: [February 8, 2017, 4:55pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/5 "2017-02-08T16:55:16Z")

</div>

Thanks Rick, that worked perfectly. Is there a reason that the target and the AFNetworking statements use single quotes instead of double ones? Trying to follow the instructions to add the Particle SDK is quite frustrating; the instructions in the docs say, “simply add the following line [pod “Spark-SDK”] to your Podfile on main project folder:” It’s not clear from that statement if that’s the only thing that should be in the file. I was following more detailed instructions from a 2015 post ([here](https://community.particle.io/t/mobile-sdk-install-detailed-help-for-cocoapods-install/11920)). In that post @ido stated that **pod “Spark-SDK”** should be the only line in the file, and the OP also stated that in his summary; those instructions appeared to have worked at that time, so I’m guessing that something has changed since then.

---

<div class="post-metadata">

### Author: ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)
#### Post date: [February 8, 2017, 5:41pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/6 "2017-02-08T17:41:43Z")

</div>

It could be a change in how the Podfile works; I’m not sure. The only reason I happened to know this is that I ran across the not a concrete target error trying to solve a different problem yesterday. Since I guessed the fix from copying things from two different sources the quotes are mixed; they probably should be all the same but I don’t think it matters which one you choose.

---

<div class="post-metadata">

### Author: ![Ric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ric/32/514_2.png) [@Ric](https://community.particle.io/u/Ric)
#### Post date: [February 8, 2017, 6:19pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/7 "2017-02-08T18:19:42Z")

</div>

I can confirm that the Podfile works with either single or double quotes. It also appears that you don’t need a separate line for AFNetworking. It installs AFNetworking 3.1.0 with or without that line. The only difference I see is what the “sending stats” line says in the terminal

With the AFNetworking line: There are 3 dependencies from the Podfile and 4 total pods installed.

Without the AFNetwoking line: There are 2 dependencies from the Podfile and 4 total pods installed.

All the same files are present in the project folder.

---

<div class="post-metadata">

### Author: ![ido](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ido/32/11595_2.png) [@ido](https://community.particle.io/u/ido)
#### Post date: [February 8, 2017, 7:37pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/8 "2017-02-08T19:37:05Z")

</div>

- Indeed Cocoapods recently changed the behaviour and requirements of the `Podfile` - I do need to update the docs and examples. `target` directive must be included now.
- Quotes or double quotes - same thing in Podfile
- No need to include AFNetworking implicitliy - it will be included anyway by `Spark-SDK`
- Thanks @rickkas7 for providing the solution
- @Ric Let me know if you encounter any other issues

---

<div class="post-metadata">

### Author: ![mdzura117](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@mdzura117](https://community.particle.io/u/mdzura117)
#### Post date: [February 9, 2017, 1:12am UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/9 "2017-02-09T01:12:04Z")

</div>

@ido I installed Cocoapods first using `sudo gem install cocoapods` which installed successfully.  
From there I created a new Xcode project and placed the Podile in the project directory.  
(Below are the contents of my Podfile)

```
  target 'Wireless Bed Control' do
     pod "Spark-SDK"
     pod "SparkSetup"
     pod 'AFNetworking', '~> 3.0'
end

```

After typing `pod install` I would get the following output:

```
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.

```

I am using an older version of Xcode to retain some backwards compatibility. My other development Macs run OS X 10.9.5 which doesn’t support Xcode 8.2.1. I do have Xcode 8.2.1 installed on a newer system, however I would like to keep my workflow accessible on the other machines as well.

What is the minimum Xcode version that Particle supports?

---

<div class="post-metadata">

### Author: ![ido](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ido/32/11595_2.png) [@ido](https://community.particle.io/u/ido)
#### Post date: [February 9, 2017, 2:49am UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/10 "2017-02-09T02:49:08Z")

</div>

Looks like you installed everything correctly.  
I think XCode 7 should work fine, be aware however that AFAIK Apple won’t accept apps uploaded by XCode 6, so it’s not much of what Particle supports rather it is what Apple accepts as minimum version.

@Ric and @rickkas7 - I updated the READMEs in the iOS repos with the updated info on the `Podfile` format.

---

<div class="post-metadata">

### Author: ![mdzura117](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@mdzura117](https://community.particle.io/u/mdzura117)
#### Post date: [February 9, 2017, 6:32pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/11 "2017-02-09T18:32:17Z")

</div>

@ido I am now trying Xcode 8. I followed all the same steps for creating the project and setting up the dependencies. I open the xcworkspace file and build the project (as is) without making any changes, and after a successful compile a message pops up saying the `info.plist` cannot be found.  
 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/8/81b21a280b919fd7cc024867a36f8fd64cd4914b.png)

The iOS Simulator opens, but no app is there.

---

<div class="post-metadata">

### Author: ![skybox](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@skybox](https://community.particle.io/u/skybox)
#### Post date: [February 10, 2017, 2:39pm UTC](https://community.particle.io/t/creating-your-own-ios-app-using-cloud-sdk-device-setup-library/29165/12 "2017-02-10T14:39:34Z")

</div>

I used a YouTube video a while back to assist with setup. I don’t know if the instruction will address some of the problems mentioned in this thread but it does a thorough job of explaining the process.

" [https://m.youtube.com/watch?v=\_aotVQGhPH8](https://m.youtube.com/watch?v=_aotVQGhPH8) "

Roger
