AnsweredAssumed Answered

How to create layer through arcgis online portal and use it in IOS runtime sdk code.

Question asked by kamalmtxb2b on Jan 30, 2017
Latest reply on Feb 6, 2017 by dlednik-esristaff
I have created account on ArcGIS online portal. In this portal, I have also created a map into it. I am able to show this map into IOS mobile device through ArcGIS runtime SDK. Below is the code which I am using.

self.portal = AGSPortal (URL: NSURL(string:  URL)!, loginRequired: false)


        self.portal.credential = AGSCredential(user:  USERNAME, password:  PASSWORD)


        //construct a portal item from the portal and item ID string

        self.portalItem = AGSPortalItem(portal: self.portal, itemID:  ITEMID)


        //construct a map from the portal item = AGSMap(item: self.portalItem)


self.portal.loadWithCompletion() {[weak self] (error) in

            if error == nil {

                // check the portal item loaded and print the modified date

                if self?.portal.loadStatus == AGSLoadStatus.Loaded {


                    self? = self?.map






                print("The map failed to load. ", error?.localizedDescription)






Now I want to create a layer through this portal and use it into map but I didn't find any link to how to create a layer.