Giter VIP home page Giter VIP logo

esri / arcgis-runtime-samples-ios Goto Github PK

View Code? Open in Web Editor NEW
321.0 46.0 399.0 583.72 MB

Swift samples demonstrating various capabilities of ArcGIS Runtime SDK for iOS

Home Page: https://developers.arcgis.com/ios

License: Apache License 2.0

Swift 96.61% CSS 0.41% Dockerfile 0.04% Python 2.67% Ruby 0.03% Shell 0.24%
ios swift samples arcgis-runtime-sdk native-development map navigation swift-sample arcgis augmented-reality

arcgis-runtime-samples-ios's Introduction

ArcGIS Runtime SDK for iOS Samples

This repository contains Swift sample code demonstrating the capabilities of ArcGIS Runtime SDK for iOS and how to use them in your own app. The project can be opened in Xcode and run on a simulator or a device. Or you can download the app from the App Store on your iOS device.

Try ArcGIS Maps SDK for Swift version 200

ArcGIS Runtime SDK for iOS version 100.15 is a long-term support release focused exclusively on bug fixes and minor updates.

ArcGIS Maps SDK for Swift version 200 builds on the proven architecture of 100.15, and provides a new API designed exclusively for developing iOS apps using Swift - Apple's modern, powerful, and intuitive programming language.

Samples app

The main branch of this repository contains samples configured for the latest available version of ArcGIS Runtime SDK for iOS. For samples configured for older versions of the SDK, look under the Releases tab for a specific version.

Features

  • Maps - Open, create, interact with and save maps
  • Layers - Display vector and raster data in maps and scenes
  • Features - Work with feature layers and geodatabases
  • Display Information - Show graphics, popups, callouts, and sketches
  • Search - Find addresses, places, and points of interest
  • Edit Data - Add, delete, and edit features and attachments
  • Geometry - Create geometries and perform geometric operations
  • Route & Directions - Calculate routes between locations and around barriers
  • Analysis - Perform spatial analysis via geoprocessing tasks and services
  • Cloud & Portal - Search for webmaps and list portal group users
  • Scenes - Visualize 3D environments and symbols
  • Utility Network - Work with utility networks, performing traces and exploring network elements
  • Augmented Reality - View data overlaid on the real world through your device's camera

Requirements

The ArcGIS Runtime SDK Samples app has a Target SDK version of 14.0, meaning that it can run on devices with iOS 14.0 or newer.

Building Samples Using Swift Package Manager

  1. Fork and then clone the repository
  2. Open the arcgis-ios-sdk-samples.xcodeproj project file

    The project has been configured to use the arcgis-runtime-toolkit-ios package, which provides the ArcGISToolkit framework as well as the ArcGIS framework.

  3. Run the arcgis-ios-sdk-samples app target

To add the Swift packages to your own projects, consult the documentation for the ArcGIS Runtime iOS Toolkit and ArcGIS Runtime iOS SDK.

Building Samples Using CocoaPods

  1. Fork and then clone the repository
  2. Install the ArcGIS Runtime SDK for iOS by running the pod install command in the folder where you cloned this repository
  3. Open the arcgis-ios-sdk-samples.xcworkspace workspace file
  4. Select the arcgis-ios-sdk-samples project node, go to the Package Dependencies tab, and delete the arcgis-runtime-toolkit-ios package

    This Swift package conflicts with CocoaPods and is only required when using the Swift Package Manager as described in the previous section.

  5. Run the arcgis-ios-sdk-samples app target

Building Samples Using Installed SDK

  1. Fork and then clone the repository
  2. Install the ArcGIS Runtime SDK for iOS to a central location on your mac as described here
  3. Open the arcgis-ios-sdk-samples.xcodeproj project file. Select the arcgis-ios-sdk-samples project node, go to the Package Dependencies tab, and delete the arcgis-runtime-toolkit-ios package

    This Swift package conflicts with manual installation and is only required when using the Swift Package Manager as described in the previous section.

  4. Download the arcgis-runtime-toolkit-ios from here, and follow the instructions to add it as a local Swift package

    The manual installation method allows you to use a local installation ArcGIS Runtime SDK for iOS by making minor edits to the toolkit's Swift package manifest. Follow the instructions in Package.swift to uncomment the lines for localArcGISPackage and use it as the package dependency instead of the hosted version.

  5. Run the arcgis-ios-sdk-samples app target

