How to build ESRI native extension for iPhone?

Hi,

Request your help to build a native extension for iPhone to display ESRI maps.

Thanks in advance,

Hari Kishore.

Robert Galvin
Hi Have you read the native

Hi Have you read the native extensions documentation: http://docs.rhomobile.com/en/4.1.0/guide/native_extensions. There is also a on the subject as well.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Venkata Hari Ki...
Hi Robert Galvin,Thanks for

Hi Robert Galvin,

Thanks for quick response. Actually we are trying to use Rhomobile inbuilt ESRI extension. As suggested in the documentation : Rhomobile | MapView

We done the following mapview settings:

MapView Settings

The supported providers are ‘Google’, ‘ESRI’, “RhoGoogle” and “OSM”.

To use ESRI maps in your projects on iPhone:

  • Install ESRI iOS SDK – use default folders during installations !
  • Add “esri” to your applications extensions list in build.yml file.

Map settings in rhoconfig.txt :

When we trying to compile the code for iPhone build (command :  rake run:iphone) facing build time errors.

Error log file attached..

Build.yml :

build.png

Configuration as follows:

OS X : 10.9.3

Rhomobile : 4.0

sdk : iphonesimulator6.1

Thanks in advance,

-Hari Kishore.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
I have not personally tried

I have not personally tried this feature. Did you try the linked APi Sample app. Looks like lit has some ESRI code: https://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/ESRI

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Soldatenkov
Hi, I am responsible for ESRI

Hi, I am responsible for ESRI feature on iOS.

We used lod ESRI SDK of May 2010 year. Latest SDK is April of 2014.

Old SDK provided as lib + header, new SDK provided as framework.

Also new ESRI SDK contain a lot of changes in API.

So you can looking for old SDK and use it build application.

I planed support new SDK (it require modify our extension project and code and also developer should modify main application project according to ESRI documentation) in next one-two weeks.

I will provide all info about installation SDK and changes in project for build rhodes application with ESRI. Also you should license ESRI SDK for production because developers SDK show special permanent text "version only for development" in map view.

See https://developers.arcgis.com/ios/ for details.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Venkata Hari Ki...
Thanks Dmitry,Great to hear

Thanks Dmitry,

Great to hear that the problem is identified and started working on the issue.

Can you please let us know if the latest version RMS 5.0.2 contains fix for this issue?

-Hari Kishore.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Venkata Hari Ki...
Hi Dmirty,I also tested this

Hi Dmirty,

I also tested this is latest version of Rhostudio(5.0.2) facing the same issue.

(ESRI xcode project using "libArcGIS.a")

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Soldatenkov
HI,Latest RMS do not contain

HI,

Latest RMS do not contain new ESRI sdk support.

you can use ESRI extension from Master (rhodes/lib/extensions/esri) now or apply this two commits (if you will apply it - do not forget update BluePushpin images):

support latest ESRI SDK in ESRI extensions · 7176063 · rhomobile/rhodes · GitHub

fix crash in ERSI with empty URL · e6f9225 · rhomobile/rhodes · GitHub

Also you should setup ESRI SDK and configure our XCode application project (located application folder/project/iphone  - generate by "rake build:iphone:setup_xcode_project") - you should remove old project and generate new(or just update BluePushpin images in resources). See ESRI doc about how install SDk and configure XCode project : https://developers.arcgis.com/ios/guide/install.htm

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Venkata Hari Ki...
Hi Dmitry,Thanks for the

Hi Dmitry,

Thanks for the response. As you suggested I have downloaded and replaced the ESRI extension folder under path => "rhodes/lib/extensions/esri".

Then I downloaded the example "rhodes-system-api-samples-master" from github, then ran the application on iphone simulator (command : $ rake run:iphone). The application launched successfully in the simulator :

1.png

On selecting "GeoLocation/Native Map" option following screen appeared :

2.png

But on selecting the ESRI options nothing happened. No map is showed up. However, after selecting the Google map options these ESRI options started responding but showed default map(not ESRI).

Then as you suggested I have done the following settings to the xcode project located at "application folder/project/iphone"

Setting-1.png

Setting-2.png

Setting-3.png

Added framework bundle

Setting-4.png

After these setting application compiled and launched in iPhone simulator successfully but behaved same as above. No reaction for ESRI options.

I also tried adding "esri" under iPhone extension in build.yml file which resulted in compilation error. Error log ("Error.txt") attached.

Can you please suggest did I missing something?

-Hari Kishore.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Soldatenkov
Please make build log (your

Please make build log (your app with esri extension) with "rake run:iphone --trace" and send me (or attach this).

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Venkata Hari Ki...
HI Dmitry,Please find the log

HI Dmitry,

Please find the log files in attachment ("rake run:iphone --trace").

"Error-1.txt " file attached for the following setting:

yml-1.png

"Error-2.txt" file attached for the following setting:

yml-2.png

Thanks and Regards

Hari Kishore.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dmitry Soldatenkov
In log we can see one error

In log we can see one error:

In file included from /Users/Felix/.rvm/gems/ruby-1.9.3-p547/gems/rhodes-5.0.2/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.mm:3:

In file included from /Users/Felix/.rvm/gems/ruby-1.9.3-p547/gems/rhodes-5.0.2/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h:21:

In file included from /Users/Felix/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/Headers/ArcGIS.h:121:

/Users/Felix/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/Headers/AGSTask.h:101:67: error: unknown type name 'UIBackgroundFetchResult'

+(void)checkStatusForAllResumableTaskJobsWithCompletion:(void (^)(UIBackgroundFetchResult result))completion;

So the issue with your 6.1 iOS SDK - ESRI SDK require iOS 7.0 SDK - please update your XCode and iOS SDK.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Venkata Hari Ki...
Thanks a ton Dmitry,I can

Thanks a ton Dmitry,

I can able to build the ESRI extension with iphonesimulator7.1 sdk. Full credit goes only to you (Dmitry).

One thing I want to bring to your notice. After changing  sdk "iphone sdk : iphoneimulator7.1" in build.yml , command "rake run:iphone --trace" produced some clang error.

  

     "Clang: error: linker common failed with exit code 1(use -v to see invocation)"

Error log attached for your reference ("clang error.txt").

However, XCode application project (location application folder/project/iphone) got generated and I can able to build and run the application using xcode. I can able to view ESRI map and also modified the esri extention to show search results and route map as-well.


Thanks once again.


results.pngroute.png


-Hari Kishore.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments