Issue with import Parse - No such module Parse - ios

I installed the Parse iOS SDK with Cocoapod and wanted to import it in my appDelegate.
But I have the error No such module Parse even if I try to clean the build. Also I have a lot of warning coming from Parse AND Bolt (a dependency).
I downgrade the package from the current 1.15.3 (at the time of this writing) to 1.14.4 but have the same trouble.
here my Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'BookBank' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for BookBank
pod 'Parse'
end
Any idea ?
Edit
I think I found out why. Even opening the *.xcworkspace file XCode didn't seem to link with the Cocoapod libraries. I try with Alamofire or other well known package and I had the same issue. So it was pointing out it wasn't a library problem.
I google for a day (and lost a day of working) and I solve my issue.
I had to change the scheme of the app like so
Click on the upper-left of XCode on your app's name
Then Manage Schemes
And finally change your app container to the one with the workplace.
Clean the build et voilà !

Related

How do I remove Cocoapod pods from a Flutter project?

I have a Flutter app that runs fine on Android devices. It has a Firebase Firestore backend.
Now, I want to build it on an iOS simulator, and so I need to initialize the Firebase iOS app. (I had only initialized the Android version before.) So I tried following the steps on firebase.com for setting up the iOS Firebase app using Cocoapods... but I think I did something wrong! More specifically, I believe the steps I followed were for adding Firebase to a native iOS app (in Objective C or similar), but when using Flutter, I'm supposed to let the Flutter framework do most of this work, rather than adding pods manually! (Here's a specific instruction for adding Firebase to a Flutter iOS project)
But before doing it right, I want to remove the pods that Cocoapods installed for me. Only I don't know how! 😣 When I web-search, I'm told to delete the pods I don't want from the Podfile. Only there ARE no pods in my ios/Podfile! There's only a bit that says:
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
There's also an ios/Podfile.lock file, and THAT one has a list of all the pods... And then, there's an ios/Pods/Manifest.lock file, which also has such a list... So should I delete the unwanted pod names from one of these two files, instead?
Or otherwise, how do I uninstall my Cocoapods pods, when they are not listed in the ios/Podfile?
Turns out the correct way to install and remove pods from a Flutter project is just to edit the pubspec.yaml file in the root directory!
Cocoapods needs to be installed, but it will automatically read the pubspec.yaml file and do the work from there! 🙂 No need to run pod commands from terminal or otherwise.
I suppose you followed these steps? in this case, you don't need to remove pods.
For step 1, step 2, it should be fine.
For step 3, just remove the config file.
For step 4, if you added firebase with swift package manager, remove it from your packages.
I'm supposed to let the Flutter framework do most of this work, rather than adding pods manually!
How did you add pods manually? from your Podfile, I didn't see any new added pods.
Or otherwise, how do I uninstall my Cocoapods pods, when they are not listed in the ios/Podfile?
You don't need to do anything, in worst cases, just remove the Podfile and re-run the app to let flutter regenerate it.

'Unknown type name FBSDK_EXTERN' Build Error resulting from use of CocoaPods and use_frameworks

I am trying to upgrade my iOS app with the latest FacebookSDK. Facebook recommends the use of CocoaPods for upgrades. I was already using another 3rd party SDK that also uses CocoaPods. For the existing 3rd party SDK, it requires the use of use_frameworks! in the podFile. However, when I run 'pod update' and then build my app, I get the following errors:
Unknown type name FBSDK_EXTERN [facebook header file]
for each Facebook header file that uses this extern. How can I resolve this apparent incompatibility between podFile requirements of these two different SDKs?
My podFile looks like the following:
platform :ios, '8.0'
def shared_pod
use_frameworks!
pod 'apptentive-ios', '~> 4'
pod 'FacebookSDK'
end
target 'myApp' do
shared_pod
end
target 'myOtherApp' do
shared_pod
end
Alternatively, how can I resolve the 'Unknown type name FBSDK_EXTERN' to allow my app to build?
I also had the same problem.
I believe this can be cause by CocoaPods cache.
The best approach (and worked for me) is
go to the /Pods folder
delete the problematic framework folder (may be
named FBSDKLoginKit)
run pod install --repo-update again
if that doesn't work try resolving your pod to the previous version
pod 'FacebookSDK', '4.37.0'
Cheers
Had the same error when tried to compile FBSDKShareKit 4.38.1 with FacebookSDK 4.37.0. Updating FacebookSDK to 4.38.0 fixed this issue.
I tried Francisco's solution without success, downgraded to 4.37.0 and suddenly still got the same error (even though I had this version installed right before trying to update).
What then helped was simply cleaning Xcode's build folder, building now works for me.

