# IOS-SDK Cocoa Pod Fails

**URL:** <https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142>\
**Category:** Cloud\
**Created:** [February 1, 2018, 8:26pm UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142 "2018-02-01T20:26:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danlee6992](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@danlee6992](https://community.particle.io/u/danlee6992)\
**Post date:** [February 1, 2018, 8:26pm UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/1 "2018-02-01T20:26:16Z")

</div>

I am having an issue getting Xcode 9.2 and the Particle-SDK for IOS to work. When I don’t use any code and just build the project it compiles fine. It is only when I start to use the code on the GitHub site I have issues. I have run into these issues before, but found it was due to using frameworks in the Pod file.

I have added the header file and followed the directions in the GitHub Readme. Any help is very much appreciated.

Below are my Pod File and Errors on Xcode.  
Here are my errors:  
 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/9/e/9ea5652ade65f436653bcca4a6ac6e1c6a7d3025.png)

Here is my Pod File:  
# Uncomment the next line to define a global platform for your project

# platform :ios, ‘9.0’

target ‘Particle\_Control’ do

# Comment the next line if you’re not using Swift and don’t want to use dynamic frameworks

#use\_frameworks!

# Pods for Particle\_Control

target ‘Particle\_ControlTests’ do  
pod “Particle-SDK”  
inherit! :search\_paths  
# Pods for testing  
end

target ‘Particle\_ControlUITests’ do  
inherit! :search\_paths  
# Pods for testing  
end

end

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [February 6, 2018, 1:08am UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/2 "2018-02-06T01:08:50Z")

</div>

Hello,

Let me ping someone that might be able to help, @rickkas7 or @blave

are you able to assist?

---

<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 6, 2018, 7:17pm UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/3 "2018-02-06T19:17:09Z")

</div>

Is this an Object C++ or Swift project using Cocoa Pods?

If you’re using Swift, don’t forget to create the bridging header when using Cocoa Pods.

- Add Bridging-Header.h

```auto
#import "SparkSetup.h"
#import "Spark-SDK.h"

```

- In Settings | Build Settings | Swift Compiler - General set Objective-C Bridging Header to _project_/Bridging-Header.h

- In Settings | Build Settings | Search Paths set User Header Search Paths to search **Pods** recursively.

---

<div class="post-metadata">

**Author:** ![danlee6992](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@danlee6992](https://community.particle.io/u/danlee6992)\
**Post date:** [February 6, 2018, 7:43pm UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/4 "2018-02-06T19:43:50Z")

</div>

Thank you!  
This is a swift project using Cocoa Pods.I get the same errors even when adding the (2) import statements. I am currently using #import “Particle-SDK.h”, as this matches my cocoa pod file. I used the directions that re on the GitHub page.  
The project will compile with no code, it isn’t until I try and setup the project and write code that I get these errors.

Any thoughts?

---

<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 7, 2018, 1:16pm UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/5 "2018-02-07T13:16:21Z")

</div>

I tested it again to be sure and I was able to make it work with a new test project. I created a tutorial that shows exactly how to do it:

> **[rickkas7/particle-ios-swift-cocoapods-setup](https://github.com/rickkas7/particle-ios-swift-cocoapods-setup)**
>
> particle-ios-swift-cocoapods-setup - Tutorial for setting up a Particle Device Setup iOS project using Swift and CocoaPods

---

<div class="post-metadata">

**Author:** ![danlee6992](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@danlee6992](https://community.particle.io/u/danlee6992)\
**Post date:** [February 8, 2018, 12:16am UTC](https://community.particle.io/t/ios-sdk-cocoa-pod-fails/39142/6 "2018-02-08T00:16:47Z")

</div>

@rickkas7 Very helpful. Worked like a charm. Appreciate the help.
