Reputation: 21520
Working on a project in Xcode, I need to import a project class header in a pod class.
Obviously if I use:
#import "MyProjectClass.h"
fails. Where I have to specify path?
Upvotes: 2
Views: 7888
Reputation: 4008
#import "MyProjectClass.h"
Directly import source, you should not use pods. Better to drag the source code, and directly put into you project.
If needed modify pods and you seldom pod install
, change the mode of pod file.
cd
your pod folder, and run sudo chmod 777 your folder
.
Pods folder is readonly default.
Upvotes: 0
Reputation: 14900
Pods should not be directly edited, as any subsequent 'pod install' will wipe out your changes. As stated by rckoenes the easiest approach is to subclass the relevant class and add what you need.
If the changes you need can't be done in a subclass, you have another option. You can fork the repo for the pod, make any needed changes directly to the classes themselves, and point your podfile towards your fork. See this answer: Cocoapods and github forks
Upvotes: 4
Reputation: 69469
You should not do it this way, you should just extend the class from the pod you are using your project and add the necessary change in the derived class.
Upvotes: 4