What is causing Cocoapods/RedditKit to not work with version 0.39? - ios

I've updated to version 0.39 of Cocoapods per the persistent recommendation in the terminal, and I'm using RedditKit, an Objective-C wrapper for the Reddit API in an app I'm playing around with.
It's installed through Cocoapods, and I've never had an issue, but since updating to Cocoapods version 0.39 it will not compile any longer, even in a small sample project such as what's included with the repo.
I keep getting "RKClient.h not found" as the compile error, but the file is very clearly there in the Pods folder - I can command-click it!
Was there a big change in 0.39 of Cocoapods that stops it from recognizing files that it would previously? A syntactical issue in my Podfile? How would I fix this to allow the project to compile? (Note, I cannot just revert Cocoapods to a previous version unfortunately.)

Related

'FBSDKShareKit/FBSDKShareKit.h' file not found

I've made an IOS build on Unity for an App we're making after adding the facebook SDK, moved the build on a hard drive and tried to build it on xcode on the mac we have at the office, as I always do before uploading it to the app store. I ran into this error and I've been stuck on this issue for 2 full work days and it's driving me a bit crazy, here are the thing's I've tried:
-Install cocoapods, both on the default terminal directory and on the project's directory (I'm not too experienced with cocoapods so I don't know if that made a difference. I also did pod update while standing on the project directory).
-I saw that the IOS resolver has an option called "generate pod files" that people said needed to be checked when building to solve this issue. It was checked by default on my project, so that wasn't it.
-Added the framework path on the build settings to where the facebook SDK is at (though the way it looked on my xcode seemed a bit different than the way I've seen it on other people's xcode screenshots)
-Tried commenting out some #include lines on the headers that are generating the issue. It only produced more errors.
-People said to open the project from the workspace instead of the xcodeproject but unity doesn't seem to generate a workspace file.
-Tried downgrading the Facebook SDK to a previous version but the versions people claim are working don't seem to be on the repository anymore, so it doesn't let me downgrade to them.
At the moment I'm trying to make it work with the latest Facebook SDK which is 9.0.0.
Any help would be appreciated, please let me know if I'm not being specific enough about the issue or if there's any information about my project I should include on the post
The .xcworkspace should be created by Cocoapods, not by Unity directly.
If you already have the Podfile generated, just run pod install on the project directory and open the created .xcworkspace file after Cocoapods finishes installing the external dependencies.

Missing Frameworks from Cocoapods after switching computers

I recently switched computers and brought over my project but when I opened the workspace I noticed that all of my frameworks via Cocoapods were missing.
I closed the workspace and went into the folder directory and deleted the current xcworkspace, 'Pod' folder, and podfile.lock file, and ran a pod update and pod install. I also deleted the Derived Data for safety measures. However, after reopening the newly created workspace the frameworks were still missing and I am getting an error saying that functions that are within my frameworks have been renamed.
Can anyone point me to another solution? I feel like I've tried just about everything that I could find on here and what I know. Thanks in advance!
Missing Frameworks
Framework Incorrect Full Path
Function Renamed Errors
The frameworks are probably missing because they've not been built yet, but they will show up the first time you run the project.
The function rename warnings are probably because you're using a newer version of Xcode that is using Swift 4.2 by default. Usually the easiest way to tackle this is to upgrade your Pods to newer versions.

Module file was created by a newer version of the compiler

