Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patent10021

macrumors 68040
Original poster
Apr 23, 2004
3,537
813
This is a GitHub project I'm working off so I'm not the creator. It's working perfectly and I just want to better understand the file structure and linking.

Obviously when you are in an Xcode project and and create a Pod file then run pod install in Terminal the workspace is created for you and you get the extra blue Pod project icon with the new folders.

But...why are there two Pods folders and two Frameworks folders and an extra blue Pods project icon?

A Pods "project" is created for everything related to Cocoapods? Why is there an iOS Foundation.framework there? Shouldn't it be in the main Project yellow Products folder?

I also see the Pod file the creator used. Why is it there instead of the main yellow Products or Supporting Folder and how did it get the red rb on the icon? Usually it's just a plain white icon.

Also why is there is a Frameworks folder in the main project which contains a Pods_projectname_.framework?

What exactly is Pods-project-name.debug.xcconfig for?

Thanks
 

Attachments

  • filestructure.jpg
    filestructure.jpg
    228.5 KB · Views: 155
Last edited:
This post is sort of a second post accompanying my other post regarding Xcode project file structures.

I'm using this open source EZSwipeController. It's a simple install via pods. But I have a question since I see this a lot on GitHub.

The manual install says simply drop EZSwipeController.swift in your project. But if you look at the file structure in his project there is more. I'm wondering why he mentions to drop only 1 file when he also has MySwipeVC.swift and other code.

He also has an override point in his AppDelegate.swift.
Code:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        // Override point for customization after application launch.
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window!.rootViewController = MySwipeVC()
        window!.makeKeyAndVisible()
        returntrue
    }



Also why is there a Carthage Framework in his project?

LDep2o1.png



When I used the Cocoapods install method the file structure was totally different. EZSwipeController.swift ended up in the Pods directory.
 
While I haven't used this project it seems that you're looking at the example project. The crucial part of using his code is the one source file. The other source code is to make a complete example.

Carthage is another dependency manager like cocoa pods. Use one or the other, not both. Or use neither. Just add the single source file like the author mentions. When you use CocoaPods it downloads the required source files and builds a framework and does some other stuff with your project and builds a workspace.

So, add the one source file to your project or do it the cocoapods way. Your choice.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.