I used following pods but I'm getting Error
Undefined symbols for architecture x86_64:
platform :ios, "8.0" use_frameworks!
target 'CSocial' do
#
pod 'Alamofire', '~> 3.0'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'FlickrKit'
pod 'MONActivityIndicatorView'
Chat Integration
pod 'QuickBlox'
#Production pod
#pod 'QMCVDevelopment', :git => 'git#github.com:QuickBlox/QMChatViewController-ios.git', :commit => '7244eaf609797a5dc5ec6d28dc2b284633b03a1f'
#For development pods
pod 'QMCVDevelopment', :git => 'https://github.com/QuickBlox/QMChatViewController-ios.git'
#Production pod
#pod 'QMServicesDevelopment', :git => 'git#github.com:QuickBlox/q-municate-services-ios.git', :commit => 'ab56ac143bb770e76409a027bfb38de582d728aa'
#For development pods
pod 'QMServicesDevelopment', :git => 'https://github.com/QuickBlox/q-municate-services-ios.git'
end
Go through the below steps and your problem will be solved:
1) Tap on "Pods.xcodeproj" in your project
2) Select all the pods / any of one in which you are facing the issue.
3)Tap on "Build Settings" and change "Build Active Architecture Only" to "NO"
4) Now try to build to build the project and your problem will be solved.
Hope this helps!
If you are using swift you have to link these libraries in the build settings of the project
search for the Framework search path and add the path for the libraries
I hope you have added all the frameworks mentioned by the Quickblox website ,
Add -lxml2, -ObjC flags to Other Linker Flags section in project settings
Official doc link including bolts if it's not already added by pods
For QMCV and QMService i am also facing some issue recently but after some setting is worked
Related
I am stuck with an issue since past 5+ hours, I am working on a react native project of version 0.59.0, it is a 1.5 years old project and it is working fine on android, but when building it for iOS, I was facing many issues one of which was:
ld: library not found for -lFirebaseCore
So to make it work, I included arm64 in excluded architecture and my build started working on simulator but my IPA was not working on a real device, again after removing arm64 and resolving multiple issues, I am stuck with the following issue which is coming in RNFirebaseLinks.m file as :
ARC Semantic Issue Group: No known class method for selector 'componentsWithLink:domain:'
Also sharing my device specifications:
macos: Macbook pro(11.0.1), chip: Apple M1,
Xcode version: 12.4
PodFile content:
**# Uncomment the next line to define a global platform for your project**
platform :ios, '10.0'
target 'PropertiesPublisherNew' do
**# Uncomment the next line if you're using Swift or would like to use dynamic frameworks**
#use_frameworks!
**# Pods for PropertiesPublisherNew**
pod 'Firebase/Core', '6.3.0'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Database'
**# pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'**
**# pod 'RNScreens', :path => '../node_modules/react-native-screens'**
**# pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'**
#pod 'react-native-webview', :path => '../node_modules/react-native-webview'
target 'PropertiesPublisherNewTests' do
inherit! :search_paths
**# Pods for testing**
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
target 'PropertiesPublisherNew-tvOS' do
**# Uncomment the next line if you're using Swift or would like to use dynamic frameworks**
**# use_frameworks!**
**# Pods for PropertiesPublisherNew-tvOS**
target 'PropertiesPublisherNew-tvOSTests' do
inherit! :search_paths
**# Pods for testing**
end
end
Can anyone please help me out with this?
Add pod 'Firebase/Core', '~> 5.15.0' in PodFile inside IOS Folder
My build failed with swift linker command failed with exit code 1. The logs specifically say symbol(s) not found for architecture x86_64
This happened ever since I tried setting up Google-Maps-iOS-Utils.
This is my Podfile. There is a pre_install portion because without it, pod install will have a 'Pods-Project' target has transitive dependencies that include static binaries error.
# platform :ios, '9.0'
target 'My App' do
use_frameworks!
platform :ios, '11.3'
# Pods for My App
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils' #the new pod that caused issues
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'GoogleSignIn'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
pod 'Fabric', '~> 1.7.9'
pod 'Crashlytics', '~> 3.10.5'
target 'My AppTests' do
inherit! :search_paths
# Pods for testing
end
end
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
This is my Bridging-Header.h
#ifndef Bridging_Header_h
#define Bridging_Header_h
#import <Google-Maps-iOS-Utils/GMUMarkerClustering.h>
#endif /* Bridging_Header_h */
Some troubleshooting measures I tried:
Cleaning Build Folder and Building again;
de-integrating pods and pod installing again.
Any help is appreciated. Thanks.
This solution worked for me. There is no need for this portion in the Podfile as well.
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
I also had to delete the framework the binary search path in Build Phases.
Try to add library location in binary search path of build setting.
This is what I see when trying to run tests under test target in my iOS App:
ld: framework not found AFNetworking for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is how my podfile looks like:
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.2"
def pods
pod 'AFNetworking'
pod 'Fabric'
pod 'Crashlytics'
pod 'MagicalRecord'
pod 'SDWebImage'
pod 'SVProgressHUD'
end
target 'MySoberRoomMate' do
pods
end
inhibit_all_warnings!
I am new on IOS development and did not have the required reputation to add comment so that I am posting answer.
I did a little work with pod file and i think the pods for the test target is not added in pod file so that the compiler showing the error.
do some thing like this in the pod file for the test target
target 'TestTarget' do
pods
end
add your test target name in place of 'TestTarget'
Hope it works.
I spend hours trying Extension target to use separate pods config from main target. The reason for that is that Pods are duplicated for extension target and thus making your whole app about twice in size. Need to make Extension contain only pods that's necessary there.
There seem to be some magic that XCode does when embedding Extension into main target, and CocoaPods seem to be oblivious to that whole procedure? Or I am doing it wrong? I tried al kinds of Podfile configurations, nothing works.
Anyone was able to successfully achieve that?
to reproduce:
Create a new project, target "MainTarget"
select Add Target > Today Extension, name target "Extension"
Create podfile:
target 'MainTarget' do
pod 'RestKit', '~> 0.20.3'
pod 'AFNetworking', '~> 1.3.1'
pod 'SSKeychain', '~> 1.2.0'
pod "MagicalRecord/Shorthand", '~> 2.2'
pod 'StyledPageControl', '~> 1.0'
pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.2'
end
target 'Extension' do
pod 'AFNetworking', '~> 1.3.1'
end
4 run pod install
5 build
result:
/Users/d/Library/Developer/Xcode/DerivedData/MainTarget-fvmcyblwdybpkdgfzflcjhqpjxab/Build/Products/Debug-iphonesimulator/libPods.a(AFHTTPRequestOperation.o)
/Users/d/Library/Developer/Xcode/DerivedData/MainTarget-fvmcyblwdybpkdgfzflcjhqpjxab/Build/Products/Debug-iphonesimulator/libPods-MainTarget.a(AFHTTPRequestOperation.o)
duplicate symbol _OBJC_IVAR_$_AFHTTPRequestOperation._successCallbackQueue in:
/Users/d/Library/Developer/Xcode/DerivedData/MainTarget-fvmcyblwdybpkdgfzflcjhqpjxab/Build/Products/Debug-iphonesimulator/libPods.a(AFHTTPRequestOperation.o)
/Users/d/Library/Developer/Xcode/DerivedData/MainTarget-fvmcyblwdybpkdgfzflcjhqpjxab/Build/Products/Debug-iphonesimulator/libPods-MainTarget.a(AFHTTPRequestOperation.o)
...(and so on... every file repeated 4 times.)
ld: 2148 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is because you're including AFNetworking at least twice. If it is the only library you need in your extension you should use:
target 'Extension', :exclusive => true do
pod 'foo'
end
Documented here
If you would instead like all your libraries linked to your extension you should remove your 'MainTarget' group and use link_with as shown here
I figured out how to do it thanks to Keith Smiley.
It required me a little testing. Here is what I did
platform :ios, 7.0
link_with ['Target', 'Target todays widget']
pod 'AFNetworking', '~> 2.2'
Than I had to remove the libPods.a and the others before redoing a pod install and it worked.
I have the project, that contains two targets one for iOS and one for OSX.
Here's how the Podfile looks like.
# Pods
xcodeproj 'ipolypus.xcodeproj'
pod 'BlocksKit'
pod 'Reachability'
pod 'MKStoreKit'
# Objective C
pod 'libextobjc'
pod 'LinqToObjectiveC'
target :ipolypus, :exclusive => false do
platform :ios, '5.1.1'
pod 'CocoaLumberjack'
pod 'EGOTableViewPullRefresh'
pod 'SVProgressHUD'
pod 'FlurrySDK'
# AdMob SDK and AdMob mediation adapter
pod 'AdMob'
pod 'AdMobMediationAdapterIAd'
end
target :ipolypusTests, :exclusive => true do
pod 'CocoaLumberjack'
end
target :'ipolypus-osx', :exclusive => false do
platform :osx
pod 'CocoaLumberjack'
end
After running pod install I can see that two Pods libraries are linked against the first target (ipolypus).
libPods.a and libPods-ipolypus.a
If I try to build the project right away, I will get strange link errors, like missing FlurrySDK symbols.
To fix it, I have to remove libPods.a and libPods-ipolypus.a from the list of libraries to link with the target, run pod install again, then manually remove libPods.a for the first target and then it will build and link.
There must be something wrong with the way I make that Podfile. I checked related posts, couldn't find similar problem.
Update
Here's the link error
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Flurry", referenced from:
objc-class-ref in IOSAppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After I do the steps described above, I will have successful builds until next pod install or pod update.
I should also mention, that the project had single target for quite a while, then I added OSX target and modified Podfile for that, and that's when the problems started.
But I tried to remove Podfile.lock and to wipe Pods folder, still the problem occurs.
And I had another type of error, where linker failed because the same symbol was already defined, but I don't see that one anymore.
I got to the cause of "double-linking" problem.
It's caused by the structure of the Podfile, as expected.
Since I wanted to have some common pods available both for OSX and iOS targets, I put them all in the beginning.
xcodeproj 'ipolypus.xcodeproj'
pod 'BlocksKit'
pod 'Reachability'
pod 'MKStoreKit'
# Objective C
pod 'libextobjc'
pod 'LinqToObjectiveC'
These common pods will be in libPods.a library, also, CocoaPods can't stand the fact that some pods library is not linked against a target, so it will link libPods.a against default project target, in my example it's ipolypus.
Then there's libPods-ipolypus.a generated for ipolypus iOS target. Since this target is not exclusive, things like FlurrySDK will be included into both libPods.a and libPods-ipolypus.a, resulting into duplicated symbols while linking.
After trying to figure out the proper way to use exclusive/non-exclusive target configs, I ended up with separate list of pods for each target. Might be a bit longer than I would want, but does the job as expected.
# Pods
xcodeproj 'ipolypus.xcodeproj'
target :ios, :exclusive => true do
platform :ios, '6.0'
link_with 'ipolypus'
# shared
pod 'CocoaLumberjack'
pod 'Reachability'
pod 'MKStoreKit'
pod 'LinqToObjectiveC'
# pod 'EGOTableViewPullRefresh'
# platform
pod 'SVProgressHUD'
pod 'FlurrySDK'
# AdMob SDK and AdMob mediation adapter
pod 'Google-Mobile-Ads-SDK'
pod 'AdMobMediationAdapterIAd'
end
target :iosTests, :exclusive => true do
platform :ios, '6.0'
link_with 'ipolypusTests'
pod 'OCMock'
end
target :osx, :exclusive => false do
platform :osx, '10.7'
link_with 'ipolypus-osx'
# shared
pod 'CocoaLumberjack'
pod 'Reachability'
pod 'LinqToObjectiveC'
end
target :osxTests, :exclusive => true do
platform :osx, '10.7'
link_with 'ipolypus-osxTests'
pod 'OCMock'
end