No such module 'FirebaseUI' iOS - ios

Podfile
pod 'Firebase/Core'
pod 'FirebaseUI'
pod 'FirebaseUI/Auth'
In my ViewController.swift i have
import FirebaseUI
error i get is
No such module 'FirebaseUI'

Sounds to me like you might be opening the Xcode project instead of the Xcode workspace created by CocoaPods.
After you run pod install, CocoaPads will create an Xcode workspace (it has a .xcworkspace extension). You need to open this instead of the Xcode project (with the .xcodeproj) extension, otherwise Xcode will not be able to find the frameworks in your pod file.
Oh, and one more thing... Even if you open the workspace, you will still get this error until after your first compile. This is because the frameworks specified in the Podfile will not yet be built. After your first build all should be well!

Related

Cocoapods "Framework not found Pods_<my_project_name>"

I am trying to set up Cocoapods with my project for the first time, to use one framework that only comes as a pod. I already have an xcworkspace file, so I specified that in the Podfile. When I run pod install, it adds a reference to a framework Pods_<my_project_name>, but Xcode can't find that framework at build time. I can't find it on disk either. I see the framework for my one included pod framework in the Pods directory, but no Pods_<my_project>.framework.
If I delete the reference to the errant framework I can build, but it comes back if I run pod install again.
My issue is very similar to this reported issue, but I am definitely opening and building via my xcworkspace file.
When I first ran pod install it warned about some things, like including a reference to their xcconfig file in mine and setting $(inherited) in some settings I had values for - I fixed all those, and pod install no longer produces any warnings.
What is this framework supposed to be / do? Where is it supposed to live?
EDIT: Here's the Podfile:
platform :ios, '12.0'
workspace 'iOS'
target "MyProject" do
use_frameworks!
pod 'AdaptiveCards', '1.2.7'
end

Install native iOS pod in flutter

I am facing an error while making a flutter plugin on the iOS side while using pods. The pods are installed successfully then also I am able to import them in the file.
The pod in my case which I am trying to use is Freshchat iOS SDK
Steps I have followed to install the pod
Start a new Flutter plugin project.
In .podspec file add s.dependency 'FreshchatSDK'
Run pod install in example/ios folder.
I got an error
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/nimish/FlutterProjects/freshchat_flutter/freshchat_flutter/example/ios/Pods/FreshchatSDK/FreshchatSDK/libFDFreshchatSDK.a)
I removed use_frameworks! from podfile following this comment .
I ran pod install again and the pods were successfully installed and Pods folder was created which had FreshchatSDK folder in it.
Now I need to have use_frameworks! in my project because other plugins are not compiling because of this.
I added s.static_framework = true in .podspec and use_frameworks! in podfile. Now pod install ran successfully,
After I added the import #import "FreshchatSDK.h" in my Plugin.h file I got the error
error: include of non-modular header inside framework module
I tried this answer but was not able to resolve it.
Please help me resolve this. I'll be respectful of your time.
There is another flutter plugin available here but it has many issues and one unhandled case is making my iOS app crash so I want to make it my own.
There may be problems in the PodFile due to unmatched Targets.
When this happens to me, I used these simple steps.
Delete Podfile
Open Terminal at the specific file
Pod init
Open Podfile and adds Dependencies
Pod install

No such module 'Firebase' error in Xcode 11.0 beta 5

I have been looking up on every website that had a similar/identical to this specific issue for Xcode of earlier version errors and I have tried everything and nothing has worked. I have cleaned and then tried to build the project but that hasn't worked.
The terminal shows that the firebase pod has been successfully installed but when try to import firebase the xcode says there is no such module Firebase
Then I tried to use adding the framework manually but when I try to build then Xcode says framework not found firebasecore .
I am stuck there ..what can I do next?
Comment all pods in pod file, then install only
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
For firebase notifications, because some time xcode do not install frameworks of pod files.
Open your pod file from project directory and add this
pod 'Firebase/Core'
then go to terminal and install pod again
pod install
after that make sure you build your project (⌘+B) before use.
Make sure you are opening .xcworkspace file from project directory.

Xcode 10, not building pods can't build project