xcode error when compiling build failed

I'm doing an app using firebase, I've already done the set up with pod and today when I re-opened the project after a bit of time I have this problem in the picture, any help on how to fix it?
I've already tried to clean and deleting pod files and re-executing a "pod install" but it seems he can no longer see my "import Firebase"
Unfortunately there could be a number of reasons for your error. Here are a couple easily overlooked steps when installing Firebase with cocoapods:
The top of your pod file likely looks similar to the snippet below. It appears you're using swift so make sure you uncomment the "use_frameworks!" line as I've done here :
# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# Uncomment this line if you're using Swift
use_frameworks!
Make sure from now on you open your project from the terminal:
$ open your-project.xcworkspace
If you still don't have any luck it may be worth carefully reviewing the getting started guide for Firebase: Add Firebase to your iOS Project

Parse SDK / CocoaPods

I have an objective C iOS app using the Parse SDK.
In the process of moving this app from Parse.com to a self hosted Parse-Server, I need to update the Parse SDK to the latest version. For this update I decided to go with CocoaPods.
This is the first time I touch CocoaPods (after reading and hearing so much good about it).
I found my way, following what I could read here and also based on a few CocoaPods tutorial I quickly viewed.
Having my project "ready", when buiding it I get this error:
#import <ParseUI/ParseUI.h> -----> File not found.
Obviously things have changed place. And I tried a couple of unsuccessful solutions.
So here is my question:
How do I need to change the settings of my project, now that I am using CocoaPods?
In order to use Cocoapods with parse and Parse UI you need to do the following steps:
Create a new file and name it Podfile. This file should be located on your IOS project root folder.
The Podfile should contain at least the following structure if you want to use parse IOS SDK and ParseUI
platform :ios, '8.0'
use_frameworks!
pod 'Parse'
pod 'ParseUI'
# Put more pods in here..
Notice to the platform, you may change it to the minimum version that your app can run on and the use_frameworks! will install all your pod as frameworks and this is mandatory if you like to consume Swift libraries.
Open terminal and navigate to your IOS root directory and enter pod install. This command will install all the pods and dependencies into your project.
After installing you will no longer use the IOS project file from now on you will use a new file which called workspace. The workspace will contain both your project files and the pods project/frameworks files.
Build your project, fix some error (if there are) and run it to make sure that it works as expected .
More CocoaPods commands that you need to know are:
pod update - update all your pods to the latest release or to the release that was mentioned in the Podfile
pod update update specific pod to the latest release or to the release that was mentioned in the Podfile
pod outdated - display out to date pods that are being used inside your project.

Parse framework keeps unlinking

Every time I open my XCode project in XCode 7.1.1, I get the error: "No such module Parse" wherever I import Parse.
However, I have the Parse framework correctly added in my Build Phases, and the only way to fix this is by deleting the Parse framework listed in my Build Phases and re-adding it like I did the first time.
I have to do this every time I reopen an XCode project, and it's extremely annoying, but able to be worked around. Does anyone have any permanent fixes for this?
Thank you!
I suggest using CocoaPods to install Parse for Swift using the following Podfile:
platform :ios, "8.0"
use_frameworks!
pod 'Parse'
Parse can then be installed with
pod install

Resources