question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm fails to compile when gRPC-Core is also in the project

See original GitHub issue

Goals

I’m seeing compilation errors in object-store files. I’d like to be able to compile my project on iOS.

Expected Results

I expected my project to compile.

Actual Results

I added Firebase to my app via Cocoapods, then got the following errors in Realm:

In file included from /Users/kevboh/my-project/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:25:
In file included from ../../src/object-store/src/shared_realm.hpp:22:
In file included from ../../src/object-store/src/execution_context_id.hpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:96:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:60:9: error: no member named 'clock' in the global namespace; did you mean 'flock'?
using ::clock;

There are many members it cannot find, including clock as above, plus difftime, mktime, and many more.

Steps to Reproduce

  1. react-native init MyProject
  2. cd MyProject/
  3. yarn add realm
  4. react-native link realm
  5. cd ios/
  6. pod init and add pod 'Firebase/Core' and pod 'Firebase/Firestore' to the Podfile
  7. react-native run-ios

A sample project that is the result of these steps is here: https://github.com/kevboh/RealmFirebaseBugDemo

Version of Realm and Tooling

  • Realm JS SDK Version: 2.1.0
  • Node or React Native: 0.51.0
  • Client OS & Version: macOS 10.13.2, Xcode 9.2
  • Which debugger for React Native: None

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
congnguyen91commented, Apr 24, 2018

Confirm that remove “$(SRCROOT)/…/…/…/…/ios/Pods/Headers/Public/React**” search path on RealmReact working for me

4reactions
bdashcommented, Jan 10, 2018

I wonder if the search path could be changed to only add the headers for the ReactNative pod to the search path, rather than headers for all pods. That seems like it’d avoid picking up headers from unrelated pods while also allowing Realm to find ReactNative’s headers when it is integrated via CocoaPods.

Read more comments on GitHub >

github_iconTop Results From Across the Web

no viable overloaded '=' error on iOS 11 - realm - Stack Overflow
Try to change your podfile to the latest version of Realm : pod 'Realm'. This fix is up to version 2.8.1 , so...
Read more >
Building the CocoaPods dependency project gRPC-Core Error
I was trying to building the cocoapods dependency project gRPC-Core. (for using Firebase) fatal error: 'absl/memory/memory.h' file not found.
Read more >
Realm: Create reactive mobile apps in a fraction of the time
Go to your app target's build phases tab in Xcode and add the Realm file to the “Copy Bundle Resources” build phase. At...
Read more >
gRPC-Core on CocoaPods.org
gRPC – An RPC library and framework. gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere....
Read more >
How can I run a Java app, created with the Java bindings ...
The Java bindings library lets you connect to a Daml Ledger via a secure connection. ... < plexus.core [DEBUG] Populating class realm maven.api...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found