简体   繁体   中英

How to make Pod file from one project and add to your own project in iOS?

I have one complete project. which I downloaded from site.

https://medium.com/learning-xcode-as-a-designer/animate-in-xcode-without-code-20c82a904164

It gave me a project.

I also download a DEMO project which has only added Pods Files, looks below

在此输入图像描述

After that I made a DemoAnimation project. and made its Pod using pod init, but it made Pod of that project like below

在此输入图像描述

Now, my confusion is that how to make Pod of canvas project and use into my project. as if I use by dragging and dropping, it doesn't work.

How to make Pod file or existing project and embed into my own project and use it?

If you're already on CocoaPods,

1.enter to your project root directory.

2.Create a file call Podfile and add the content

platform :ios, '7.0'
pod 'Canvas', '~> 0.1'

Or open terminal: (cd to your root directory)

$ cd {ROOT_DIR}
$ edit Podfile
platform :ios, '7.0'
pod 'Canvas', '~> 0.1'

3.Run pod install to install the dependencies.

4.Then you should now have the Xcode workspace (.xcworkspace) ready.

5.Go on with the terminal or just open the xcworkspace file.

$ open -a xcode App.xcworkspace

That's it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM