File headers are not being found in Xcode project - xcode

i just bought the newest imac.
running OS 10.9.5- 64 bit
I am using cocoapods version 0.34.1
xcode latest stable build (6.01)
And for some reason the repo ive been working on for a year now is having all kinds of trouble finding pod header files.
for parse, im getting 'Parse/Parse.h' file not found,
I could be wrong but i dont think its specific to parse.
Nothing is different about my project environment except for the new computer.

If you are using pod 'Parse-IOS' change it to pod 'Parse', '~> 1.4' because has been deprecated.
Also, does it happen for pods to not been found by ProjectTests?
If so, add at the top of the podfile this line:
link_with ['ProjectName', 'ProjectNameTests']
and at your project Build Setting->Other Linker Flags, add $(inherited).

If you dont need the test target, remove it from the build to solve this.
Go to edit scheme under project and expand all the items in the left column. Highlight any references to test and hit the minus button.
This information can save you from banging your head into the wall.

Related

Linphone - getting SDK

I'm trying to follow the instruction for Linphone, to download the SDK for iOS, either here:
https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/
or here: https://gitlab.linphone.org/BC/public/linphone-iphone
They both start with this CocoaPods thing, that im not familiar with, and it doesn't seem to work... all I get is this error:
[!] Couldn't determine repo type for URL: 'https://gitlab.linphone.org/BC/public/podspec.git': (<unknown>): mapping values are not allowed in this context at line 3 column 17
Tried on Mac M1, and Intel Mac. Always the same error. I would rather not build the entire SDK, just need to include the SDK in my project.
To include the sdk you need to place a source to their podspec git in the pods file and then you can use it as if it was in cocoapods
Example ios pod file:
source ‘https://gitlab.linphone.org/BC/public/podspec.git’
source ‘https://github.com/CocoaPods/Specs.git’
platform :ios, ‘11.0’target ‘test’ do
project ‘test.xcodeproj’
pod ‘linphone-sdk’, ‘~> 5.0’
end
This is fixed for iOS since some months.
I have forgotten to fix this also for MacOS podspec repo.
This is now also fixed.
The explanation is here : https://github.com/BelledonneCommunications/linphone-sdk/issues/207
TL;DR : It was an issue caused by Gitlab's way to handle files not found (redirection) for Cocoapods-version.yml, confusing Cocoapods.

Using 'GoogleMaps' and 'GooglePlaces' pods, when archiving iOS build receive error for multiple commands produce GoogleUtilities target

Having trouble archiving - I receive a Build System Information error that says
Multiple commands produce '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework':
1) Target 'GoogleUtilities-00567490' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
2) Target 'GoogleUtilities-ac14cd06' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
I recently updated to the latest version of Xcode (v 10.0). I am also using Cocoapod version 1.6.0.beta.1
Using GoogleMaps pod version 2.7.0, GooglePlaces pod version 2.7.0
When I run 'pod install' it also installs 'GoogleUtilities (5.3.0)'.
I tried deleting my Podlock, Podfile, .xcworkspace, etc and starting over with a new Podfile, pod init, pod install, etc. after updating Cocoapods but still no luck.
I'm looking for a duplicate relating to GoogleUtilities or Places or Maps in Build Phases within Embed Pod Frameworks, but not having much luck. When I look inside the Pods folder, I do see two GoogleUtilities frameworks, "GoogleUtilities-00567490" and "GoogleUtilities-ac14cd06", but both appear not to have the exact same contents.
Only now experiencing this issue after updating Xcode to version 10.0.
For me, the same issue was coming and Most of the people saying to change the build system to legacy, but when I tried its It started swift compilers error. resolved as mentioned below.
Go to your target and click on (your_app_name_target).
Select Build Phases.
Expand Copy Pods Resources.
See the section Output Files.
This section should be empty. Remove any entry there.
Rebuild your Project.
Going to File > Workspace Settings and then changing the Build System from "New Build System (Default)" to "Legacy Build System" will allow you to archive for now. Hopefully, another solution comes along for using those pods and the new build system in Xcode 10.0

Multiple targets for project in xcode

I am using xcode 7.3.1. After pod update, it's showing multiple project target in the project having same details without any change. How can I fix this? If I delete any one of these, xcode crashes and when we reopen even the other option comes in red and we dont have any project.
Have you tried to delete the workspace file and the pod directory, and re-launch a pod install ? The workspace file does not hold any important information to be retained in CocoaPods.
If you have the same problem after regenerating, it means there is an error in the Pod file.

Cocoa Pods without workspace?

I have read about a possibility to add CocoaPods to an XcodeProject without getting the xcworkspace file, instead you get a xcodeproj file that you can integrate into your current project. How can I do that? Would love to use the xcodeproj file instead of xcworkspace.. I'm programming in swift (if that makes any difference).
Yes, its possible. But, we need to do few steps to proceed.
Check this Github thread.
The below line in pod.file will not let the client integration process.
install! 'cocoapods', :integrate_targets => false
We can drag and drop the Pods.xcodeproj to the main project
Link the target dependencies and Link Binary with Libraries in Build phases.
Thats it.
You can not do this.
The CocoaPods website guide to using CocoaPods found here directs you to using the .xcworkspace it creates. Several other guides found across the Internet all direct you to use this file indicating that using the .xcodeproj file will now result in build errors.
There is simply no evidence that this is a possibility at all.
From the CocoaPods website guide on using CocoaPods:
Save your Podfile.
Run $ pod install
Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app.
More from their website:
Now you can install the dependencies in your project:
$ pod install
Make sure to always open the Xcode workspace instead of the project
file when building your project:
$ open App.xcworkspace
And from the Ray Wenderlich guide regarding using CocoaPods with Swift:
Open the project folder using Finder, and you’ll see that CocoaPods
created a new IceCreamShop.xcworkspace file and a Pods folder in which
to store all the project’s dependencies.
And from an NSHipster article on CocoaPods:
CocoaPods will create a new Xcode project that creates static library
targets for each dependency, and then links them all together into a
libPods.a target. This static library becomes a dependency for your
original application target. An xcworkspace file is created, and
should be used from that point onward. This allows the original
xcodeproj file to remain unchanged.
In older versions of cocoapods it was possible to install and update pods with the option '--no-integrate'. It allows you to create a library project, which could be imported into an existing project (read more). But this option is missing now. I've build a Xcode project for a maven-build with this option earlier. Today I've updated the pods of this project with the newest cocoapods version (1.0.0) but without the '--no-integrate' option and it still works. So eventually there is a way...

Why does installing a cocoapod create missing files in xcode?

I installed cocoapods on my machine.
I added a podfile to my project and then ran pod install.
The resulting file structure that xcode picks up, seems to contain a number of missing files in Frameworks and Products.
Is this expected behaviour? I deleted the pod files and directory and recreated them again using pod install. Same result. I started a new project and did the same. Same result.
If this is expected behaviour, what am I looking at here? Why are there missing files? (if indeed that is what the files being red means).
I don't yet know what the "Products" or ".framework" files are for.
My podfile looks like this:
# Uncomment this line to define a global platform for your project
platform :ios, '9.1'
# Uncomment this line if you're using Swift
use_frameworks!
target 'Hospital Demo' do
pod 'HLSpriteKit'
end
(aside: It's not causing my an build errors, and the app so far runs fine. Don't know if it makes any difference, but I'm using swift.)

Resources