Skip to content

Integrate Nextome MapView

Android integraton

Prerequisites

  • Your project has min SDK version >= 23
  • Have working credentials for our Artifactory repository

Credentials

If you need access to artifactory, contact us at info@nextome.com.

How to include

  1. Add our repositories in the Gradle Project Settings settings.gradle.kts:

    settings.gradle
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            ...
    
            google()
            mavenCentral()
            maven { 
                url "https://storage.googleapis.com/download.flutter.io"
            }
            maven {
                url "https://packages.nextome.dev/artifactory/nextome-libs-prod/"
    
                credentials {
                    username "USERNAME"
                    password "PASSWORD"
                }
            }
        }
    }
    
    settings.gradle.kts
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            ...
    
            google()
            mavenCentral()
         maven { 
                url = uri("https://storage.googleapis.com/download.flutter.io") 
            }
            maven {
                url = uri("https://packages.nextome.dev/artifactory/nextome-libs-prod/")
    
                credentials {
                    username = "USERNAME"
                    password = "PASSWORD"
                }
            }
        }
    }
    
  2. In your module (app-level) Gradle file, add the dependency for the NextomeMapView:

    project/build.gradle
    implementation 'com.nextome.nextomemapview:nextomemapview:{last_version}'
    
    project/build.gradle.kts
    implementation ("com.nextome.nextomemapview:nextomemapview:{last_version}")
    

    Check latest released version here

Required permissions

To run, NextomeMapView requires the following permissions:

AndroidManifest.xml
    <!-- needed for map file usage -->
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Next steps

  • See Map-usage to use Nextome MapView component.


IOS integraton

Prerequisites

  • Xcode 15.3
  • Make sure that your project meets these requirements:
    • Swift 5.7
    • Minimum deployment: iOS 13.2
  • Have working credentials for our Artifactory repository

Credentials

If you need access to artifactory, contact us at info@nextome.com.

How to include

Cocoapods

NextomeMapView is distributed with Cocoapods and artifactory. Be sure to have CocoaPods installed, or follow this guide to install it.

Then it is necessary to configure our private Spec Repo.

  1. Add artifactory credentials in the netrc file

    nano ~/.netrc
    
    Copy this then close and save

    machine packages.nextome.dev
    login <USERNAME>
    password <ENCRYPTED-PASSWORD>
    

    Note

    If you get an error of this type: "Permission bits, should be 0600, but are 644"

    Run this command:

    chmod 0600 ~/.netrc

  2. Create a Podfile if you don't already have one. From the root of your project directory, run the following command

    pod init
    

  3. To your Podfile, be sure that the platform is at least 13.2 then add the CocoaPods specs source and our Nextome source. Then add the NextomeMapView_Environment pod where Environment can be can be Release or Debug.

    platform :ios, '13.2'
    
    source 'https://github.com/CocoaPods/Specs.git'
    source 'https://github.com/Nextome/Specs'
    
    use_frameworks!
    
    target 'MyApp' do
        pod 'NextomeMapView_Release', '{last_version}'
    end
    

    Note

    The Release dependency will not work properly in the simulator. The app will compile but the map will not be visible

  4. Install the pods, then open your .xcworkspace file to see the project in Xcode

    pod install
    
  5. Open your xcworkspace file and start to use NextomeMapView

Next steps

  • See Map-usage to use Nextome MapView component.