Cocoa pods GLM Error - swift

So today I've been trying to try out a new project using Swift, but I've arrived to an abrupt halt. I've been trying to run the VideoCore sample project found here: https://github.com/jgh-/VideoCore/tree/823ec7cac50e5a0b4457bd06dd95a50dca88d9c0/sample/SampleBroadcaster-Swift.
So during the initial setup I had to navigate to the directory and run pod install. pod install executed without any errors, and say I need to close Xcode, and reopen the new workspace, which I did. When I try to go and run the app for debugging (as according to the documentation I can run it right after pod install'ing, I get an error that says 'type_half.inl' file not found. A few screenshots are here to better explain/show: http://d.pr/i/14TqW, and http://d.pr/i/1aYSi.
I've tried reinstalling the pod multiple times, and I haven't been able to resolve this issue. Has anyone had a situation like this, or have any idea on how to get out of this blackhole?
Thanks!

This has been resolved by downgrading CocoaPods to version 0.38.2. Here's what I did:
gem install cocoapods -v 0.38.2
gem uninstall cocoapods -v 0.39.0
And that fixed my issues.

Instead of downgrading CocoaPods to version 0.38.2. This error can be resolved in other way as I have fixed recently on of my project.
STEP 1:- Search Header Search Paths under build setting on GLM target or target that uses GLM pod like in my project VideoCore cocoapods uses GLM
STEP 2:- make it recursive instead of non-recursive.
Build again error will be fixed.
NOTE:- if you update cocoapods that you have to redo the steps again. Also target will be in pod project.
Attached image for reference.

Related

Suddenly can no longer compile - No such module 'SDWebImage'

So suddenly my project stopped working and I have no idea why and I'm running out of ideas.
I've found some blogs 1 2 and similar requests 1 2 3 for help but nothing seems to work for me. I may be doing something wrong though.
running xcode 13.4.1
I've got 4 distinct errors
Command EmitSwiftModule failed with a nonzero exit code
error: accessing build database "/Users/myuser/Library/Developer/Xcode/DerivedData/App-btdfdbatbdurmeawknwdwmjrqpsw/Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error
Virtual filesystem overlay file '/Users/myuser/Library/Developer/Xcode/DerivedData/App-btdfdbatbdurmeawknwdwmjrqpsw/Build/Intermediates.noindex/App.build/Debug-iphoneos/App DEV.build/all-product-headers.yaml' not found
/Users/myuser/myapp-ios-app/App/UI/Feed/FeedVC/FeedVC.swift:11:8: No such module 'SDWebImage'
I believe the EmitSwiftModule is related with not being able to handle the pod therefore causing the issue in the "all-product-headers.yaml" which is generated to fetch all the pods headers?
So assuming that all things in derived date are as they should be (because i've deleted it) I tried to focus on why is the pod no longer compiling. To my co-worker is working fine. Maybe he will have the same issue if he deletes the derivedData? Maybe we are using some older version files?
Some things I've tried:
clean the project
reset pods cache
delete derived data folder
update the pods
clean xcode preferences
for this pod they say we should add :modular_headers => true in pod file
re download the project clean to another folder
instead of cocoapods use the package manager for SDWebImage
due "all-product-headers.yaml" issue i read here that i could just add a header to my project
I've tried to create a project from scratch and just use the same pods and the project seems to run fine. But this is not a solution.
Can someone please help me? Any ideas?

Xcode 12, iOS 14, Pods

After updating the iPhone to ios 14, xcode 11.5 stopped launching projects on the iPhone, I decided to upgrade xcode to version 12 and got a huge number of errors related to Pods for 60 of them ... Basically, everything is related to the fact that quotes cannot be used in Pods, and need to use <> to connect libraries. When I correct it with <>, I get errors that I need to use "", but this is all warning, namely error due to the fact that xCode stopped seeing one library. On the screen all the info.
Thank you in advance for your help)
How to fix it?
I had a similar issue and I fixed by changing the deployment target of all Pods. Most Pods were targeting iOS 8.0, which is no longer supported by Xcode 12.
Make Sure You have Same Version for your deployment target and podfile platform
Don't open your Project in XCode 12 after XCode Update
Open Your Project Podfile through terminal
Just remove all your lib and do pod install (Also remove that extra codein podfile if you have written anything regarding architecture of 86 or 64 which we have write for remove warnings)
Clear derive data by path without opening XCode (~/Library/Developer/Xcode/DerivedData)
After Removed all lib all other lib again and do pod install
Open Your Project and set Build System to New Build System (Default) in Shared Workspace Settings and Use Shared Setting in Build System in Pre-User WorkSpace Settings (You can found this settings while XCode Selected go to file menu and click on WorkSpace Settings)
Then Do Clean and build then run it you will not found things regarding module not found you will face some syntax updates or any lib updates fix those and go for run
Try to install pod again, remove all pod and install again.
pod deintegrate
pod install
or
sudo rm -fr ~/Library/Caches/CocoaPods/
pod install
clear DerivedData and run again.

Command PhaseScriptExecution failed with a nonzero exit code after adding firebase

I've got this error after I installed firebase podfile:
Build/Products/Debug-iphonesimulator/Guess The Code 2.app/Frameworks/GoogleUtilities.framework'
I tried this: Xcode 10 Beta 3: Command PhaseScriptExecution failed with a nonzero exit code but nothing has changed.
I also tried to install GoogleUtilities pod separately but the error remained.
What can I do?
Podfile
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationUnity'
pod 'GoogleMobileAdsMediationAppLovin'
pod 'SAConfettiView'
pod 'Firebase'
Xcode 10 beta 6
Swift 4.2
I had the same problem.
I set 'test target signing Team' and I resolved the problem.
This issue might be linked to keychain service. To solve open keychain lock the login and unclock it again by entering you mac passcode.
I hope this helps someone. I was having the same issue. Creating a brand new Xcode project. Installing the Firebase using pods. Adding the GoogleService-Info.plist to the project but it was failing on it. This might not solve your issue at all but you can develop locally while a more permanent solution shows up.
I found that the script Pods-[ProjectName]-frameworks.sh in the Pods > Targets Support Files > Pods-[ProjectName] > Pods-[ProjectName]-frameworks.sh is trying to re sign the files for the project and it can't retrieve the proper identity. I temporary solved this and I am able to code and run the code locally by commenting by adding the '#' character in the line in the script that goes:
code_sign_if_enabled "${destination}/$(basename "$1")"
Like I said this is just a temp solution until I dedicate time to look into it. At least I can keep coding now. I hope it helps someone.

Installing Package with CocoaPods

I'm trying to install the Charts package to use with CocoaPods and it keeps saying "No such module 'Charts'".
If I added the pod 'Charts' in the podfile, and did a pod install and the files are there in Xcode, how come it still gives me an error when I try to import Charts?
Do I still need to do the steps below? Or does CocoaPods do it for me?
Drag the Charts.xcodeproj to your project
Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
My pods file looks like this now:
You just have to hit Command-b to build, then the error will go away. The other solution is to hit Product > Build.
I had a similar problem when I was developing an app for an older platform. The CocoaPod I sourced supported Swift 4 but I was developing for Swift 3. When I sourced the last Swift 3 version of the pod, the "No such module" error was no longer there. Try the following line in your Podfile:
pod 'Charts', '3.0.3'
instead of the latest version.
try installing it manually moving the complete charts folder to your project, or downloading using carthage, it's way more cleaner using carthage than cocoapods because it doesn't create you a .xcworkspace like cocoapods.

Cant import module to xcode

I have the same problem as described here: I cant add socket.io module to my project.
I've tried all ways of dragging and dropping as described in answer, I've tried adding files to project from File menu. No matter what I do I get compile error "SocketIO module not found" on string import SocketIO
Is there a regular way of adding modules? Command line? Sorry if question sounds dummy - Im new not only to swift but to mac also (bought it to learn swift).
If that´s an issue (which it seems to be for not only you) I would go with CocoaPods instead.
Start by:
Do this in your terminal: sudo gem install cocoapods
Go to your project folder and open the terminal in that folder (cd ...)
Do this in your terminal: pod init
Remove all content in your newly created pod file and add this instead:
use_frameworks!
target 'YourApp' do
pod 'Socket.IO-Client-Swift', '~> 12.0.0' # Or latest version
end
Do this in your terminal: pod install
Open your project, note that you need to open the .xcworkspace file to be able to access your pods
Import the module import SocketIO
I created a sample project for you with CocoaPods installed and I have added SocketIO for you. Remember to run the .xcworkspace file. You can download the project here.
Add the socketio swift client with CocoaPods , but after that set the source of the client to Swift 3.2 then try to build it. I’m assuming you’re using Xcode 9 . To set the source to swift 3 from Xcode : go to Frameworks, select the SocketIO and go build settings and set Swift version to Swift 3.2
I faced this problem and it killed my 4 hours time.
I did the steps given by #Rashwan L but it didn't solve my problem though.
I was set iOS Deployment Target to 10.0 that was my main problem.
When I changed my iOS Deployment Target to 11.1 it works for me.
Good luck.