I've a project with huge codebase and it has 4 different target Apps.
Now there are many of views, models and controllers are common for all 4 target apps. So those common files, classes and image assets are placed in central
folder and that folder is act as pod library. I've to run pod install
to fetch all central
code dependencies.
Here is how my Podfile
file looks like.
#Pod sources
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/ttttt/xxxxxxxx.git'
source 'https://xx-xxxxxx/xxxxx/xxx/xxxx.git'
# Use the same pod library for all these targets
def myPods
pod 'ABC', :path => '.' #'ABC' is name of pods in .podspecs file, which I want to remove
end
target 'target1' do
myPods
end
target 'target2' do
myPods
end
target 'target3' do
myPods
end
target 'target4' do
myPods
end
Here, ABC is project name. and it imports ABC.podspecs
at local path.
Now, I want to remove ABC.podspecs
files and make all code locally (not as pod library).
Can anybody please suggest me how to do that?
If I remove it directly and run pod install
, it gives lots of errors and architecture issues.
I found it!!
What I did is, moved all dependency targets into PodFile. and then removed ProjectName.podspecs
file from the project. Then deleted Pods, pod lock file and workspace, and run pod install
again.
This process removed all development pods and dependencies from the pods project.
After that, for all central
files, classes, assets, I've set all 4 target as target membership
from right inspector in Xcode. and it worked well.