Getting library not found error with TwilioVideoFramework using Cocoapods - ios

I have integrated TwilioVideo Framework using cocoapods.
I can successfully compile the code without any errors but after compiling the code, my code is crashing with below error
dyld: Library not loaded: #rpath/TwilioVideo.framework/TwilioVideo
Referenced from: /var/containers/Bundle/Application/E766BE03-A6C7-4BF7-A0B3-9FE2D76844DD/XXXXXXXX.app/XXXXXXXX
Reason: image not found
I tried different answers but nothing worked for me.
Does any one experienced this issue with TwilioVideo Framework.
System Specifications I used:
XCode 8.3.3
Deployment Target 8.1
My Pod file looks as below
xcodeproj 'ProjectName'
workspace 'ProjectName'
target :"ProjectName" do
platform :ios, '8.1'
pod 'AFNetworking', '2.6.3'
pod 'SocketRocket', '0.5'
pod 'TwilioSDK', '~>1.2.6'
pod 'TwilioVideo', '~> 1.3.0'
end
Thanks in Advance.....!

Related

1188 duplicate symbols for architecture arm64

this question has been asked a ton of times already but I'm still not able to understand how to really solve this...
I'm a beginner guy in iOS i never did iOS before and I do not understand how this things works, like armv64, armv7, armv64e, armv7s... There are a ton of configurations in the project file I don't understand and I don't even know if they are right or wrong...
My situation at the moment is I'm trying to publish an app to app store but I received an e-mail saying this
ITMS-90809: Deprecated API Usage - Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more
Well to my understanding I need to stop using in my app UIWebView and start using WKWebView.
It's ok I did change my code to support WKWebView, but the problem is I still get the error because i have an external library referenced in my Pods.
The library is named AFNetworking and through some research on this post they recommend to change on my Podfile from:
pod 'AFNetworking', '~> 3.0'
to
pod 'AFNetworking', '~> 4.0'
Very well I did change it but it also forced me to changed my deployment target from:
platform :ios, '8.0'
to
platform :ios, '9.0'
Because of this error, "Specs satisfying the AFNetworking (~> 4.0) dependency were found, but they required a higher minimum deployment target."
After I did that i launched the file .xcworkspace and when I try to build I always get these errors of duplicate symbols, lipo, mach-o linker, etc... And honestly this is really confusing to me.
I did try the clean / build method, deintegrate and install pods again, but doesn't solve it, can you please help me ?
EDIT
My Podfile pods:
pod 'MagicalRecord', '~> 2.2'
pod 'MLPAutoCompleteTextField', '~> 1.5'
pod 'MBProgressHUD', '~> 1.1.0'
pod 'ECSlidingViewController', '~> 1.3'
pod 'Fabric', '~> 1.7'
pod 'Crashlytics', '~> 3.9'
pod 'AFNetworking', '~> 4.0'
pod 'Firebase/Messaging'
Image of errors:
Thanks for everyone that helped me trying to get this fixed.
I was able to fix it by doing these steps:
I removed some librarys I had referenced in my target, by going to project view -> target -> general and then here I removed some duplicated librarys I had.
After that I closed XCode and then went to my project folder in finder and deleted, pods folder, podfile.lock, .xcworkspace file.
I also added a line in my podfile use_frameworks!
Open terminal, go into project folder, and did the following commands:
pod deintegrate
pod install
After that opened the newly created .xcworkspace file, clean project and then build.
I think the problem I had is that I had these frameworks in my project targets and they were the same as in the pods so that's why I had the issue of duplicate symbols.

xcode library not found for -lAFNetworking

