I can compile the target with debug configuration, but when change to release configuration, it failed with error:
ld: framework not found Pods_MyTarget
this is the pod file:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SnapKit', '~> 0.15.0'
pod 'ObjectMapper', '~> 0.19'
pod 'Nuke'
pod 'Nuke-Alamofire-Plugin'
pod 'RESideMenu', '~> 4.0.7'
pod 'XCGLogger', '~> 3.0'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'TTTAttributedLabel'
pod 'UIColor_Hex_Swift', '~> 1.4'
pod 'RxSwift', '~> 2.0.0-beta'
pod 'RxCocoa', '~> 2.0.0-beta'
pod 'RxBlocking', '~> 2.0.0-beta'
I have seen this bug many a times. I do the below workaround, this may not be the right fix.
Go to Project settings and change "Build Active Architecture Only" to "NO".
I found that I have to change the pod file to something like this:
link_with 'xxx'
target xxx do
pod xxxxxx
end
and then delete some files generated by pod manually, seems pod cannot delete them, such as the xcconfig, framework, .etc
then run 'pod install'
it works.
Related
i am relatively new in ios, especially cocoa pods. i ran into a problem,somehow the IgListKit dependency is un-importable, I already clean build, build 1st then add the import, even deleting the xcworkplace and adding a new one by doing pod install
How do I fix it? is it an issue within the Pod? should I file an error? Thank you
How I add the dependencies :
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'LearnViper' do
pod 'Alamofire', '~> 5.4'
pod 'RxSwift', '6.2.0'
pod 'RxCocoa', '6.2.0'
pod 'Kingfisher', '~> 7.0'
pod 'SkeletonView'
pod 'IGListKit', '~> 4.0.0'
end
platform :ios, '12.0'
target 'LearnViper' do
use_frameworks!
pod 'Alamofire', '~> 5.4'
pod 'RxSwift', '6.2.0'
pod 'RxCocoa', '6.2.0'
pod 'Kingfisher', '~> 7.0'
pod 'SkeletonView'
pod 'IGListKit', '~> 4.0.0'
end
you have to update your gem file with command first
sudo gem install -n /usr/local/bin cocoapods
then after that open podfile add pods and install
Looks like all you have to do is add
use_frameworks! in your pod file
I am running .xcworkspace file on xcode and I am getting the following error:-
library not found for -lPods-
This is my Podfile:-
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target '' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/DynamicLinks'
pod 'GoogleSignIn', '~> 5.0'
pod 'OneSignal', '>= 2.6.2', '< 3.0'
pod 'TPKeyboardAvoiding'
pod 'FBSDKCoreKit', '~> 5.5.0'
pod 'FBSDKLoginKit', '~> 5.5.0'
pod 'Phone-Country-Code-and-Flags'
pod 'ListPlaceholder'
pod 'Shimmer'
end
target '' do
pod 'OneSignal', '>= 2.6.2', '< 3.0'
end
Any help would be highly appreciated! Thanks:)
Try Build Active Architecture Only" = YES and run the pod install
I'm trying to upgrade Cocoapods to version 1.0 but with the new version linking DTCoreText fails.
When I try to run the project on the simulator I get
ld: warning: ignoring file /[...]/libDTCoreText.a, missing required architecture x86_64 in file /[...]/libDTCoreText.a (2 slices)
when I try to archive I get
ld: warning: ignoring file /[...]/libDTCoreText.a, missing required architecture arm64 in file /[...]/libDTCoreText.a (2 slices)
Using my the same Podfile in a clean project everything works fine! So it must be my project, but I can't figure out what it might be.
I used
pod deintegrate
pod install
cleaned and deleted the Derived Data from the project with no success.
The Architectures of the Project and of the Pods are set to "Standard architectures (armv7, arm64)"
I'm using Xcode 7.3 and my Podfile looks like this:
source 'https://github.com/CocoaPods/Specs.git'
project 'Classes/MEG.xcodeproj'
platform :ios, '8.0'
inhibit_all_warnings!
target 'myApp' do
pod 'Reachability', '~> 3.1'
pod 'DTCoreText', '~> 1.6'
pod 'Flurry-iOS-SDK/FlurrySDK', '7.1.0'
pod 'DCIntrospect-ARC'
pod 'AFNetworking', '~> 2.5'
pod 'AFNetworkActivityLogger', '~> 2.0'
pod 'SDWebImage', '~> 3.7'
pod 'SVProgressHUD', '~> 1.0'
pod 'CHTCollectionViewWaterfallLayout'
pod 'BDBOAuth1Manager', '~> 1.5.0'
pod 'FMDB', '~> 2.4'
pod 'Masonry', '~> 0.6'
pod 'RSKImageCropper', '~> 1.0'
pod 'AWSiOSSDKv2/SNS', '~> 2.0'
pod 'JSQMessagesViewController', '~> 6.0'
pod 'SKTagView', '~> 0.0'
pod 'PSTAlertController', '~> 1.2'
pod 'UITextView+Placeholder', '~> 1.1'
pod 'MWFeedParser', '~> 1.0'
pod 'tarkit', '~> 0.1'
pod 'XMPPFramework', '3.6.5'
pod 'XMLDictionary', '~> 1.4'
pod 'NewRelicAgent', '~> 5.6'
pod 'NHNetworkTime', '~> 1.6'
target 'myApp Tests' do
inherit! :search_paths
pod 'OCMock', '~> 3.2'
end
end
I finally found the problem. I had an old version of libDTCoreText.a lying around in my project folder.
Even though this file wasn't referenced anywhere in the project, cocoapods tried to link it. Xcode was probably meant to search for libDTCoreText.a within the cocoapods library, but found it in the project folder first as this is also listed in the library search paths.
Anyway, removing the file fixed the issue.
I'm working on a legacy iOS project as a newbie. After I updated the CocoaPods and libraries, I've got these weird errors after building the project which never happen before.
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-Model
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-Model is not an object file (not allowed in a library)
And here is my Podfile:
platform :ios, '7.0'
link_with ['DianaViewModels']
pod 'AVOSCloud', '~> 3.0'
pod 'PixateFreestyle'
target :Model do
link_with ['DianaModels']
pod 'ReactiveCocoa', '~> 2.2'
pod 'TMCache', '~> 1.2'
pod 'SSKeychain', '~> 1.2'
pod 'Mantle', '~> 1.3'
pod 'AFNetworking', '~> 1.0'
end
target :Test do
link_with ['DianaTests']
pod 'Kiwi', '~> 2.2'
end
target :View do
link_with ['Diana']
pod 'SVPullToRefresh', '~> 0.4'
pod 'MBProgressHUD', '~> 0.7'
pod 'SWTableViewCell', '~> 0.1'
pod 'MTMigration'
pod 'Masonry'
pod 'TTTAttributedLabel'
pod 'NJKWebViewProgress'
target :ViewDebug do
link_with [
'DianaDev',
'DianaViews'
]
pod 'Reveal-iOS-SDK'
end
end
By the way, I'm using the CocoaPods plugin in the Xcode. But a lot error are output when I check the Install Docs during integration:
Error opening xar archive: /var/folders/3x/mgl299js6k13tlrspqv21n340000gn/T/Model-ReactiveCocoa.xar
Are there some wrong configurations in my CocoaPods or Build Setting in Xcode6.3? Thanks for your help!
ADDED:
Here's my Link Binary With Libraries in the Build Phases. Does the red item mean something is wrong? It looks like this is the cause.
There are pod files installed in my project.
Now I want to add new pod file for 'PhotoPickerPlus' , but I am getting duplicate symbols errors and warnings as seen in following screenshot ;
I have tried to install pod file by using
pod install
It is successfully installed. I have also inclueded all required frameworks.
My pod file is as follows ;
platform :ios, '6.0'
# ignore all warnings from all pods
inhibit_all_warnings!
pod 'ARGenericTableViewController', '~> 1.0.0'
#pod 'CocoaLumberjack', '~> 1.6'
pod 'TBXML', '~> 1.5'
pod 'GoogleAnalytics-iOS-SDK', '~> 2.0beta4'
#pod 'FlurrySDK', '~> 4.1.0'
pod 'SDWebImage', '~> 3.5.4'
#pod 'PSTCollectionView', '~> 1.2.0'
pod 'BSKeyboardControls', '~> 2.2'
pod 'HockeySDK', '~> 3.5.4'
pod 'MBProgressHUD', '~> 0.8'
pod 'MKMapView+AttributionView', '~> 0.1.0'
pod 'Facebook-iOS-SDK', '~> 3.13.0'
pod 'TTTAttributedLabel', '~> 1.9.0'
pod 'JASidePanels'
#pod 'ARChromeActivity', '~> 1.0.1'
#pod 'TUSafariActivity', '~> 1.0.0'
pod 'REComposeViewController', '~> 2.3.1'
pod 'iRate', '~> 1.9.3'
pod 'PhotoPickerPlus', '~> 2.2'
pod 'UIPhotoGallery', :podspec => 'UIPhotoGallery.podspec'
But I am getting errors after installing this file.
What can be the issue?
Maybe your Other Linker Flags inside the Build Settings inside your project is set wrong. Click on your Project inside Project Navigator. If you select your app on PROJECT your Build Settings should look like this
Inside my project I also deleted everything inside Other Linker Flags but maybe it works for you if you insert this
And of course never forget cleaning after these steps.
In you Project Settings, Check target's "Build Phases"'s "Compile source" section. Make sure there are no duplicate copies.
BTW, These errors are generated by https://github.com/gameclosure/trademob which is not even in your pod file.
So again, verify your project settings. Probably you are trying to add pod file to existing project.