# How to Create a CocoaPod in Swift

**URL:** <https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 4, 2016, 10:47am UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510 "2016-03-04T10:47:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrg.developer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jrg.developer/32/109958_2.png) [@jrg.developer](https://forums.kodeco.com/u/jrg.developer)\
**Post date:** [March 4, 2016, 10:47am UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/1 "2016-03-04T10:47:57Z")

</div>

In this tutorial you'll learn how to create a CocoaPod containing your Swift code, assets, and storyboard files. You'll also learn all about Pod Spec files.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/1789-how-to-create-a-cocoapod-in-swift](https://www.raywenderlich.com/1789-how-to-create-a-cocoapod-in-swift)

---

<div class="post-metadata">

**Author:** ![jpdubey07](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jpdubey07/32/30416_2.png) [@jpdubey07](https://forums.kodeco.com/u/jpdubey07)\
**Post date:** [March 13, 2016, 8:00am UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/2 "2016-03-13T08:00:00Z")

</div>

Hi Team,

I’m getting error as ‘No such module RWPickFlavor’ message in my IceCreamShop project. Where am I going wrong?

I’ve cross checked below things :

i. Location where RWPickFlavor is present.  
ii. I’ve correctly pushed project on GitHub :

```
a. https://github.com/jp-dubey07/RWPickFlavor
b. https://github.com/jp-dubey07/RWPodSpecs

```

Please reply ASAP. Tweet : @JaypraksahDube2

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/2X/d/ddd43e89766a834db92dfc4cbbc0361db3b542bb.png)

---

<div class="post-metadata">

**Author:** ![ernestopino](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ernestopino/32/9564_2.png) [@ernestopino](https://forums.kodeco.com/u/ernestopino)\
**Post date:** [March 17, 2016, 1:16pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/3 "2016-03-17T13:16:53Z")

</div>

Hi,

When I run the app crash it ☹  
Here is the console logs:

2016-03-17 14:10:15.913 IceCreamShop[7261:14524354] \*\*\* Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Could not find a storyboard named ‘Main’ in bundle NSBundle \</Users/epino/Library/Developer/CoreSimulator/Devices/66CF13CB-719A-4C15-91E5-5F18909444D8/data/Containers/Bundle/Application/D459EAA6-3FDE-4012-81CA-BB3887AA8DDC/IceCreamShop.app\> (loaded)’  
\*\*\* First throw call stack:  
(  
0 CoreFoundation 0x000000010d525f45 \_\_exceptionPreprocess + 165  
1 libobjc.A.dylib 0x000000010f249deb objc\_exception\_throw + 48  
2 UIKit 0x000000010e45c159 -[UIStoryboard name] + 0  
3 UIKit 0x000000010dd41c7f -[UIApplication \_loadMainStoryboardFileNamed:bundle:] + 58  
4 UIKit 0x000000010dd41fd3 -[UIApplication \_loadMainInterfaceFile] + 260  
5 UIKit 0x000000010dd40851 -[UIApplication \_runWithMainScene:transitionContext:completion:] + 1380  
6 UIKit 0x000000010dd3dba3 -[UIApplication workspaceDidEndTransaction:] + 188  
7 FrontBoardServices 0x0000000114cdb784 -[FBSSerialQueue \_performNext] + 192  
8 FrontBoardServices 0x0000000114cdbaf2 -[FBSSerialQueue \_performNextFromRunLoopSource] + 45  
9 CoreFoundation 0x000000010d452011 **CFRUNLOOP\_IS\_CALLING\_OUT\_TO\_A\_SOURCE0\_PERFORM\_FUNCTION** + 17  
10 CoreFoundation 0x000000010d447f3c \_\_CFRunLoopDoSources0 + 556  
11 CoreFoundation 0x000000010d4473f3 \_\_CFRunLoopRun + 867  
12 CoreFoundation 0x000000010d446e08 CFRunLoopRunSpecific + 488  
13 UIKit 0x000000010dd3d4f5 -[UIApplication \_run] + 402  
14 UIKit 0x000000010dd4230d UIApplicationMain + 171  
15 IceCreamShop 0x000000010d1e61cd main + 109  
16 libdyld.dylib 0x0000000110aa192d start + 1  
)  
libc++abi.dylib: terminating with uncaught exception of type NSException

---

<div class="post-metadata">

**Author:** ![narrativium](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/narrativium/32/110937_2.png) [@narrativium](https://forums.kodeco.com/u/narrativium)\
**Post date:** [March 17, 2016, 2:24pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/4 "2016-03-17T14:24:50Z")

</div>

After you ran ‘pod install’, did you close the project in Xcode and - from that point onward - instead open the workspace?

---

<div class="post-metadata">

**Author:** ![ernestopino](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ernestopino/32/9564_2.png) [@ernestopino](https://forums.kodeco.com/u/ernestopino)\
**Post date:** [March 17, 2016, 2:42pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/5 "2016-03-17T14:42:05Z")

</div>

Yes, I’m running the application from the workspace and not from the project ☹

---

<div class="post-metadata">

**Author:** ![aizicm](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/aizicm/32/29162_2.png) [@aizicm](https://forums.kodeco.com/u/aizicm)\
**Post date:** [April 12, 2016, 8:04am UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/6 "2016-04-12T08:04:02Z")

</div>

Hey there Joshua!

I’ve followed your tutorial to the letter (except for the part where I have to enter my own data) and when using Swift 2.2, cocoa pods 0.39.0 and Xcode 7.2.1 I get stuck at the part of “Using Your New CocoaPod”. I’ve followed the instructions but I get an error at the following line in the AppDelegate:

`let bundle = NSBundle(forClass: PickFlavorViewController.self)`

It’s giving me the error “Use of unresolved identifier ‘PickFlavorViewController’”

Do you have any ideas as to why this is happening and what I might have to do in order to fix it?

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [April 28, 2016, 3:37pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/7 "2016-04-28T15:37:02Z")

</div>

I just finished reading this well written arcticle. I have never used cocoapods or carthage and I am trying to decide which one to use for my app which contains many frameworks that I have created. The complexity of the cocoapod creation process has convinced me that while I know almost nothing about carthage, except that the goal of carthage is simplicity, I will make every effort to avoid using cocoapods. The maintenance overhead of this dependency mangager is more than I want to invest in such a tool. If I wanted to publish my frameworks for public consumption I might feel otherwise, but I only want a private system for my own personal use.

---

<div class="post-metadata">

**Author:** ![marvel7579](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/marvel7579/32/102075_2.png) [@marvel7579](https://forums.kodeco.com/u/marvel7579)\
**Post date:** [August 18, 2016, 2:06pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/8 "2016-08-18T14:06:17Z")

</div>

Hello after creating pod in objective-c i’m facing issue

![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/7/2/72568b4f980200b32bdc645e2afcd944d7bf2add.png)

I tried all soutions mentioned in google search but no luck. Please help

---

<div class="post-metadata">

**Author:** ![kmt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kmt/32/62864_2.png) [@kmt](https://forums.kodeco.com/u/kmt)\
**Post date:** [March 4, 2017, 12:26am UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/9 "2017-03-04T00:26:52Z")

</div>

Anyone still supporting this? My RWPickFlavor project cannot find Alamofire even though is is obviously sitting right in the Pods structure.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 16, 2017, 10:55pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/10 "2017-11-16T22:55:51Z")

</div>

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 16, 2017, 10:55pm UTC](https://forums.kodeco.com/t/how-to-create-a-cocoapod-in-swift/6510/11 "2017-11-16T22:55:58Z")

</div>

Closed on November 16, 2017, 10:55pm UTC