I have a ObjC app project with a UI Automation Swift target in it. By default the Run and Test build work successfully.
But I have to add a Cocoa Pod with a Swift framework for the UI Automation target... Podfile:
workspace 'BlahApp.xcworkspace'
platform :ios, '8.0'
project 'BlahApp/BlahApp.xcodeproj'
target 'BlahApp' do
pod 'Blahpod', '~> 2.1.6'
pod 'Mehpod', '~> 3.10.0'
end
target 'BlahAppUITests' do
use_frameworks!
platform :ios, '9.0'
pod 'autom', :git => 'https://blah.to.my.repo', :branch => 'master'
end
So I add this, do a pod install, Xcode clean, Xcode Run --> works, Xcode Test fails with:
ld: library not found for -lAFNetworking
AFNetworking is used in Blahpod.
Time wasted trying to get Xcode/Cocoapods to do what I want: 2 days
Somebody please help me here. tried other people's solution to the error message to no avail.
in build setting , search for Run Path
then add "#executable_path/Frameworks" and Remove All other Content Related to AFNetworking

Tealium framework "dyld: Library not loaded:" error using cocoapods

I have installed a pod in podfile:
pod 'TealiumIOS', '~> 5.0'
But an error occurs in runtime.
"dyld: Library not loaded: #rpath/TealiumIOS.framework/TealiumIOS
Referenced from: ...
Reason: image not found"
I can't find the solution in any other stackoverflow posts. I'm running XCode 7.3 and I tried simulator and a real device. Pods version 1.0.1. The crash persists.
Thank you.
I had a similar problem, so probably my solution is going to be useful for you as well.
Looks to be that Tealium pod was created just as a framework option and you are using cocoapods with the static library option. Basically you have to add the use_frameworks! option in the podfile.
platform :ios, 8.1
use_frameworks!
target :YourTarget
pod 'TealiumIOS'
end
Enjoy :)

Build Failed: No such module 'KIF'

I've been having a sporadic issue when attempting to reference KIF in my Swift project.
My project stopped compiling after I did a "clean", and has been giving me the error: No such module 'KIF'
Here is my cocoapods file entry for KIF:
target 'MyProjectTests', :exclusive => true do
pod 'KIF', '~> 3.0', :configurations => ['Debug','QA']
end
(This is the recommended cocoapods config from KIF's readme.)
I can get it to compile again by changing the cocoapods entry from the above to:
pod 'KIF', '~> 3.0'
But the project crashes when attempting to run:
dyld: Library not loaded: #rpath/XCTest.framework/XCTest
Referenced from: /Users/albertbori/Library/Developer/CoreSimulator/Devices/29008343-5A97-47FB-B0E6-66D18A331BDA/data/Containers/Bundle/Application/C0E16F80-9A08-4228-96F7-8A24F08AB066/MyProject.app/Frameworks/KIF.framework/KIF
Reason: image not found
Then, if I switch it back to the original config, and do a pod install, testing with KIF works again...
How can I reference KIF correctly to ensure stable building and development with that framework?
After posting this issue on CocoaPods issue tracker, kylef helped me realize that I was inadvertently double-linking the pods.
Here is his pull request to resolve the issue on an example project I made.
In summary, the Podfile should look something like this, if you want to link both the root project and a test project, but conditionally add an extra pod to the test target:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'MBProgressHUD', '~> 0.8'
pod 'Locksmith'
target 'catch22Tests' do
pod 'KIF', '~> 3.0'
end
In this case, you DO NOT want to use: link_with 'catch22', 'catch22Tests' or it will link catch22Tests twice.

"'OpenGL/OpenGL.h' file not found" triggered by GPUImage cocoapod in my iOS project

Despite the fact that I'm installing it in a iOS project, it looks like GPUImage is demanding a MacOSX library. I'm getting this error:
MyProject/Pods/GPUImage/framework/Source/Mac/GPUImageContext.h:2:9: 'OpenGL/OpenGL.h'
file not found
How can I fix this? Why is it trying to include a mac framework "framework/Source/Mac"? Is there something causing CocoaPods to think I'm trying to compile for a OSX target?
My podfile:
platform :ios, '6.1'
pod 'Mantle', :head
pod 'Archimedes', :head
pod 'ReactiveCocoa', :head
pod 'GPUImage', '~> 0.1.0'
Fixed by adding these lines to podspec:
s.osx.exclude_files = 'framework/Source/iOS/**/*.{h,m}'
s.ios.exclude_files = 'framework/Source/Mac/**/*.{h,m}'
Fixes pushed to master podspec repo.

Resources