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.
Related
I'm trying to modify my podfile to include pods for networking testing in the test target. This is what my podfile looks like:
target 'BPD-mobile' do
# Used to simplify reads/writes to coredata
pod 'MagicalRecord', '~> 2.3.0' #obj-c
pod 'MFSideMenu', '~> 0.5.5' #obj-c
pod 'UIDevice-Hardware', '~> 0.1.7' #obj-c
pod 'Flurry-iOS-SDK', '~> 7.1.1' #obj-c
pod 'AKNumericFormatter', '~> 0.0.2' #obj-c
pod 'JSBadgeView', '~> 1.3.2' #obj-c
pod 'RETableViewManager', '~> 1.6' #obj-c
pod 'RNBlurModalView', '~> 0.1.0' #obj-c
pod 'APLKeyboardControls', '~> 0.1.3' #obj-c
pod 'MBProgressHUD', '~> 0.9.1' #obj-c
pod 'RBStoryboardLink', '~> 0.1.4' #obj-c
pod 'DTCoreText', '~> 1.6.16' #obj-c
# This pod is used for all networking requests
pod 'AFNetworking', '~> 3.1.0' #obj-c
pod 'MTMigration', '~> 0.0.5' #obj-c
pod 'Harpy', '~> 3.3.10' #obj-c
pod 'SDWebImage', '~> 3.7.3' #obj-c
pod 'ELCImagePickerController', '~> 0.2.0' #obj-c
pod 'UAAppReviewManager', '~> 0.2.6' #obj-c
pod 'DZNEmptyDataSet', '~> 1.7.2' #obj-c
# Used to report crashes to github and open issues for them
pod 'Fabric'#, '~> 1.6.4' #obj-c
pod 'Crashlytics'#, '~> 3.8.2' #obj-c
pod 'DeepLinkKit', '~> 1.1.0' #obj-c
# User for UI Layout and additional widgets
pod 'Eureka', '~> 2.0.0-beta.1' #swift 3.0
# Adds pull screen down for callback functionality, used to
# sync with server
pod 'PullToRefreshCoreText', :git => 'https://github.com/BigPurpleDot/PullToRefreshCoreText' #obj-c
# Pods to only be used for this target
target "BPD-mobile Tests" do
# This pod is used to hijack http methods and respond with
# pre recorded information
pod 'OHHTTPStubs', '~> 5.2.3'
# This pod is used to record http response data for reuse
pod 'SWHttpTrafficRecorder', '~> 1.0.2'
end
end
Notice I have the test target nested in the BPD-mobile target. When I try to compile this it says that the "Pods_BPD_mobile_Tests" framework isn't found. I looked at the pods folder in my project and this is what they look like:
'Pods-BPD-mobile',
'Pods-BPD-mobile-BPD-mobile Tests'
the 'Pods_BPD_mobile Tests' pod is in red. I'm assuming I need either the podfile to be structured in a way for the tests framework to output to 'Pods_BPD_mobile Tests' or I have to change some setting so it looks for the tests framework under the new path. What setting do I have to change/ how should my podfile look for my project to build?
EDIT:
The problem seems to be that there's a space in the name of the target:
https://github.com/CocoaPods/CocoaPods/issues/3754
I don't quite understand the solution though, can someone elaborate?
Alright so this had nothing to do with my configurations and was a cocoapods error. Because my target has a space in the name I had to manually edit the scrips run for both the test target and the main target and add single quotes around "$1" turning it into: '"$1"' as per this github issue:
https://github.com/CocoaPods/CocoaPods/issues/3754
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 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.
I'm getting this error every time when I try to compile the project.
This started happening after adding to pods "use_frameworks!" and updating to use :
#import <MBProgressHUD/MBProgressHUD.h>
Insted of:
#import "MBProgressHUD.h"
for all frameworks.
There is no framework named "box" so I do not understand what this even refer to..
This error shows after all the project compiles, really at the end.
Did any one manage to fix this issue?
Edit
My podfile:
platform :ios, '8.0'
# ignore all warnings from all pods
inhibit_all_warnings!
use_frameworks!
xcodeproj 'Stox'
pod 'FLEX', '~> 2.0', :configurations => ['Debug']
pod 'FBSDKCoreKit', '~> 4.5'
pod 'DCIntrospect-ARC', '~> 0.0.4'
pod 'FiksuSDK', '~> 4.5.0'
pod 'Raven'
pod 'PKRevealController'
pod 'UIImage+BlurredFrame'
pod 'SDWebImage'
pod 'PEPhotoCropEditor'
pod 'Reachability'
pod 'HPGrowingTextView', '~> 1.0.1'
pod 'MBProgressHUD'
pod 'pop', '~> 1.0'
#pod 'UIActionSheet+Blocks'
pod 'AZSocketIO', '0.0.5'
pod 'TSMessages'
#pod 'ReactiveCocoa' , '~> 2.5.0'
pod 'ReactiveCocoa', '3.0'
pod 'NJKWebViewProgress'
pod 'ActionSheetPicker-3.0', '~> 1.2.0'
pod 'Underscore.m'
pod 'Mantle', '~> 1.5'
pod 'RSKImageCropper'
pod "AFNetworking", "~> 1.3.4"
pod 'GoogleAnalytics-iOS-SDK', '~> 3.10'
pod 'AHKActionSheet', '~> 0.5'
pod 'WYPopoverController', '~> 0.2.2'
pod 'XLPagerTabStrip', '~> 1.0'
pod 'SwipeView', '~> 1.3.2'
pod 'Masonry'
pod 'YLMoment', '~> 0.2.0'
pod 'YIInnerShadowView', '~> 1.1'
pod 'LinqToObjectiveC', '~> 2.0'
pod 'Typhoon'
pod 'CDRTranslucentSideBar'
pod "ZFDragableModalTransition"
pod 'LVDebounce'
pod 'AsyncDisplayKit', '~> 1.2'
pod 'PhotoTweaks', '~> 1.0.1'
pod 'Shimmer', '~> 1.0'
pod 'IHKeyboardAvoiding'
pod 'Parse', '~> 1.8.4'
pod 'DBPrivacyHelper'
pod 'AppsFlyer-SDK'
pod 'KLCPopup', '~> 1.0'
pod 'Vertigo'
pod 'iRate', '~> 1.11'
target 'StoxUITests' do
use_frameworks!
pod 'Nocilla'
pod 'OHHTTPStubs', '~> 4.3'
end
Workaround to resolve this issue (Temporary fix :) )
Create a folder called "Box.framework" anywhere on your computer. Note the full path to this folder.
Create an empty file called "Box" inside of "Box.framework"
Click on your project and go to the "Build Settings" tab.
Find "Framework Search Paths" in your Build Settings (you can search for
"Framework Search Paths" in the search bar at the top)
Double click on the Framework Search Path and press the "+" button.
Add the path which points to the "Box.framework" folder that you created in step1.
Let me know if that resolves your 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.