Cannot find module error when archiving iOS project using CocoaPods - ios

I get an error "cannot find module SwiftMessages" when archiving an iOS project. I'm using CocoaPods, Xcode V10.2, and iOS V10.1. Here's my pod file:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.1'
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Minuteapp
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'FacebookShare'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase'
pod 'FolioReaderKit'
pod 'SwiftyStoreKit'
pod 'SwiftMessages' , '7.0.0'
pod 'GoogleSignIn'
pod 'Promises'
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
pod 'Flurry-iOS-SDK/FlurrySDK' #Analytics Pod
pod 'Flurry-iOS-SDK/FlurryAds' #Advertising Pod (requires Analytics)
pod 'Flurry-iOS-SDK/FlurryMessaging'
pod 'STPopup'
pod 'SendGrid-Swift'
pod 'DeviceKit'
end

Try deleting the DerivedData folder:
~/Library/Developer/Xcode/DerivedData/
There is a folder inside named ModuleCache that caches module versions. Removing it will make all the modules be recompiled, probably solving your issue.

Related

iOS : duplicate symbols for architecture arm64 after pod install

I am getting error when added a new pod. My initial pod file was
#platform :ios, '9.0'
target 'xxxxxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TPV Plus
pod 'IQKeyboardManagerSwift'
pod 'SDWebImage'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'EVReflection/MoyaRxSwift'
pod 'SwifterSwift'
pod 'Crashlytics'
pod 'Fabric'
pod 'LGSideMenuController'
pod 'CCBottomRefreshControl'
pod 'MaterialComponents/ActivityIndicator'
pod 'TweeTextField'
pod 'DropDown'
pod 'DisPlayers-Audio-Visualizers'
pod 'MaterialComponents/BottomSheet'
# pod 'GooglePlacePicker'
pod 'GooglePlaces', '3.6.0'
pod 'GoogleMaps', '3.6.0'
I have commented few and added FirebaseCrashlytics. Below is the updated one
#platform :ios, '9.0'
target 'xxxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TPV Plus
pod 'IQKeyboardManagerSwift'
pod 'SDWebImage'
# pod 'Firebase/Core'
# pod 'Firebase/Messaging'
pod 'EVReflection/MoyaRxSwift'
pod 'SwifterSwift'
# pod 'Crashlytics'
# pod 'Fabric'
pod 'LGSideMenuController'
pod 'CCBottomRefreshControl'
pod 'MaterialComponents/ActivityIndicator'
pod 'TweeTextField'
pod 'DropDown'
pod 'DisPlayers-Audio-Visualizers'
pod 'MaterialComponents/BottomSheet'
# pod 'GooglePlacePicker'
pod 'GooglePlaces', '3.6.0'
pod 'GoogleMaps', '3.6.0'
pod 'FirebaseCrashlytics'
end
But when I build the project getting error error build: 13 duplicate symbols for architecture arm64
In the project all other library files are duplicated as shown in picture. The project is git integrated.
How will I solve this issue.
I figured out the issue happened here. During the git commit, the pod files were committed partially to git. So I deleted the entire pod folder and kept the pod.lock file as such. After that did the pod install. So all the duplicate files were deleted and project is building successfully.

Command PhaseScriptExecution failed with a nonzero exit code Xcode v12.0.1

