Installing BackendLess via CocoaPods generates multiple build errors - ios

I am replacing Parse with BackendLess on an iPhone app and when I install it via CocoaPods, I get 10 "no member named 'xxx' in the global namespace" errors in another library which is using C++ functions.
I am using Xcode 7.2 building for iOS 9.2. When I remove Backendless-ios-SDK from the Podfile and run 'pod install' again, all the errors disappear and all is well. Is there something that I can do without rewriting C++ code? Thank you

Related

Building Realm for Mac Catalyst fails: Realm.h not found

I have an iOS app, which I recently updated to support Mac Catalyst. For the Mac version I added a new target, which I also added to my Podfile with the subset of the same libraries, including Realm.
The app builds well for "My Mac", but when I want to archive it (build for release), it fails with the following error:
"Umbrella header 'Realm.h' not found"
I am not familiar with the problem, what could go wrong?
I tried the usual Derived Data deleting, etc, but nothing seems to help. Is this some kind of problem with the CocoaPods, my config, or with Realm?
Due to CocoaPods not releasing 1.10.2 I have fixed the same issue in my project.
Remove Realm from your pod file
pod install in terminal to remove it fully
Install Swift Package Manager for (Xcode) - https://swiftpackageregistry.com/realm/realm-cocoa
This should allow you to get the project archived successfully.

Error message - RNFirebase core module was not found natively on iOS

React Native Firebase won’t install on iOS React Native project. It works fine on Android.
I followed this instruction.
https://rnfirebase.io/docs/v5.x.x/installation/initial-setup
I set up Firebase, added the downloaded plist file via XCode, installed and set up Cocoapod.
The moment I add the following line to my App.js, the simulator returns an error message.
import firebase from 'react-native-firebase';
The error message: “RNFirebase core module was not found natively on iOS”
I’ve tried a few things I picked up from this forum:
https://github.com/invertase/react-native-firebase/issues/614
I commented out following lines from Podfile
use_frameworks!
And then pod install, pod update
on Xcode, checked the Build Phases/ Link Binary with Libraries section. I checked libRNFirebase.a was already there.
I've been trying this for a few months now on and off. And I haven't found a way to make React Native Firebase install on iOS project. Any pointer would be much appreciated.
I'm currently maintaining the react-native-firebase v5 branch (current stable) and we do have a problem with the header search paths right now for some reason.
I don't have a definitive fix, but I constructed a demo that goes from react-native init, then installs react-native-firebase, and does all the things necessary such that the project builds and runs on iOS and even archives in release mode.
You may see it here: https://github.com/mikehardy/rnfbdemo
The only thing that is important at the moment is that you need to put one non-documented thing in your Podfile after following all the install instructions, as the last line before the final end
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")

Zip and Encryption pods build error in Ensembles 2.6.2

I created a brand new Xcode project in Swift and integrated Ensembles 2.6.2 via Cocoapods.
I also wanted to include Zip compression and Encryption and so I simply added these 2 pods in my Podfile, as suggested in the manual.
Unfortunately after running pod install, I’m getting an error when trying to build. I attach 2 screenshots to give you some context. Unless I’m missing something really obvious, I have no idea on what to try next.
I'm using Xcode 9.4.1 and macOS 10.13.6

Error encountered while reading from module 'RealmSwift'

Summary: Swift allows me to import RealmSwift, but it doesn't allow me to create a new instance of the Realm class (or type any code using Realm keywords). I don't have any other code because this is a brand new project.
Steps to Reproduce:
1. Make a new Xcode project
2. In Terminal, cd to the project and type 'pod init'
3. Open the Podfile and add the pod 'RealmSwift'
4. Open the Xcode project's workspace and go to the AppDelegate file
5. Import 'RealmSwift'
6. Make a new variable and make it an instance of the Realm class
Expected Results: The program runs and lets me make a new instance of the Realm class.
Actual Results: The program crashes with the following errors:
Command failed due to signal: Abort trap: 6" & "error: fatal error
encountered while reading from module 'RealmSwift'.
Also, at the top of the file where I wrote the code using Realm keywords, it says:
An Internal error occurred. Source editor functionality is limited. Attempting to restore...
This is a Swift Compiler Error btw
Version/Build:
Realm version: 3.7.4
Xcode version: 4.1
Swift version: 4.1
configuration: MacBook Pro running macOS High Sierra
Have you considered using a Dynamic Framework instead? I did use CocoaPods in the past but using a dynamic framework simplifies the process. Download the frameworks from here:
https://realm.io/docs/swift/latest#installation
And follow the instructions:
After you've dragged the framework into your project, it looks like so:
Now, the hurdle is that since this is not done through pod files, you cannot automatically update the Realm version. This you will have to do manually by downloading the newest version of the framework from time to time.
If you use Xcode packages, you can replace "Up to next major" by the exact version of the package (10.19.0 in my case)

Xcode showing error 'No such module' even though I've installed Cocoapods and installed pod file of Dialogflow

I've been making a chatbot using Dialogflow formerly Api.AI but now encountering error while integrating the project to my app written in Swift in Xcode. I'd installed cocoapods using terminal "sudo gem install cocoapods" and using this version of Dialogflow to create the podfile.
All gone well but now when I'm importing inside Xcode in my app's AppDelegate.swift file using import ApiAI or import AI Xcode is showing me error that No such module. Please refer to image.
And on GitHub this library which is written in Swift, showing that it has depreciated and asking me to refer to API.AI's Apple Client library which is in Obj-C and unfortunately I've no expertise in Obj-C.
After installing a pod using Cocoa Pods, you must from that point forward open the workspace rather that the project file. The icons will appear differently in your project like so:
In the image you provided is clearly showing that you have opened the project file not the workspace one.
Go to Pods Build settings and set Build Active Architecture Only to NO. This always helps while using pods. After that clean the project once and then build.
After installing pod you should clean project (shift + command + k) and then builds (command + b) in it a few times. Repeat it a few times if it is not still working.
Hope this help!

Resources