I've been using Firebase SDK for some months but never got an issue. This time I can't get the storage to work even if I did all the steps correctly. I have the correct podfile and when I do the install I can see it downloads the correct framework and I can see the framework listed in my project, too.
I tried to change 'import Firebase' to 'import FirebaseStorage', it recognizes the framework and doesn't give any error on the import, but I still get the same error.
Edit: I know how to show images in my question but I can't do it because I must have at least 10 reputations.
Edit 2: I resolved and I'm waiting to accept my own answer.
Ok, that project was not working so I created a new project with the same podfile and all went well. Maybe it was a naming conflict because stupidly I named my first project FirebaseStorage.
Related
I have noticed this problem as closed before but I am getting the same problem.
P.S - I have imported Alamofire in the class mentioned in the screenshot
Here is my pod details
platform :ios, '10.0'
use_frameworks!
target 'PhotoTagger' do
pod 'Alamofire'
end
Also the only thing being auto completed is AlamofireVersionNumber and i cannot access anything when I am trying to use the auto complete feature. Now if i write Alamofire by hand then I can access some methods, but then again something is going wrong and code is not compiling, which i think boils down to the issue that the class isnt being fetched by auto complete.
I have tried -
In Project settings > Build settings
Always search user path To YES
Header search path to only include "$(inherited)" as non-recursive
All other pods are working fine, except Alamofire.
Also after writing class name by hand or copy pasting, some of the methods that are being auto completed does not have the same signature of the actual method of the Alamofire class
Please please please !! help me sort this out, so that someone out there when facing this can help themselves too. There isnt any solution to this as of now.
P.S
I had opened an issue on Alamofire's Github page, but they responded with
Sorry, we're not responsible for Xcode's autocomplete issues.
In the future, you should open questions like this on Stack Overflow
and tag alamofire.
Cheers. đ»
Please help, I am stuck with this for quite some time.
EDIT :
Here is my project settings details
Also, I have build the project and still the problem persists.
P.S - Writing the class manually by hand , and the methods even, it compiles but everytime, I have to go to the github page, to copy paste the method signature, The problem is that with Autocomplete, i can navigate all method signatures and know about the public available methods. But I am only restricted to the example methods available in github, as everytime I have to copy paste the methods and the overwrite the implementation. Again, this compiles and runs, but the auto complete is not working, not for the class, or for the functions.
Solution 1
Probably this is not about Alamofire or pod libraries but Swift and XCode. This answer could be your solution, shortly:
Go to Xcode > Preferences > Text Editing Under Code completion
Uncheck 'Suggest completions while typing' Quit out of Xcode and then
relaunch Xcode. Go to Xcode > Preferences > Text Editing again Again
go to Code completion and check 'Suggest completions while typing'.
Try typing library function or enum...
Solution 2
Or you can try this answer if your XCode have some cache file issue, shortly close XCode and remove file below:
~/Library/Caches/com.apple.dt.Xcode
and try again.
Solution 3
Or you can try this answer, shortly:
Find any commented out (/* abc */) code after #end in your files and delete.
Let me know if any solution it works.
I had the same problem once. I canât remember exactly what worked, but we will figure that out now.
In «Build Settings -> Search path -> Framework Search Paths» check to see if you have the following:
Always Search user Paths : NO
Framework Search Paths: $(inherited), "$PODS_CONFIGURATION_BUILD_DIR/Alamofire", "${PODS_ROOT}/Alamofire/"
These search path might not be the same as yours, so just double check that the path above is correct, according to where the files are saved.
Before you do changes in the config files, take a backup in case something get's messed up.
When you do changes, build your project and restart Xcode.
I just did a test project with Alamofire:
Installing pod:
pod 'Alamofire', '~> 4.4'
Opening xcworkspace first time:
Autocompletion doesn't work. Xcode doesn't recognize import Alamofire.
Then:
Build project: Project -> Build
Xcode recognizes import Alamofire.
When typing Alamofire it doesn't work, only AlamofireVersionNumber is autocompleted.
But when typing Alamofire.(and typing a known command from alamofire it will autocomplete)
For me adding anything to the Build Settings didn't work, but deleting Derived Data and building the Pod scheme explicitely did the trick.
Go to "Manage Schemes" and check the Pods-MyProject scheme and the one of the pod which doesn't autocomplete. Close the window. First select the scheme of the broken pod (button next to the run and stop button) and Build for Running shift + cmd + R. Second select the Pods-MyProject scheme and Build this for Running too.
Switch back to your normal scheme and you should be fine.
Did you delete the derived data for your project or the whole of it? I've had this happen, wipe it all.
I had this exact problem a few days back. I think this is happening because Xcode is not able to find the Alamofire header libraries. What I did to resolve was :
1) Go to build settings and search for 'User Header Search Paths'
2) Enter its value as "${PODS_ROOT}/BuildHeaders" including the quotes
3) Click the thing again and in the right side , change the value of the selection to 'recursive'
Now Restart Xcode and build the project. Now the autocomplete works fine
Sometimes when you install some pod from the terminal's window you need to restart xcode or also the mac, before see the import name correctly.
Unfortunately this is Xcode being stupid. Same issue is happening with most advanced libraries even when using server side SPM. Until apple improves xcode some things will just stay hidden to us unfortunately.
I am currently using Xcode 9.2
Just go for a build after removing any code with error (any incomplete alamofire call attempts or so).
SOLUTION
Start by writing "AF" and then the desired function.
AF.request(url...
AF is global namespace containing API
Your pod string may be wrong. Please try this
pod 'Alamofire', '~> 4.4'
Thanks.
I have created my cocoapod and cross check in sample project but it is showing everytime this error.
I googled and found solution
Reset content and setting
Clear derived data
Clean and build
Restart xcode
But non of them works
i tried on device
Make sure you are opening the newly created .workspace file rather than your original project.
Refer to this answer for debugging.
https://stackoverflow.com/a/26129829
Basically you need to look at ~/Library/logs/CoreSimulator/CoreSimulator.log for the source of the errors.
You need to consider the fact that the simulator is not linking files properly than any specific cocoapod issue.
Alternately, the problem could be related to code signing.
Refer : https://stackoverflow.com/a/17402788/2569560
If details like the Podspec and the simulator log were shared, perhaps we could be of more help.
I'm just getting started with the iOS charts library :
I followed all the steps described under 'Usage' on the main page (https://github.com/danielgindi/ios-charts):
I added a UIView and made it subclass LineChartView
--> in ViewController.swift: the line import Charts gives an error: Cannot load underlying module for 'Charts'
Why is that ?
Thank you !
It's possibly related to this issue too: https://github.com/Alamofire/Alamofire/issues/122
In short: Seems like there's a bug in Xcode 6.3.1, where new projects have problems when importing Embedded Frameworks. In such a case, you need to let the project build first, and then add the framework to the project.
Sounds like your project haven't added the framework successfully. I just started with ios-charts as well, and I followed the steps on github as well and it worked like a charm. What I did was to just drag the Charts.xcodeproj into my Project Navigator and it worked like a charm. If this doesn't work for you, however, make sure you are using iOS 8. If you are not, then you have to add the .swift-files to your project. If you are using iOS 8 and the approach still doesn't work, I'd try to install it using CocoaPods instead. I'm fairly new in CocoaPods so can't really help you there, but just google on how to install frameworks using CocoaPods and you should find what you seek.
Sorry if I wasn't of much help!
The answer comes a bit late, but what solved the problem for me was to clean my project by selecting the option Product > Clean from my status bar. Hope it might help someone else in case you solved the problem already.
After cleaning the product once I received this error. I then removed the framework from embedded binaries, cleaned the product, then added it once more to embedded libraries. I then built the product and retried the import statement. The import statement worked.
I had the same issue with KeychainAccess pod. Even though the pod was installed it use to throw an error
âCannot load underlying module for KeychainAccessâ.
The fix that worked for me :
Uninstall the pod and install it again
Delete the derived data content
Quit Xcode and start again
Make sure your scheme is targeting an iOS device or simulator. If you build for your Mac it'll give you this error.
Build the project and this error will go away
My application has been running fine with the Cloud-iOS.a library for the past few days. However, today, when I used the âProduct > Clear Build Folderâ command and tried to run the app again, it would give me this error:
âCloud/CLAPIEngine.hâ file not found
The Cloud library builds successfully, but the main project gives me that error along with 4 others in both the main project and the XCTest files (that are linked with this one).
Iâve tried removing and re-inserting the file from Build Phases > Headers and Build Phases > Compile Sources and that didnât do anything (I also have tried to remove the -fno-objc-arc flag from the file to see if it would recognize it, and sure enough, it gave me an ARC error). Iâve tried looking through other SO questions like these:
Restkit/Restkit.h file not found Xcode 6.1
Adding frameworks to project in Xcode 5 and having *relative* paths added
... and nothing worked. I even tried restarting the app itself and nothing happened. I made a test project and included the same library to see if itâs my project, but this project also says the same errors. Both projects also have the file in the "include/" directory. I donât know why this is happening and Iâm starting to get really tired with Xcodeâs random problems.
Iâve included the test project in a Dropbox link for others to check out and see why itâs doing this.
https://www.dropbox.com/sh/lu8hntaaww8y6r4/AAA1KJ085YvKjwMR-AZff6Nga?dl=0
What can I do to get this to run again? Thanks in advance.
(After this, Iâm not running the âClear Build Folder" command again.)
Ok. Looks like someone over at Apple Developer Forums was able to give me an answer. I chose the last one that they gave me, which was to change the static library into a framework. Thank goodness Apple made this available on iOS, because (after a bit of tweaking), everything works!
I created new target for my app and every second time I compile it and try to run on the device, I get:
âThe application does not have a valid signatureâ
...and app does not run.
I checked all similar posts in stackoverflow but none of the solutions helped me (cleaning project, etc...)
Under General -> Linked Frameworks and Libraries
Removing all the frameworks and relinking them was what worked for me.
I found people saying two different things that are supposed to solve this problem:
Delete all broken provisioning profiles.
Ensure there are no spaces in the name of the folder that you are building from (your Xcode project folder) -- this was what fixed it for me!
Just to add another possible cause:
In my case I had integrated SpeechKit (2.1.5) as a an embedded framework in an iOS Swift project and this somehow caused the error.
When I used Cocoa Pods the error didn't occur anymore.
Clean, deleted derived data, rebuild worked for me.