Git Product home page Git Product logo

Comments (8)

uysalemre avatar uysalemre commented on June 3, 2024 1

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.

from hms-react-native-plugin.

ukasiu avatar ukasiu commented on June 3, 2024

Similar affects also analytics kit:

[Mon Nov 30 2020 12:39:18.599]  ERROR    TypeError: null is not an object (evaluating 'HmsAnalytics.HAEventType = _HAEventType.default') 

Please review all kits so that iOS builds won't fail.

from hms-react-native-plugin.

aktug avatar aktug commented on June 3, 2024

Hello @ukasiu ;
Location plugin is not supporting iOS. That implementation is in our roadmap and we're working hard for that 👍👍

Please use 5.0.3-300 version of Analytics Kit, it is the initial version of supporting iOS. https://www.npmjs.com/package/@hmscore/react-native-hms-analytics/v/5.0.3-300

from hms-react-native-plugin.

ukasiu avatar ukasiu commented on June 3, 2024

@aktug , I don't mean supporting, but not breaking. In case of absence of HMS native module, just importing JS part should not cause runtime errors.

from hms-react-native-plugin.

aktug avatar aktug commented on June 3, 2024

Hello again @ukasiu
This issue has been fixed and waiting to release.
The next version 5.0.4.300 will be published at end of the December 👍

from hms-react-native-plugin.

ukasiu avatar ukasiu commented on June 3, 2024

Hi @aktug ,

thanks for the good news!

from hms-react-native-plugin.

minUswachoke avatar minUswachoke commented on June 3, 2024

Please reopen this issue, 5.0.4.300 still does not fix this issue.

from hms-react-native-plugin.

sktan810 avatar sktan810 commented on June 3, 2024

the issue still exists even using 5.0.4.300

from hms-react-native-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.