All of a sudden my Firebase has stopped working within my Xcode project.
I am getting two errors. In my Viewcontroller.swift:
Could not build Objective-C module 'Firebase'
and in my Firebase.h file:
'FirebaseAnalytics/FirebaseAnalytics.h' file not found"
I think I know what the problem is but I do not know how to fix it. My FirebaseAnalytics/FirebaseAnalytics.h file is called FirebaseAnalytics/FirebaseAnalytics.h.icloud and I do not know how to remove the .icloud extension.
My framework looks like.
My pod file looks like
So far I have tried: updating cocoapods and running pod install, and cleaning and rebuilding my project without any success.
Any tips or help is greatly appreciated.
It looks like you are using iCloud Drive.
A .iCloud extension means that iCloud have synced a placeholder file to you computer. A link to the original content stored in the cloud.
One scenario is that you tried to move a folder or the files to another location and this happened:
Your original file is gone. It’s gone from iCloud Drive, and it exists nowhere on your hard drive.
In their place, is a file named FILENAME.original-extension.icloud. This file, only a couple kilobytes in size, is the placeholder that OS X uses to pretend that the file existed on your system. Your original file is gone. It’s gone from iCloud Drive, and it exists nowhere on your hard drive.
Can OS X use them to download the originals from iCloud’s servers?
Nope, they are gone.
Though it can be possible to recover the files from iCloud by login into the web interface and go settings and then click on data & security.
If this is only pod module files related content, then I think you should delete your pod modules and install them again.
I have found that using iCloud drive together with projects where a lot of files are dependent on each other are risky business. If you need backup of your files I suggest using a version control system like GitHub.
I was able to fix the problem with removing all pod 'Firebase' and pods that have to do with Firebase and re running pod install which removed them from my app. Then I added them back and ran pod install which reinstalled them and they no longer has the .icloud extension and no longer gave me an error message
Related
I've been working on an Xcode project on my desktop, and I was trying to save it to GitHub, so I could access it on the road. I've saved it to GitHub before, without issues, and the local Desktop version was working fine. After saving it to GitHub, I tried downloading it on the laptop, to make sure everything was fine, and one file was in red. It doesn't look like it was saved or even exists. I get a "Build Input File can't be found" error.
I went back to the Desktop version - that file is there and everything works. I thought, maybe I messed up with GitHub, so I tried to save it to iCloud, and then emailed myself a zip copy - same thing. Every other version, but the desktop version, had that one missing file in red.
I've looked at other posts for those with similar problems, and all the answers seem to say the same thing - the file was moved or deleted; however, it is still there on my original desktop working version. Any thoughts as to what is going on or what I should do are welcome.
I'm working on XCode 13.1, on a Mac running iOS 12.1
Follow up - locked files:
As some of you suggested, the file could be locked. It didn't appear so, and I thought it unlikely, as I don't know how to lock them. I copied the one file over, added it, and it is running, however, I got this warning when I tried to save and close it:
Locked file warning
I went through the steps to unlock it, and curiously, finder says it is not unlocked. Not locked but I'm getting the warning
Everyone has permission too
Any ideas as to why this might be? I'm stumped. I did try locking and then unlocking it, but no dice. I still get the error I don't have permission because it is a locked file.
Probably the file is not inside the project folder. This can easily happen with resources such as images and sound files that you copy to the project navigator. The project works fine but it has an external reference to the file. If the project folder is copied, eg zipped, the file is missing because it was not part of what was copied.
This generally occurs when you moved or deleted that file within Finder.
So try to delete that file from your project in Xcode and then re-add that file to your project folder in Xcode. Then your file would be working fine.
first: get your file from the current full path and cony it to any location on your mac enter image description here
Second: delete the red file from Xcode
third: drag file from the new location to Xcode don't forget to check on copy if you needed :)
I'm programming a Swift iOS app in XCode 9.2 (Dated, I know), and I've tried to integrate GoogleAPIClientForREST using Cocoapods. When you integrate GoogleAPIClientForREST (and possibly other pods, I don't know), it also downloads GTMSessionFetcher. Since the integration of the pods, the app won't run and gives this Shell Script Invocation Error:
/Users/username/Library/Developer/Xcode/DerivedData/Teachers_Assistant-aphjxihtqtmedabcymmxjlmxduzc/Build/Products/Debug-iphonesimulator/Teachers Assistant.app/Frameworks/GTMSessionFetcher.framework: No such file or directory
However, I can't open Teachers Assistant.app, as it's not a folder. GTMSessionFetcher.framework exists, but inside of the folder circled in red in the image at this link, not inside the .app file circled in blue.
I've tried the suggestions at this link, the suggestions in the question at this link, this link, this link, and this link. None of them have worked, though if you think that there was something I did wrong while trying to carry out those steps feel free to tell me.
All of my code is online at this repo, including the podfile. Thanks for the help!
Additional information: I plan on using the Google API to automate Sheets as a sort of storage information system to log attendance data and other miscellaneous information, if that helps at all.
Project's name should not contain special characters like ' or space, this could create some problems when Cocoapods try to link the libraries. I suggest you to change your project's name to TeachersAssistance (it worked for me). Here is the suggested steps:
Change project's name in the navigator. Xcode will recommend you to refractor the project, accept it:
Update podfile to point to new targets's names
Cocoapods will create a new workspace TeachersAssistance. Use it and delete the old one.
Remove Pods_Teacher__Assistance from new workspace. From now it will use Pods_TeachersAssistant.
Compile again and enjoy your project :)
Whenever I try to run my iOS app, it runs just fine, however when I archive it in order to submit a build to the app store, it throw this error:
'Parse/Parse.h' file not found`
When looking at the frameworks installed, it shows that Parse.h is indeed in the project folder:
I've tried all the different solutions (removing the frameworks and re-adding, adding the the project directory to Framework Search Paths, etc) suggested in other SO questions asking about this, and none have worked.
It's been suggested that Bolts.framework and Parse.framework may have duplicate Parse.h files, but I can't seem to find any duplicates. Also mentioned was the possibility of it being caused by an outdated Bolts.framework version, but I added the latest version and no dice. What gives?
try https://parse.com/questions/parseparseh-file-not-found
Hey, I solved it! I moved the parse.framework folder into a sup folder /projectname/framework/parse.framework/
after I moved the parse.framework folder back into Project folder (/projectname/parse.framework) Xcode was able to import the parse/parse.h file! :) Maybe that helps to! :)
Me and my friend are trying to collaborate on a project that he recently uploaded to GitHub. I checked out the repository but do not get the same project structure after opening it in Xcode. The project contains Cocoa Pods which in Xcode appear as a separate file along with the main one. The problem is that when opened in Finder on my computer, the main project contains folders DummyApp, DummyAppTests and Pods together with some other necessary files as in the picture below.
When the main file is being opened in Xcode, only the Pods folder is recognised. The main project file is empty and there are no error message available to provide some clues. It seems like Xcode does not recognise the other folders as valid projects and excludes them.
We compared our folders locally in Finder, both have the same files and structures. So we've figured that the check out from GitHub works fine. We've been thinking that maybe my friend needs to invite me to collaborate on that project in order for Xcode to validate my participation but found nothing of this sort on Apples Developer sites. Any ideas what might be causing this problem?
The project has been re-uploaded to GitHub, re-opened, re-checked out and all that basic stuff..
I've learned that using GUI for gits causes more problems then it does good. Uploading just the podfile(via the terminal) and excluding all the individual pods solves the problem above.
I've been trying to upgrade the Facebook iOS SDK used in my app. I cloned the Git repo and copied everything across to the directory containing the old version, and attempted to build the project. However I get the error "FBDialogClosePNG.h" file not found. I can't find that filename anywhere in the repo, or anywhere else through Google. It appears that it is meant to be a wrapper class for an image, since it appears to be called through the following line:
UIImage* closeImage = [FBDialogClosePNG image];
Does anyone know what we're meant to do with this?
Removing Xcode's DerivedData directory and the generated Pods directory fixed this for me.
/Users/{username}/Library/Developer/Xcode/DerivedData
/{YourProject}/Pods
there is a file in the path {FB_SDK_DIR}/scripts/image_to_code.py which will generate a bunch of files including FBDialogClosePNG.h.
To get this file, you need to compile facebook's source codes using src/facebook-ios-sdk.xcodeproj first, then locate the DerivedSources folder, put the whole folder into your project.
And you will need a to switch off a lot of compiler warning before your code could compile. Then you should good to go
For me, it was because my Facebook-iOS-SDK pod didn't get fully updated for whatever reason. I deleted the Facebook-iOS-SDK folder from my Pods folder, then ran pod update again, and now the problem is fixed.
I was getting lots of missing files: FBDialogClosePNG.h, FBLikeButtonPopWAV.h, FBLikeButtonBackgroundPNG.h, FBLoginViewButtonPNG.h, FBPlacePickerViewGenericPlacePNG.h and FBProfilePictureViewBlankProfilePortraitPNG.h.