Sample Data

Some sample data is too large to store in the repository, so it is automatically downloaded at build time. The first time the app is built, a build script downloads the necessary data to Portal Data. The script only downloads data files that do not already exist, so subsequent builds will take significantly less time.

Configure API key

To build this app locally, follow the steps to add an API key to a secrets file stored in the project's root directory, $(SRCROOT)/.secrets.

  1. Create a hidden secrets file in the project's root directory.
touch .secrets
  1. Add your API Key to the secrets file aforementioned. Adding an API key allows you to access a set of ready-to-use services, including basemaps. Acquire the keys from your dashboard. Visit the developer's website to learn more about API keys.
echo ARCGIS_API_KEY=your-api-key >> .secrets

Replace 'your-api-key' with your keys.

Please see Configure App Secrets for adding license key and other details.

Additional Resources

  • Want to start a new project? Setup your dev environment
  • New to the API? Explore the documentation : Guide | API Reference
  • Got a question? Ask the community on our forum

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2022 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

arcgis-runtime-samples-ios's People

Contributors

aaronpk avatar alpascual avatar chrisfrenchpdx avatar dg0yal avatar esreli avatar jf990 avatar maryharvey avatar mhdostal avatar mikewilburn avatar ncastle1 avatar nixta avatar njarecha avatar pgruenler avatar pheede avatar philium avatar qsmmorgan avatar rolson avatar sabaranski avatar saratchandrakarumuri avatar sbaskaran avatar singhgag avatar stevebaranski avatar stevemoser avatar vquach2404 avatar yo1995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcgis-runtime-samples-ios's Issues

Cannot select features on AGSFeatureTableLayer

Hi,

When "AGSFeatureTableLayer" .setSelected enabled , Doesn't highlight the selected features.
Even when checked for isFeatureSelected turns to false. Somehow, Tried with Offline Feature Editing sample

Seems like a bug.

Property 'map' not found

Hi

After integrating the maps using cocoa pods, I have imported the following:
#import <ArcGIS/ArcGIS.h>
In storyboard file, I've added a UIView element into view controller, changed the class name as AGSMapView & created an outlet.

When I try to use the "self.mapView.map", it throws an error saying the property map not found on object of type AGSMapView. Please clarify.

I was referring to the https://developers.arcgis.com/ios/latest/swift/guide/develop-your-first-map-app.htm

Attached is the screen shot for reference.
screen shot 2016-12-12 at 1 42 51 pm

GeodesicSketch issue

In the GeodesicSketch sample, normal sketch is drawn instead of Geodesic Sketch

image

Swift 3 Support

When will you release swift 3.0 samples. and SDK to work with Swift 3.0

Regards

exportImageWithCompletion Not found when i used ArcGis Map in swift 3.0

I wrote code like this . I need this thing working urgently . Please help me

self.mapView.exportImageWithCompletion { [weak self] (image:UIImage?, error:NSError?) -> Void in
            if let error = error {
                UIAlertView(title: "Error", message: error.localizedDescription, delegate: nil, cancelButtonTitle: "Ok").show()
            }
            if let image = image {
                //on completion imitate flash

            }
        }

But in swift 3.0 this method not found see the screen shot
screen shot 2016-11-19 at 7 49 15 pm

OfflineRoutingSample-Error while adding a stop and reorder

Adding a stop on map and clicking "reorder" function causes Error:- Solve route failed.
Steps to repro:-
Deploy OfflineRoutingSample
Add ONE stop on the map
Click "Reorder"
Error:- Solve route failed: ErrorDomain=com.esri.arcgis.runtime.errorcode=10004 "Invalid route task parameters".

Requires a user friendly error message.

