I am a beginner in Xcode, and I have just installed the Firebase framework with CocoaPods. When I import the framework, I want to add the line "FirebaseApp.configure()" but when I add it, Xcode gives me an error : "Cannot find 'FirebaseApp' in scope". How can I solve this error?
I already tried to re-install the framework !
enter image description here
I believe you have opened the wrong project. Things you can do to verify is to
Check if the pods have been added. For this check the root directory in Finder and see if you have a folder called Pods, or check if a folder named Pods can be seen in your project within XCode. If not open terminal go to your project directory and type pod install
After you have verified that the pods have been installed, open the KeKonMange.xcworkspace instead of the KeKonMange.xcodeproj from your finder directory (.xcworkspace is the white icon, while .xcodeproj is the blue one. example can be found below)
If you can't resolve your problem, comment below
I don't know if this helps but when I tried to launch the project, another error appeared: "Could not build Objective-C module 'Firebase'"... Maybe it has something to do with...?
Image of code : https://i.stack.imgur.com/bgkSz.png
Related
I was installing Realm and imported to my project but when I run the app it shows me an error:
ld: framework not found RealmSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There can be multiple reasons for this issue.
To get the exact issue you can follow the below step :
Right click on error and select 'Reveal in log'. This will give you more insight about the reason of error.
One of the solution is to setting the 'Enabled Bitcode' to No. For this go to Build settings in your target and search 'Bitcode' in the search field.
I have faced this issue multiple times and one of the below solution may work for you.
After installing the pods make sure that you're opening the workspace instead of Xcode project file.
Restart Xcode
Remove derive data for your application
Reintegrate pods using pod deintegrate and pod install for your project
Reset simulator(If you are viewing the output in simulator)
Ensure proper linking of Framework in your project
Restart simulator
Clean project etc.
Hope this may help you.
I was having the same issue.
Initially, I was trying to import the files (Realm.framework and RealmSwift.framework) from download folder but then i was getting the same error like yours.
What i did then, i copied the folder containing the (Realm.framework and RealmSwift.framework) into the project folder and then i imported the files from there. That resolves my issue.
In my case, I've updated the Cocopods to the latest version (1.1.0) via this command sudo gem install cocoapods
is it possible that you are still running the .xcodeproj file. You should run .workspace file in your xcdoe
After doing a pod update command to update all of the pods in my project I am getting the following error for the Twitter kit:
/Users/user/iOS/Apps/myApp/Pods/TwitterKit/TwitterKit.framework/Versions/A/Resources/TwitterKitResources.bundle: No such file or directory
I have looked in the TwitterKit folder and this the correct file path for the Resources.bundle :
/Users/user/iOS/Apps/myApp/Pods/TwitterKit/iOS/TwitterKit.framework
I have tried :
Manually changing the directory of the resource.bundle by going on
identity and type tab and clicking on the folder icon to set the file
path.
Removing the pod and then installing it.
Cleaning and rebuilding the Xcode
However I am still getting the same error message.
I have never had this issue before with pods, does anyone know how to solve this ?
Thanks
I have resolved the same error deleting the TwitterKit.framework from the Frameworks folder.
Somebody please save me.
This is the error I'm getting. I've tried cleaning, doing a build clean, pod installs and updates. I have not found a solution.
Shell Script Invocation Error Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/Anti-Social: No such file or directory
I have similar issues in the past and doing the following work for me. Hope your problem is same as mine:
Close xCode
Go to this folder Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/
and delete Anti-Social.
Restart xCode, clean & build.
It is hard to really tell you the solution with just the information provided. However, the first thing I would try is deleting the derived data, as CodeBender stated. You should also look at your search paths in your project's building settings to make sure your pods are correct/ connecting your pods files to your project.
Possible duplicate of:
Xcode 8 Shell Script Invocation Error
Here is what I did when I got this:
Used this site to completely remove All Versions of cocoapods:
https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
Re-installed current stable version of cocoapods (v1.1.1 for me)
Deleted podlock and pods directory
Deleted old .xcworkspace file (this was key for me).
Did "pod install"
Opened xcode and cleaned project and deleted derivedData.
Go to your build phases and remove libReact.a from the linked libraries.
Then add libReact.a but select this one:
libReact.a from 'React' target in 'Pods' project
A year ago I had a project where I was using AWS. I forget exactly how it worked but it involved a BridgingHeader and no use of Frameworks.
I came back to this project today and none of the AWS stuff was working. I deleted all AWS/pod related files, got rid of the BridgingHeader reliance, cleaned the project, and proceeded to follow the pod-based instructions here:
http://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup.html
However, the project still doesn't recognize any of the AWS libraries (getting the error "Use of unresolved identifier AWS...").
I saw a post by someone that suggested simply putting "import Framework" at the top of the files that use that Framework, but this doesn't work (it doesn't recognize AWSS3 when I put "import AWSS3", for example).
Then I saw advice that suggested figuring out the correct "Framework/Header/Library Search Paths" and so I created a brand new project, copied the podfile, and ran pod install. In this new project I am getting the error:
ld: warning: directory not found for option
'-F/Users/username/Library/Developer/Xcode/DerivedData/TestProj-gmhzshcpuyuvaffaocakhunyepaw/Build/Products/Debug-iphonesimulator/AWSAutoScaling'
for each of the AWS libraries.
When I go into the target build settings, I see that the Framework Search Paths have strings relating to the AWS libraries, but when I delete them I then get the error "ld: Framework not found AWSAutoScaling".
I tried giving the direct path to the respective folders but I get the same error.
I fixed the problem by opening the .xcworkspace file instead of the the .xcodeproj file.
Original issue: xcodeproj components didn't display in workspace
I've installed Cocoapods on my machine. When I install a pod in a project, a workspace is created, but when I open the workspace the files associated with the original project don't display. I had Xcode closed when I created the pod. I've attached a screen cap of my project after installing the Pods.
I think I've got an installation problem, but I don't know where I need to look to fix it. What/where should I be checking?!
Update: Compiler error
The following compiler error comes up when I open the workspace file:
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
I closed Xcode when I created the pod, so I'm stumped on this one.
Update 2: It works, but is this the way it's supposed to work? I got partway to the answer to my problem by following the steps outlined in this helpful post:
Can't get to work CocoaPods and Yosemite
In order to open the workspace file correctly, I have to run 'pod setup' each time. Are CocoaPods supposed to work like this, or is setup supposed to be a one time thing? If I've got an installation/configuration problem, where/what should I be looking at to fix?
Screen Cap of Original Issue
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
Looks like you had two copies of Xcode open with the same project. One was inside the Xcodeworkspace that CocoaPods created, and the other was the original Xcodeproject itself. Xcode doesn't allow this, so it won't compile as long as both are open. You only need to open the XCWorkspace.