POST
|
Thank you, Nimesh With those inputs I'm able to achieve exactly what I need by following such steps: disableAutoSyncToKeychain() removeAllCredentials() portal.credential = nil At least for my use case, it's not necessary to setting AGSPortal to nil. Now setting portal credentials to nil works, because in addition I've removed credentials from cache(missing step from my first approach)
... View more
05-18-2020
08:04 AM
|
1
|
0
|
536
|
POST
|
Hi, Let's assume the application need to store multiple user accounts and to be able to switch between them without re-login. Just like in any Mail app, etc. What is the best approach for achieving this? To be specific: users should be logged in using OAuth mechanism via Authentication Manager (AGSAuthenticationManager). In order to store and use multiple users credentials in the keychain, I'm using enableAutoSyncToKeychain(withIdentifier: , accessGroup:, acrossDevices:) method call with unique keychain identifier for each user. It works fine but with limitations to switch between stored user credentials. While switching between accounts, calling AGSAuthenticationManager.shared().credentialCache.disableAutoSyncToKeychain() and than AGSAuthenticationManager.shared().credentialCache.enableAutoSyncToKeychain() with a keychain identifier for new user doesn't perform the trick and mess things up. Also, setting the portal.credential to nil doesn't help. The application still have access to the user specific data. Looks like credentials in some way cached in the RAM. So the only way to actually switch between stored user credentials I've found so far, is to recreate the AGSPortal object from scratch and to call .enableAutoSyncToKeychain() with new identifier after. To summarise: is it possible to switch between user/credentials_in_keychain without recreating AGSPortal object? Or what is the suggested way of achieving work with multiple accounts using SDK? Thanks.
... View more
05-18-2020
04:36 AM
|
0
|
2
|
633
|
POST
|
Thank you, I was briefly looking at AGSSketchEditor.style property at first without success. It turns out I should look for feedbackFillSymbol and feedbackFillSymbol properties to achieve my needs.
... View more
02-14-2020
09:38 AM
|
1
|
0
|
1685
|
POST
|
Thank you, that is exactly I'm looking for. CPU performance is pretty the same, but there is helpful addition like undo manager. The only concern is how to tweak color/style of the geometries? For example while creating graphics manually, I'm able to tweak AGSSimpleFillSymbol style, color and outline.
... View more
02-14-2020
03:23 AM
|
0
|
2
|
1685
|
POST
|
Currently I'm leveraging on AGSGeoViewTouchDelegate. Specifically on didTouchDownAtScreenPoint and other methods in order to manually draw geometry on the map. Since there are a lot of map points received by delegate method, they are normalised to rectangle instead of polygon. Also worse to mention, in order to draw the user's choice rectangle in real time, AGSGraphics object is repeatedly deleting and adding from AGSGraphicsOverlay object during the each didTouchDragToScreenPoint method call like so: graphicsOverlay.graphics.removeAllObjects()
graphicsOverlay.graphics.add(polygonGraphic) ...where polygonGraphic is normalised rectangle (4 AGSPoint objects) It works, but my concern is about CPU usage. During creating selection rectangle on the map, CPU usage can be up to 30% for my current iOS device. It's not that big in comparison if the user scales or moving area of the map that will use 80+% of CPU.
... View more
02-13-2020
08:59 AM
|
0
|
0
|
1685
|
POST
|
There is need to be able to draw a polygon/rectangle on the map in order to select intersecting features with that drawing. I can see from the Feature Layer Selection Runtime SDK for .NET example: The sample uses the MapView.RequestShapeAsync method to allow the user to draw a selection rectangle intersecting features that he would like to manage.Once the selection rectangle is returned, a SpatialQueryFilter is used to spatially select features in the feature layer using FeatureLayer. Specifically var rect = await MyMapView.Editor.RequestShapeAsync(DrawShape.Rectangle); I can't find any similar Editor of the MapView for the iOS version of the SDK. Feature Layer Selection Runtime SDK for iOS example only provides the solution how to select feature by tap point but not by drawing graphics area. I want to achieve basic functionality as this dashboard provides. User can select features not only by point but also by rectangle, lasso, circle and line. Is there any solution or starting point for this? example of selected features by rectangle selection
... View more
02-12-2020
11:56 PM
|
0
|
6
|
1851
|
POST
|
Sure, here is back trace for the thread where crash is happening: * thread #17, queue = 'com.esri.arcgis.requestOperation.data', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000102dfe08e ArcGIS`void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*) + 190
frame #1: 0x0000000103e5924d ArcGIS`Esri_runtimecore::Geo_model::ArcGIS_map_service_attribution_info::attribution_URL_for_service_URL(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 7949
frame #2: 0x000000010392bf7d ArcGIS`Esri_runtimecore::Geo_model::ArcGIS_tiled_source::set_URI(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 637
frame #3: 0x000000010392bc65 ArcGIS`Esri_runtimecore::Geo_model::ArcGIS_tiled_source::create_from_URI(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 85
frame #4: 0x0000000103cf3897 ArcGIS`Esri_runtimecore::Geo_model::create_raster_tiled_datasource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Esri_runtimecore::Geo_model::Deserialization_context&) + 327
frame #5: 0x0000000103cf8393 ArcGIS`Esri_runtimecore::Geo_model::deserialize(Esri_runtimecore::ArcGIS_rest::Basemap_layer const&, Esri_runtimecore::Geo_model::Deserialization_context&) + 3091
frame #6: 0x0000000103c4b772 ArcGIS`Esri_runtimecore::Geo_model::deserialize_basemap(Esri_runtimecore::Geo_model::Basemap&, Esri_runtimecore::ArcGIS_rest::Basemap&, Esri_runtimecore::Geo_model::Deserialization_context&) + 706
frame #7: 0x0000000103db2f80 ArcGIS`Esri_runtimecore::Geo_model::deserialize(Esri_runtimecore::Geo_model::Map&, Esri_runtimecore::ArcGIS_rest::Webmap const&, Esri_runtimecore::Geo_model::Deserialization_context&) + 960
frame #8: 0x00000001039caf88 ArcGIS`Esri_runtimecore::Geo_model::Map::load_from_data_(unsigned char const*, unsigned long, std::exception_ptr const&) + 808
frame #9: 0x00000001039d0776 ArcGIS`std::__1::__function::__func<Esri_runtimecore::Geo_model::Map::fetch_data_()::$_10, std::__1::allocator<Esri_runtimecore::Geo_model::Map::fetch_data_()::$_10>, void (std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::exception_ptr)>::operator()(std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >&&, std::exception_ptr&&) + 86
frame #10: 0x0000000103e0400d ArcGIS`Esri_runtimecore::Common::Slot<void (unsigned char const*, unsigned long, std::__1::shared_ptr<Esri_runtimecore::Common::Client_reference>)>::target_model<Esri_runtimecore::Geo_model::Portal_item::get_data_(std::__1::function<void (std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::exception_ptr)>, pplx::cancellation_token const&, bool)::$_6>::invoke(void const*, unsigned char const*, unsigned long, std::__1::reference_wrapper<std::__1::shared_ptr<Esri_runtimecore::Common::Client_reference> >) + 877
frame #11: 0x0000000105b9a4eb ArcGIS`Esri_runtimecore::Common::Signal_detail::Signal_base::notify_(Esri_runtimecore::Common::Function_ref<void (Esri_runtimecore::Common::Signal_detail::erased_target_base&)>) const + 603
frame #12: 0x0000000103df7239 ArcGIS`Esri_runtimecore::Geo_model::Portal_item::handle_response_(std::__1::shared_ptr<Esri_runtimecore::Common::Request> const&, unsigned char const*, unsigned long, std::__1::shared_ptr<Esri_runtimecore::Common::Client_reference> const&) + 1833
frame #13: 0x0000000105b90e92 ArcGIS`Esri_runtimecore::Common::Request_delegator::handle_response(unsigned long long, unsigned char const*, unsigned long, std::__1::shared_ptr<Esri_runtimecore::Common::Client_reference> const&) + 130
frame #14: 0x0000000105b8d4f0 ArcGIS`Esri_runtimecore::Common::Request::handle_response(unsigned char const*, unsigned long, std::__1::shared_ptr<Esri_runtimecore::Common::Client_reference> const&) + 112
frame #15: 0x0000000103151f68 ArcGIS`RT_Request_handleResponse + 168
frame #16: 0x0000000102b48479 ArcGIS`-[RTCRequest handleResponse:userDefinedError:error:] + 231
frame #17: 0x0000000102d1bac2 ArcGIS`__71+[AGSRTCRequestDispatcher ags_kickOffCoreRequest:forRequestDispatcher:]_block_invoke.202 + 1420
frame #18: 0x0000000102d45bae ArcGIS`__38-[AGSObservableOperation didComplete:]_block_invoke + 325
frame #19: 0x0000000102b9f02e ArcGIS`ags_runWithMainThread + 66
frame #20: 0x0000000102d45a47 ArcGIS`-[AGSObservableOperation didComplete:] + 264
frame #21: 0x0000000102c65918 ArcGIS`-[AGSRequestOperation didComplete:] + 370
frame #22: 0x0000000102d45896 ArcGIS`-[AGSObservableOperation finishWithResult:error:] + 132
frame #23: 0x0000000102c6a367 ArcGIS`-[AGSRequestOperation finishWithResult:error:] + 773
frame #24: 0x0000000102c67f2e ArcGIS`-[AGSRequestOperation requestOperationDidFinishLoading] + 595
frame #25: 0x0000000102c67677 ArcGIS`-[AGSRequestOperation handleRequestCompletionWithError:] + 315
frame #26: 0x000000010a5bfdd4 libdispatch.dylib`_dispatch_call_block_and_release + 12
frame #27: 0x000000010a5c0d48 libdispatch.dylib`_dispatch_client_callout + 8
frame #28: 0x000000010a5c75ef libdispatch.dylib`_dispatch_lane_serial_drain + 788
frame #29: 0x000000010a5c817f libdispatch.dylib`_dispatch_lane_invoke + 422
frame #30: 0x000000010a5d3a4e libdispatch.dylib`_dispatch_workloop_worker_thread + 719
frame #31: 0x00007fff51c0171b libsystem_pthread.dylib`_pthread_wqthread + 290
frame #32: 0x00007fff51c0157b libsystem_pthread.dylib`start_wqthread + 15 My guesses: may be it's because of creating two or more map objects... previously I've encountered 100% crash while trying to display two map views on the same screen. Current application displays only one map view, but creates and loads few map objects. Isn't that an anti-pattern for the Runtime SDK and AGSMap instance should be globally visible singleton object instead? P.S. Following my guess. Looks like trick with the singleton map object did the job for me. Crash is absent so far.
... View more
11-28-2019
08:44 AM
|
0
|
0
|
412
|
POST
|
From time to time I'm encountering crash during launching the application. Runtime SDK version 100.6 Thread 8: EXC_BAD_ACCESS (code=1, address=0x0) Thread 8 Queue : com.esri.arcgis.requestOperation.data (serial) #0 0x000000010a72e08e in void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*) () I've tried to execute po (SEL)$arg2 but the result is <no value available> (SEL)$arg3 -> " \xffffffd2\xffffff91" (SEL)$arg5 -> "\x01/attriba" Can someone take a look for the Runtime SDK source code in order to examine which methods are using the "com.esri.arcgis.requestOperation.data" serial queue? It might help to understand where the problem is.
... View more
11-27-2019
06:10 AM
|
0
|
2
|
603
|
POST
|
Thanks, Nicholas, with your guidance I’m happy to know I was looking into correct direction for solution and feel full confidence now. Once I’ll get full info regarding exact features which are intended to use with App Login within App, possibly I’ll contact directly to discuss if need. In addition, while playing with all this auth functionality discussed on Github, I’ve faced with strange behavior of not getting any callback for Portal load method under specific circumstances. Once everything is double checked I’ll provide description of this possible issue. Thanks for help and detailed explanations!
... View more
11-14-2019
01:55 PM
|
1
|
0
|
683
|
POST
|
There is a way to authenticate on behalf of User using App Login Rest API Implementing App Login | ArcGIS for Developers but is it available for using with Runtime SDK? Documentation suggest to use AGSAuthenticationManager class for that: “ Client credentials: registration requires a client ID, client secret, and a redirect URL. The user does not need to enter a login, but rather is granted access on behalf of the app.” ... but there is no any way to provide client secret for the AGSAuthentication manager class methods either in Documentation or header files of ObjC library. So the question is how to implement App Login using native iOS SDK instead of using Rest API?
... View more
11-06-2019
06:02 AM
|
0
|
2
|
756
|
POST
|
All the properties of AGSPortalUser are nullable. The question: is it even possible in practice to have AGSPortalUser instance with username to be null? I'm trying to relay on this property as a unique identifier of the user and want to be sure if I can force unwrap it with Swift safely.
... View more
10-04-2019
05:53 AM
|
0
|
2
|
520
|
POST
|
I'm wondering if it's possible to achieve App Login using latest at the moment ArcGIS Runtime SDK for iOS v.100.6 after 5 years the initial question raises.
... View more
09-24-2019
04:12 AM
|
1
|
0
|
374
|
Title | Kudos | Posted |
---|---|---|
1 | 11-14-2019 01:55 PM | |
1 | 05-18-2020 08:04 AM | |
1 | 09-24-2019 04:12 AM | |
1 | 02-14-2020 09:38 AM |
Online Status |
Offline
|
Date Last Visited |
06-04-2021
05:26 PM
|