Driversnote-Dev / react-native-kontaktio

React Native (iOS and Android) library for Kontakt.io beacons (and all other beacons)
MIT License
112 stars 48 forks source link

Expo - Can't build custom dev client for iOS #92

Open nzhenry opened 2 years ago

nzhenry commented 2 years ago

When I run eas build --profile development --platform ios on an Expo project with react-native-kontaktio included as a dependency, it fails on the fastlane step.

Here's the relevant log output:

› Compiling react-native-kontaktio Pods/KontaktBeacons » KontaktBeacons.m

❌  (node_modules/react-native-kontaktio/ios/KontaktBeacons.m:157:46)

  155 |     if (dict[@"minor"] == nil) {
  156 |         if (dict[@"major"] == nil) {
> 157 |             return [self createBeaconRegion:[RCTConvert NSString:dict[@"identifier"]]
      |                                              ^ declaration of 'RCTConvert' must be imported from module 'React.RCTConvert' before it is required

Can anyone shed any light on this please? It'd be great if I could use this library in my app without having to eject from the Expo managed workflow.

nzhenry commented 2 years ago

I've created a sample project which will demonstrate the error if you run eas build --profile development --platform ios

https://github.com/nzhenry/expo-ibeacon-test

yhanssens commented 2 years ago

I'm also getting this error with the bare workflow setup of expo.

yhanssens commented 2 years ago

@nzhenry I found a fork from someone who fixed this issue: https://github.com/joaojusto/react-native-kontaktio

nzhenry commented 2 years ago

@yhanssens Thank you! That fork works in managed workflow with a custom dev client.

nzhenry commented 2 years ago

@andrekovac @JonasWho ^^ An easy fix for the issue in Expo. Any chance you could publish a new version?

andrekovac commented 1 year ago

@nzhenry I asked the creator of the fork which @yhanssens linked for more information about his additions (see this question in his commit

We are not using react-native-kontaktio with Expo (and a custom dev client for that matter). However, PRs are of course very welcome.