Esri / arcgis-runtime-samples-ios

Swift samples demonstrating various capabilities of ArcGIS Runtime SDK for iOS
https://developers.arcgis.com/ios
Apache License 2.0
324 stars 394 forks source link

Property 'map' not found #236

Closed mrimadali closed 7 years ago

mrimadali commented 7 years ago

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
singhgag commented 7 years ago

@mrimadali What version of the SDK are you using?

mrimadali commented 7 years ago

Latest one, as I was using cocoapods to download the SDK.

singhgag commented 7 years ago

You mean 100.0.0? I asking because we didn't have the concept of AGSMap as a separate object in version 10.2.x.

mrimadali commented 7 years ago

@singhgag Not sure, where to check the version. I have downloaded the latest one using: pod 'ArcGIS-Runtime-SDK-iOS' Pls advice.

singhgag commented 7 years ago

One way to check would be to see if you have AGSMap.h file in the Headers folder. Location to the Headers folder: $HOME/Library/SDKs/ArcGIS/iOS/Frameworks/Static/ArcGIS.framework/Headers

singhgag commented 7 years ago

You can get the version number from the version.txt file located at $HOME/Library/Application Support/AGSiOSRuntimeSDK/

mrimadali commented 7 years ago

FYI, I don't have a file AGSMap.h.

singhgag commented 7 years ago

Can you share your podfile?

mrimadali commented 7 years ago

Here you go:

platform :ios, '9.0' target 'AlexaTest' do pod 'ArcGIS-Runtime-SDK-iOS' end

singhgag commented 7 years ago

Try putting the version number along with the pod name. As below.

platform :ios, '9.0'
target 'AlexaTest' do
pod 'ArcGIS-Runtime-SDK-iOS', '~> 100.0'
end
mrimadali commented 7 years ago

It works, Thanks 👍