FBSDKs installed via Pods - No such module on Swift - ios

I installed the following pods to my Swift project:
platform :ios, '8.0'
pod 'ParseUI', '~> 1.1.4'
pod 'Parse', '~> 1.7.5'
pod 'FBSDKCoreKit', '4.3.0'
pod 'FBSDKLoginKit', '4.3.0'
pod 'FBSDKShareKit', '4.3.0'
pod 'ParseFacebookUtilsV4', '~>1.7.5'
pod 'AFNetworking', '~> 2.5.4'
I added a Bridging Header for all the pods except the 3 FBSDKs. On https://developers.facebook.com/docs/ios/getting-started , it says...
"Swift
v4.1 of the SDK supports modules natively so no bridging headers are required. Simply import the appropriate kit module in your .swift files"
Problem is when I try to import those 3 frameworks to AppDelegate, I get the error message "No such module 'FBSDKCoreKit'"
Anyone encounter this issue before?
Thanks in advance.

Try adding use_frameworks! to the top of your podfile. It solved my problem. Initialy it is shown as #use_frameworks! in podfile . Remove the # infront of use_frameworks!. This blog explains about it.

Related

Swift 4.2 - Getting compiler errors for bridging header files missing in FacebookCore. Any ideas?

So I recently converted an old swift 3.2 project to a 4.2(quite the jump, i know).
I am getting these errors:
Here is my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'app' do
pod 'Alamofire', '~> 4.0'
pod 'EVReflection/XML'
pod 'FontAwesomeKit', :git => 'https://github.com/PrideChung/FontAwesomeKit.git'
pod 'SVProgressHUD'
pod 'PageMenu', :git=> 'https://github.com/orazz/PageMenu.git'
pod 'Kingfisher', '~> 3.0.0'
pod 'RichEditorView'
pod 'SwiftKeychainWrapper'
pod 'FacebookCore'
pod 'CHTCollectionViewWaterfallLayout/Swift'
pod 'FacebookLogin'
pod 'FacebookShare'
pod 'Fuzi', '~> 1.0.0'
end
does this look correct?
Thank you for any insights
First, run pod install
And then, check if the version of your pods, probably they are not compatible with Swift 4.2, so you have to update then, or change the "Swift language version" on Pod inspector to swift 3.2 like that way:
Select the "Pod" project in project navigator:
Select your pod on Targets selector:
And on "Build settings" tab, find and change the "Swift language version" property:
Note: You can get away of this problem this way, but i highly recommend that you update your pods.

iOS Firebase UI Gives many errors

I get many errors when trying to build the project with (pod 'FirebaseUI', '~> 4.0') dependency.
My pod file looks something like this:
platform :ios, '9.0'
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'FirebaseUI', '~> 4.0' (This causes a lot of errors)
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/Twitter'
Some of the errors are:
/Users/Home/GoogleDrive/iOS/TheBolt/Pods/Target Support Files/nanopb/nanopb-umbrella.h:1:9: Could not build module 'UIKit'
and
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:505:9: Unknown type name 'NSString'
and
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:514:50: Missing '#include '; declaration of 'Protocol' must be imported from module 'ObjectiveC.runtime' before it is required
I'm using Xcode 9 with swift 4. I tried to use swift 3.2 in build settings but the same errors still there.
There was no need for (pod 'FirebaseUI', '~> 4.0') along with the others. Adding it alone or just the necessary login pods solved the problem

Google-Maps-iOS-Utils with google maps missing GMSGeometryUtils.h

I been struguling with this for hours now, I can't understand what is wrong. I followed googles iOS cluster setup carefully, but no mater what I do it doesn't work. I'm getting this error:
.../Pods/Google-Maps-iOS-Utils/src/Clustering/Algo/GMUNonHierarchicalDistanceBasedAlgorithm.m:22:9: 'GoogleMaps/GMSGeometryUtils.h' file not found
I have installed the following:
Using Alamofire (3.4.1)
Using Google-Maps-iOS-Utils (1.0.0)
Using GoogleMaps (1.9.2)
Pod file:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.3'
use_frameworks!
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
target 'Happevents' do
pod 'GoogleMaps' # Objective-C pod
pod 'Google-Maps-iOS-Utils' # Objective-C pod
pod 'Alamofire', '~> 3.4' # Swift pod
end
I installed Google-Maps-iOS-Utils in my project by pod installation. Please update your pod file
target 'Happevents' do
pod 'GoogleMaps' # Objective-C pod
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils'
pod 'Alamofire', '~> 3.4' # Swift pod
end
You should remove use_frameworks! from your pod file
There is a manual from Google how to use their library with Swift and use_frameworks! you could also check this one.

CleverTapSDK module not found

I am using various Swift and Objective-C libraries in my (Swift) project. My Podfile looks as follows:
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Fabric'
pod 'TwitterKit'
pod 'SimpleAuth/Instagram'
pod 'AFNetworking', '~> 3.0'
pod 'Parse'
To have support for using both (Swift and Objective-C) libraries, I use use_framework! directive in Podfile to install and use them. If we use directive use_framework! for Objective-C libraries, we are not required to create any kind of bridging-header.h and we can use it directly by import ModuleName. I am having no issues with any of the above mentioned pods/frameworks while installing or using them.
But there is this one framework which is written in Objective-C and I install it by adding its entry in Podfile as pod 'CleverTap-iOS-SDK'. The installations goes well but when I try to import CleverTapSDK or import CleverTap to use the library, it is giving me no such module error.
Just in case: My Xcode version is - 7.3 (7D175)

CocoaPods use_frameworks HCSStarRatingView

I have been using pods not problem in my project. I recently added a pod to my podfile "HCSStarRatingView" which in the README says I need to add use_frameworks! at the top.
I did that and ran pod update. I am no longer able to #import <>, #import "" or #import any of my pods. Parse, MBProgressHUD, etc. None are found with any of those import statements. Also, HCSStarRatingView is not found with any combination of import statement either.
I have deleted my pods directory and ran pod install again, which did not fix the issue. My project does not have any Swift. I removed use_frameworks! (old pods work) but then I am still unable to import HCSStarRatingView. There are no issues for this on GitHub and I have not found any questions that help with my issue.
I have also cleaned my project as well as the build folder.
Very simple pod file:
use_frameworks!
pod 'MBProgressHUD'
pod 'Parse'
pod 'ParseFacebookUtilsV4'
pod 'ParseUI'
pod 'ParseCrashReporting'
pod 'RSKImageCropper'
pod 'CRToast'
pod 'JSQMessagesViewController'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'HockeySDK', '~> 3.8'
pod 'SDWebImage', '~> 3.7'
pod 'UIActivityIndicator-for-SDWebImage', '~> 1.2'
pod 'MHVideoPhotoGallery', '~> 1.6'
pod 'TDOAuth', '~> 1.1'
pod 'HCSStarRatingView', '~> 1.4.3'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'

Resources