I'm taking over development of a project and am unable to contact the previous developer. I'm trying to figure out which versions of the imbedded open source libraries were used. The project appears to be in Swift 2.1. I am attempting to compile it with Xcode 7.3.1. Carthage was the package manager used. I'm stuck on an error with RealmSwift. The error occurs on the line that tries to import RealmSwift.
/{app source path}/PersonnelModel.swift:10:8: Module file was created
by a newer version of the compiler: /{app source
path}/Carthage/Build/iOS/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule
I have worked my way all the way back to version 0.96.2 of realm-cocoa, which I believe is the first version to support Xcode 7.1 and Swift 2.1. However, I'm still getting the error.
I have looked through other answers on here, but have not found a solution that works. Am I misunderstanding the cause of the error? I just thought it was picking up a newer version of the framework.
Here is what my Cartfile looks like:
github "ReactiveCocoa/ReactiveCocoa"
github "Alamofire/Alamofire" ~> 3.4
github "SwiftyJSON/SwiftyJSON"
github "realm/realm-cocoa" == 0.96.2
github "scalessec/Toast-Swift" ~> 1.4.0
If you're just trying to get a clean compile for now, it might be worth taking Realm out of Carthage, installing it manually as a dynamic framework, and then putting it back into Carthage at the end once you've got everything smoothed out.
Xcode 7.3.1 was Swift 2.2. The very latest version of Realm to support Swift 2.2 is version 2.3.0, so I'd recommend downloading that version and manually importing it into Xcode 7.3.1
As an aside, Realm has dropped support for Swift 2 starting with version 2.4.0, so it's greatly recommended you migrate your codebase to Swift 3 as soon as possible. :)
I had this issue today in Xcode 8.3.2 w Swift 3. I mistakenly tried to run the swift 3 converter on one class file and canceled it mid run. Xcode then threw this error for one of my Pods (Bolts). Fix was to remove the pod, run pod update, then add the pod back, run pod update again so the module was reset.

MuPDF Cocoapods Installation Error

After researching on what library to use in one of my projects for epub reader, I decided to use MuPDF. I integrated it using Cocoapods, but when I build the app, it gives me a couple of errors on _math.h_ file on lines 36 and 73. I have attached the screenshots for reference. It would be of great help if anyone here can help me build the app after integrating MuPDF without any error. line 36
I think you are being hit by a not-backwards-compatible change that took place in CocoaPods 0.39 ( https://github.com/CocoaPods/CocoaPods/pull/4057 ).
Can you upgrade your CocoaPod to 0.39? (gem update cocoa pods) If you do so and then run pod install that should fix it.
If you can't upgrade to 0.39, you could use the 1.7 podspec mupdf, which is compatible with CocoaPod 0.38.
There's an example project that uses the MuPDF pod spec here:
https://github.com/jogu/MuPDF-example
(To try and prevent this problem in the future I just pushed a new pod, 1.8.2, that has a cocoapods_version >= 0.39 restriction in the podspec.)

Downgrading from CocoaPods 0.35.0 to 0.33.1

I need to downgrade CocoaPods from 0.35.0 to 0.33.1. However, I'm running into problems.
The Situation
It seems during the upgrade from 0.33.1 to 0.35.0, CocoaPods does the following:
Remove the pressumably obsolete Pods.xcconfig file.
Add the files Pods.debug.xcconfig, Pods.release.xcconfig, etc.
Remove the presence of Pods.xcconfig from my project.pbxproj.
Record the presence of Pods.debug.xcconfig etc in my project.pbxproject.
To downgrade the CocoaPods project from 0.35.0 to 0.33.1, I removed the Podfile.lock and Pods/ folder from my project and did a fresh pod install.
CocoaPods successfully creates Pods.xcconfig. However, my project.pbxproj file is untouched. My project doesn't know about the presence of Pods.xcconfig, hence it no longer compiles. The records for Pods.debug.xcconfig etc are still there, even though it is not used in CocoaPods 0.33.1.
The Questions
How can I tell my Xcode project to use Pods.xcconfig?
How can I tell my Xcode project that I no longer use Pods.debug.xcconfig etc?
Is there a known procedure to gracefully downgrade the CocoaPods version of a project?
Thanks!
Your best bet to do this would be to entirely remove CocoaPods from your project (as I described here) and then run pod install with the older version.
On a sidenote to this, downgrading versions of CocoaPods is a bad idea. Before CocoaPods hits 1.0 any breaking changes can be made that may make working with your old version and the specs repo impossible (without cloning an old unsupported version and maintaining it yourself). As you can see now the minimum supported version is 0.32.1. Obviously that won't be changed just for the fun of it but, if possible, I would recommend that you sort out your issues with the newer versions and try to stay on it.

Resources