Map issue delegate method not called in Swift 3.0 , iOS 10

  • callout(callout: AGSCallout!, willShowForFeature feature: AGSFeature!, layer: AGSLayer!, mapPoint: AGSPoint!)
  • This delegate method not called when tap on Marker.
  • In this case i am not getting this details.
    let graphic = feature as! AGSGraphic

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  • AGSCalloutDelegate,AGSLocatorDelegate,AGSMapViewLayerDelegate,AGSLayerDelegate
    self.mapView.callout.delegate = self;
    self.mapView.layerDelegate = self;
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Any one know Why delegate method not called!!!

Consolidate all 3'rd party components

Currently, all samples have their own copy of the 3'rd party component.
It will be good to move all into a top-level folder and then reference from each sample

Add capability to resume jobs

The SDK keeps track of jobs in progress. This is useful if the app is terminated before the job completes. Need to enhance existing samples to show how developers can resume jobs when the app restarts.

  • Download Tile Cache Sample
  • Offline Feature Editing Sample

Sample showing how to use client-side popups

We have a sample showing how to display popups defined in a webmap.
This sample should show how to display popups defined in code. For example, pull information from FourSquare or Yelp about local restaurants and display details in a popup.

WebMapSample-Callout button displays no result

The Callout button in the WebMapSample displays no result.

Steps to reproduce:-
Open the WebMapSample in xcode and run the sample.
Log-in to the "private" webmap.
Select a feature on map and click on it.
Click on the callout button- it returns no results.

webmapsample_issue

OfflineRoutingSample crash on physical devices running IOS 10.0.2 , 9.3.2 .

I can't run the OfflineRoutingSample (objective-c) on physical devices running IOS 10.0.2 , 9.3.2 , when i add another point to create a route an EXC_BAD_ACCESS is thrown from "Esri_runtimecore::Network_analyst::Traversal_result::get_partial_edge_geometry_" , however it is working fine on the 10.0 simulator , and on a physical device running 9.3.4 , anyone facing the same issue ?

Note: i am running the 10.2.5 IOS SDK , and Xcode 8 .

screen shot 2016-10-23 at 4 48 46 pm

Sample showing different renderers

Need a sample showing code for different types of renderers.

  • Simple Renderer
  • Unique Value Renderer
  • Class Breaks Renderer
  • Rotation Renderer No such renderer.

the wrong show in the picture happened when I pod install the sdk

Uploading 874501FB-7D58-42E5-8D1B-35067B589A9E.png…

Installing ArcGIS-Runtime-SDK-iOS (10.2.5)

[!] Error installing ArcGIS-Runtime-SDK-iOS
[!] /usr/bin/curl -f -L -o /var/folders/p7/cbrw5rzj1_11s84dkbw19dc00000gn/T/d20160322-1697-1fm41cb/file.zip http://esri.box.com/shared/static/aa3e5u04sakyshphc9ooqizvyse7b8iv.zip --create-dirs

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0curl: (56) Recv failure: Connection reset by peer

Streamline .gitignore in v.next

You can use wildcards

This is all you need:

All Samples.xcworkspace/xcshareddata/All Samples.xcscmblueprint
arcgis-ios-sdk-samples.xcodeproj/project.xcworkspace/xcshareddata/arcgis-ios-sdk-samples.xccheckout
arcgis-ios-sdk-samples.xcodeproj/project.xcworkspace/xcshareddata/arcgis-ios-sdk-samples.xcscmblueprint
*.xcuserdatad
build
contents.xcworkspacedata

SketchLayerSample-"location" button disables other functions in the sample

Clicking the "location" button disables the "point, line and polygon" buttons in the sample.
Steps to reproduce:-
Open the SketchLayerSample in xcode
Run the sample and click on the "location" button
sketchlayersample

On click, the other operations ( sketching point, line and polygon) buttons are disabled on the map.

Pixelated maps

As in the version before the beta all the maps are still pixellated on screen, which is such a shame. It's even worse in the beta than it is in the current production version. How come nobody has noticed that yet?

Load ArcGIS shapefiles (.shp) as layers

It would be great to include the feature of loading shapefiles as layers. ArcGIS SDK for Android has this functionality with this method: public ShapefileFeatureTable(@NotNull String pathToShapeFile)

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.