Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

How to Create a CocoaPod in Swift

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

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

1 Like

Hi,

When I run the app crash it :frowning:
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

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

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

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?

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.

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

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

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

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! :]