After updating to the latest Xcode to support ios12
I can't build my project
It seems that none of the pods are being compiled.
I'm getting an error for unknown import such as "file not found" (ex 'SDWebImage/UIImageView+WebCache.h' file not found)
(if I comment everything related to this, it's just showing an error for the next package that does not exist)
for plugins installed from pod.
if I add the pod scheme and compile it, and then compile my project all the imports are working fine
but then I get this compiler error for every package:
Showing Recent Messages
:-1: ignoring file
/Users/administrator/Library/Developer/Xcode/DerivedData/XXXProject-
ajmnddfiwycmqihdrqgzcltbrovs/Build/Products/Debug-
iphonesimulator/Pods_XXXProject.framework/Pods_XXXProject, file was
built for archive which is not the architecture being linked (i386):
/Users/administrator/Library/Developer/Xcode/DerivedData/XXXProject-
ajmnddfiwycmqihdrqgzcltbrovs/Build/Products/Debug-
iphonesimulator/Pods_XXXProject.framework/Pods_XXXProject
My pod file is very simple, my projects have 3 extensions
It worked fine before the update.
I've tried removing, installing few times, updated my pod to 1.5.3
Nothing seems to work.
(tried even with the pod beta version 1.6)
Tried both Legacy and New System build getting same error for both.
In the project build phases, everything seems fine and should be copied.
(using use_frameworks!)
This is how my podfile looks like
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target ‘XXXXX’ do
pod 'GoogleAnalytics'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'FBAudienceNetwork'
pod 'FBSDKLoginKit'
pod 'Fabric', '~> 1.7.6'
pod 'Crashlytics', '~> 3.10.1'
pod 'AccountKit'
pod 'SDWebImage', '~> 4.0'
pod 'BEMCheckBox'
end
Any ideas what's wrong?
This is the problem of your previous cache store in the derived data folder.
Go to the DerivedData folder.
Close XCode.
Delete your apps from DerivedData folder.
Reopen XCode, clean project and run again.
XCode preference > Locations > Derived Data (click right side icon in the directory path, it will open DerivedData folder)
Select your pod from the left project navigator. > Select Target. >
Select "Build Settings". > Build Active Architecture Only to No
Here is another case: make sure "Scheme" > "Build" > "Find Implicit Dependencies" is turned on.
I turned it off (tried to fix another problem) and spent quite some time trying to fix the build.
In my case
pod deintegrate
pod clean
pod install
then rebuild the project works.
My XCode = 11.3.1
I had the same problem with Xcode 10 and newly added pods.
I've noticed new pod was not added to Target -> Build Phases -> Link Binary With Libraries. When I added new pod-framework manually, archiving worked ok.

Swift: Can't import Frameworks in Xcode, running into error: 'no such a moudle' (installed using cocoapods)

Its frustrating seeing this error every time i use cocoa-pods. The only thing that works with cocoa-pods is 'Firebase SDK' but when i install any other framework such as JSQMessages or Eureka forms or any other framework i got an error 'No such a module" ... Its not the first time I work with these frameworks I did before and it was working correctly in fact I still got my previous projects installed with JSQMesgs, eurka..etc and its working fine till now. For the new projects it doesn't work/import in xcode anymore it is frustrating that I can't run it with this error ... not sure if its xcode or the cocopods .. I have tried instaling using terminal then uninstall and reinstall again with cocoapods application. I cleaned my build, change deployment target several times, and nothing worked so please if any one could share the same problems faced or advice me on how to avoid them or any alternatives to cocoapods.
deployment target 10.3 my xcode version 8.3.3 swift 3 macOS Sierra 10.12.5
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'FinalProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FinalProject
pod 'Firebase/Core'
pod 'Firebase'
pod 'FirebaseAuth'
pod 'FirebaseDatabase'
pod 'FirebaseStorage'
pod 'ProgressHUD'
pod 'JSQMessagesViewController'
pod 'Eureka'
pod 'Former'
pod 'SwiftForms'
end
Please help.
Build the project.
The Xcode editor doesn't recognize modules coming from the Pods until after they've been built for the first time.
If that doesn't work for you, please share a screen shot of the issue, or even better, a reproducible example.
I had the same problem trying to work with SwiftyStoreKit.
I finally manage to solve my problem and hope that sharing the solution will help someone.
I tried everything was suggested until I realised that I was loading the pod in the wrong target, (in the pod file itself.)
After I repaired the pod file, run again pod install, and, voila, the xcode recognised the pod.

Resources