I am using
Xcode v12.0.1
Cocoa pod v1.10.0.
This is my pod file
# Uncomment the next line to define a global platform for your project
plugin 'cocoapods-binary'
platform :ios, '8.0'
all_binary!
target 'Food' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Food
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Messaging', :binary => false
pod 'FirebaseMessaging', :binary => false
pod 'Firebase/DynamicLinks'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Firestore'
pod 'Firebase/Analytics'
pod 'EasyTipView'
pod 'Hero'
pod 'SwiftLint'
pod 'ReachabilitySwift'
pod 'Koloda'
pod 'UIColor+FlatColors'
pod 'SDWebImage'
pod 'Stripe'
pod 'GoogleSignIn'
pod 'Alamofire', '~> 4.7.3'
pod 'JGProgressHUD'
pod 'Fabric'
pod 'Crashlytics'
pod 'DTButtonMenuController'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'ActiveLabel', :binary => false
pod 'Intercom', '~> 5.4.1'
pod 'AWSS3'
pod 'GooglePlacesSearchController', :binary => false
pod 'GooglePlaces', :binary => false
pod 'GooglePlacePicker',:binary => false
pod 'GoogleMaps',:binary => false
pod 'AMPopTip'
end
All the dependencies are successfully installed and also Prebuilding process is also completed for all dependencies
Deployment target of my project and pod project is same -
Build phase:
I am getting this error when I am running app on iPhone 7 device.
What I tried :
I have removed derived data and cache and restart the Xcode and Mac.
I have also deleted all the pods podlock file, .workspace and then reinstall dependencies.
I have tried #1 and #2 many times.
After doing above points my issue is not resolved.
The pods deployment version maybe could be.
In my case when I've updated pods to the suggested target version my app starts to have a lot of warnings and errors.
But you can try with this post answers, it's a similar question.
Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code

Using Pods in Share Extension fails

Inside my project I have a shareExtension and I need to install a pod for it.
I tried it like this:
target 'Wishlists' do
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Database'
pod 'Hero'
pod 'RevealingSplashView'
pod 'LBTAComponents'
pod 'lottie-ios'
pod 'SwiftEntryKit', '1.2.3'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'GoogleSignIn'
pod 'SkeletonView'
pod 'SwiftSoup'
end
target 'ShareExtension' do
pod 'SwiftSoup'
end
I simply tried adding the target and the pod I need (SwiftSoup), but my app is crushing now because the pods for my main project (Wishlists) do not work anymore. Does anyone know what's wrong with the file? Can not figure it out.. I ran pod install already.
I found the bug.. I deleted use frameworks! by accident from my podfile inside the Main Project. I added it again and also had to add it to the ShareExtension and now it is working.

Flurry IOS SDK Error - Undefined symbol: ___isPlatformVersionAtLeast

When I try to build my app, I get the following error
Showing Recent Messages
:-1: Undefined symbol: ___isPlatformVersionAtLeast
I tried cleaning the build, reinstalling the pods, but nothing works. Can someone please help?
I'm using XCode V10.3, IOS V 11.2.
Here's my pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '11.2'
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Minuteapp
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'FacebookShare'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase'
pod 'FolioReaderKit'
pod 'AppAuth','~> 1.2.0'
pod 'SwiftMessages' , '7.0.0'
pod 'GoogleSignIn'
pod 'Promises'
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
pod 'Branch'
pod 'Flurry-iOS-SDK/FlurrySDK' #Analytics Pod
pod 'Flurry-iOS-SDK/FlurryAds' #Advertising Pod (requires Analytics)
pod 'Flurry-iOS-SDK/FlurryMessaging'
pod 'ApphudSDK'
pod 'SDWebImage', '~> 5.0'
pod 'AQPlayer'
pod 'DeviceKit'
pod "SwiftRater"
pod "STPopup"
pod 'iOSDropDown'
end
It looks like the Flurry SDK was built with Xcode 11.
Options:
Upgrade to Xcode 11
Ask Flurry to support Xcode 10.3
Use an old version of the Flurry SDK that was built with Xcode 10

'FBSDKAppEvents.h' file not found when using cocoapods for facebookSDK

I am trying to update FacebookSDK using cocoapods in my RN app and i keep getting error:
'FBSDKAppEvents.h' file not found.
at file FBSDKCoreKit.h
My pod file is
target 'App' do
use_frameworks!
# Pods for App
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end
try with this pod
target 'App' do
use_frameworks!
# Pods for App
pod 'FacebookSDK'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end

Resources