I am currently unable to compile my podfile in Xcode10, and there doesn't seem to be much information online regarding how to fix this issue...
The current message I am getting is:
Showing All Messages
:-1: missing input '(File location)...Podfile.o' and no rule to build it
And this is my podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'App' do
project '/Users/Oskilla/Desktop/Swift/App/App.xcodeproj'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Google-Maps-iOS-Utils'
pod 'INSPhotoGallery'
end
Does anyone have any ideas on how to fix this issue?
Thanks a lot
You don't compile a Podfile. You use the CocoaPods gem to install and setup a CocoaPods integrated workspace:
Getting Started with CocoaPods
open terminal, cd /toPodFileDir/, then pod install
then open the xcworkspace file in your project folder and try to compile.
If you get errors after trying the above, let me know and I can edit.
Related
I use cocoapods to add the latest Realm (10.1.0), and open the .xcworkspace to compile the project directly after completion, and an error message appears when compiling, prompting "framework not found realm-sync". Can someone help me solve this problem?
platform:ios,'11.0’
use_frameworks!
target 'tessss' do
pod 'RealmSwift', '~> 10.1.0'
end
enter image description here
None of my 'Firebase' pods are found.
I updated to Xcode 9.
Ran 'pod update'
deitegrated my pods, and re-installed
Deleted 'Derived Data' folder contents
Build from 'Generic Devices'
Added the paths in the Header Search Path in the Build Settings $(inherited)
and
"$(SRCROOT)/Pods"
and
"${PODS_ROOT}/Firebase/Core/Sources"
Cleaned, build, closed the app, re-installed Xcode, restarted the system, and did it all again.
2 Swift Compiler Errors are always there.
'FirebaseAnalytics/FirebaseAnalytics.h' file not found
and
Could not build Objective-C module 'Firebase'
I'm on Sierra 10.12.6
None of these has worked so far to get rid of them. Does anyone know of any other possible solutions?
Here is the pod file info.
Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'MP' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MP
pod 'Firebase'
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
end
------ UPDATE ------
as Hexfire suggested below. I removed pods and manually added the frameworks.
After some fiddling with the pathing for my MP.h file, that first error is gone, however now I am getting these compiler errors now...
:0: error: PCH file '/Users/.../Library/Developer/Xcode/DerivedData/MP-gwnwsbrisiyspxepcxkbrojwtfrs/Build/Intermediates.noindex/PrecompiledHeaders/MP-swift_ZJX6RAPYV1IT-clang_2SW1CJQDTFSBO.pch' not found: module file not found
clang importer creation failed
I built a .pch file 'MP.pch' and I pointed to it in the Build Settings Prefix Header with $(SRCROOT) with no luck. Do I have to put all of my Framework paths in there as well?
All of this seems related to the search paths. Does anyone have any other thoughts here? Perhaps an example of the build settings syntax? For example $(SRCROOT) with quotes or without? $(SRCROOT)/MP.pch or just $(SRCROOT)?
One of the good ways to make this work is by not using CocoaPods. You can grab all necessary Firebase libraries from here and use within your app (if link doesn't work, go here, and scroll down to "Integrate without CocoaPods").
After downloading:
Unzip and see the README file for which Frameworks to include in to your project.
Add the ObjC linker flag in your Other Linker Settings in your target's build settings.
This is a valid option and 100% workable.
P.S. If Firebase is the only pod you are using, you can quickly and safely clean your project from any CocoaPods trails by using pod deintegrate command.
Good luck!
If All Of this do not work Try this for once
run sudo gem install cocoapods
You can check your version by typing pod --version anywhere on your terminal.
Make sure you are using latest Version of it
I'm trying to import JSQMessagesViewController:
import JSQMessagesViewController
And it gives me the error 'no such module'. I've seen many people with this problem on the web but I can't find the solution. Here's my podfile:
# Uncomment this line to define a global platform for your project
platform :ios, ‘9.2’
# Uncomment this line if you're using Swift
use_frameworks!
target ‘IXODES’ do
pod 'JSQMessagesViewController'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
end
I've tried cleaning the build, also pod deintegrate and then pod install and pod update. Nothing works and I can see the library in my project like the rest. Any help?
perhaps you tried to import the file and the file is missing by any chance,
a few things you can do.
you can clean the project from cocoapods and re-install cocoapod(this helped me onetime i got the same problem the file were missing) you can do that by
run this code on the terminal
[sudo] gem install cocoapods-deintegrate
once done
cd your file
and then run thispod deintegrate
then you're all set! and re install it
---- another solution ---
try these
1-Adding all of the .frameworks to the Projects Build Phases -> Link Binary With Libraries
2-Selecting each framework and building it. You can do this by selecting your project name next to the run arrow.
3-Cleaning the project and restarting my computer.
hope it helps
I am exporting a project from Unity3d to xcode that uses the last GoogleMobileAds package.
I have installed and updated cocoapods and also have the famous podfile containing de following lines:
source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, ‘8.0’
target ‘MyProject’ do
pod 'Google-Mobile-Ads-SDK', '~> 7.14’
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
and I run
pod install
and
pod update
successfully
dependancies are downloaded alright, as you can see the results below:
Updating local specs repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Installing Google-Mobile-Ads-SDK (7.14.0)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 8 total pods installed.
According to both cocoapods and google mobile ads documentation, I will need to continue with "MyProject.xcworkspace" but the file is nowhere to be found.
any suggestions?
When using install! 'cocoapods', :integrate_targets => false Cocoapods will not create an xcworkspace for you.
That's the intended behaviour. You'll even notice this if you follow the command prompt. This line is telling you that no integration is taking place.
Skipping User Project Integration
If you want to get an xcworkspace just remove :integrate_targets => false
It seems the problem comes from editing the Podfile using TextEdit.
As it warns you that you should not continue using TextEdit, one could falsely suppose that the program is intelligent enough to understand and correct these unwanted modifications.
This is the solution I have found:
delete the Podfile and Podfile.lock from your working directory
create a new Podfile using pod init
install SublimeText and use it to open the Podfile
add the necessary pods for the project
(I also included the line "use_frameworks!" although it may not be
needed.)
run "pod install" and "pod update"; this time I get
[!] Please close any current Xcode sessions and use Orbit.xcworkspace for this project from now on.
and the file is now available in project directory
You was used this guide for install pod?
In addition to Radu Dita's message. If you do not want that line to be added (so you do not need to delete it later), you need to disable cocoapods integration in "iOS Resolver Settings" by selecting "None", build project and then enable it back "Xcode Workspace". I found this with try and error. I hope my message will save save someone's time
In my project I got cocoapod installed. Here is the structure of Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
workspace 'TempWorkspace'
inhibit_all_warnings!
target 'proj1' do
pod 'ApplicationInsights', '1.0-beta.4'
pod 'Google/Analytics'
pod 'AFNetworking', '0.9.1'
pod 'MBProgressHUD'
pod 'Reachability'
end
target 'proj1Tests' do
end
target 'proj1UITests' do
end
In this, ApplicationInsights and GoogleAnalytics pod are not creating any issues. But if I add any pod except these 2 in this file, this is giving me following error
"ld: framework not found AFNetworking clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Its not just about AFNetworking only if I write any other pod name also then also it is giving me same error with that pod name.
I tried looking for pod limitations but not it has not given me anything relevant.
If somebody has any idea please tell me.
Thanks in advance!!!
I hope it will help someone with a similar problem with Pods, this answer worked for me on XCode 8:
Delete all your Podfiles from the pods folder (Pods folder should
be empty)
Delete the xcworkspace file
run pod install
Change Build Active Architectures Only to NO for your target
and for all your pods (Click on Pods project and then on each single
Pod)
Add $(inherited) to the Framework Search Path setting of
your target
I run into this problem because I was trying to install the latest Atlas pod which is implicitly installing the latest LayerKit pod and a reference to a framework was missing. For those with a similar problem remember to add use_frameworks! to your podfile.
That same exact problem happened to me. The problem was that I was opening the .xcodeproj file instead of the .xcworkspace file. Once I opened the workspace file all my build errors were gone.
I had the same problems twice. I only use AFNetworking 3.0.4 or 3.1.0.
The method I handled with is to delete all the files:
podFile files, the Podfile.lock file, xcworkspace, the 'Copy Pods Resources' and 'Check Pods Manifest.lock' in Build phases of targets.
After deleting all these, I write the file of podFile and pod install. the problem is solved.