react-native-carplay icon indicating copy to clipboard operation
react-native-carplay copied to clipboard

POI example crash the app with error: Unsupported object <CPPointOfInterestTemplate:....

Open vvusts opened this issue 4 years ago • 1 comments

Hi,

I am trying to use POI template same as in examples but app crash:

import {
    CarPlay, PointOfInterestTemplate
} from 'react-native-carplay';

const template = new PointOfInterestTemplate({
            title: 'Example',
            items: [
              {
                id: 'test',
                location: { latitude: 64.011, longitude: -21.66 },
                title: 'Testing',
                subtitle: 'foobar',
              },
            ],
          });
CarPlay.setRootTemplate(template, false);

But error that I get is: Screenshot 2021-08-20 at 16 11 34

If this is not possible I tried something else: Screenshot 2021-08-20 at 16 34 29

CarMapView() {
        return (
          <View style={{ flex: 1}} >
            <MapView 
                style={{flex: 1}} 
                provider={PROVIDER_GOOGLE} 
                showsUserLocation={true} 
                followsUserLocation={true}>
                <View style={{backgroundColor: '#f00', padding: 30, marginLeft: 50}}>
                    <TouchableOpacity style={{backgroundColor: '#0ff'}} onPress={() => {CarPlay.pushTemplate(someOtherTemplate);}}>
                        <Text>ITEM A</Text>
                    </TouchableOpacity>
                </View>
            </MapView>
          </View>
        );
      }

const mapTemplate = new MapTemplate({
            component: this.CarMapView
          });
          
CarPlay.setRootTemplate(mapTemplate, false);

but this doesn't catch touch event on button over map. Any idea?

vvusts avatar Aug 20 '21 14:08 vvusts

Pull Request Test Coverage Report for Build 133

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 63.636%

Totals Coverage Status
Change from base Build 101: 0.0%
Covered Lines: 32
Relevant Lines: 42

💛 - Coveralls

coveralls avatar May 06 '21 22:05 coveralls

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot[bot] avatar Dec 10 '21 14:12 dependabot[bot]