iOS builds broken with react-native-hms-location
See original GitHub issueDescription
Importing import HMSLocation from '@hmscore/react-native-hms-location';
causes iOS to build in runtime with
[Mon Nov 30 2020 12:29:30.290] ERROR TypeError: null is not an object (evaluating '_Geofence.default.GeofenceRequestConstants')
[Mon Nov 30 2020 12:29:30.291] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
Environment
- Platform: React-Native
- Kit: Location
- Kit Version: 5.0.0-301-01
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
problem with react native @hmscore/react-native-hms-location
i'm follwing @hmscore/react-native-hms-location documontation with react native, i'm trying to Continuously Obtaining the Location ...
Read more >React-Native-Hms-Location Error When Building App - ADocLib
Go to buildscript > repositories and allprojects > repositories, and configure the Maven repository address. Download the React Native Location Plugin and ...
Read more >Troubleshooting - React Native
Within that folder, go to Build → Intermediates.noindex → Pods.build → Debug-iphonesimulator (or the equivalent for your iOS device, ...
Read more >React Native Changelog - Airship Docs
This release contains small breaking changes to the event handling API, and also adds an extender to Android making it easier to modify...
Read more >@hmscore/react-native-hms-nearby - npm
React Native HMS Nearby Kit. Latest version: 6.2.0-302, last published: 2 months ago. Start using @hmscore/react-native-hms-nearby in your ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @minUswachoke and @sktan810 ,
First Solution
1- First import Platform from react-native
import { Platform } from "react-native";
2- Define HMSLocation after your imports using let
let HMSLocation;
3- Check platform
if (Platform.OS === "android") { HMSLocation = require("@hmscore/react-native-hms-location").default; }
4- Now you can run your code.
Second Solution
You can use platform specific solutions as given here by React Native.
the issue still exists even using 5.0.4.300