Skip to content

Commit

Permalink
Updates for U10 (#111)
Browse files Browse the repository at this point in the history
* Updates for U10

* Update for deprecation

* Link changes for U10

* Update RELEASE.md

Co-authored-by: Eli Gregory <[email protected]>

Co-authored-by: Eli Gregory <[email protected]>
  • Loading branch information
nCastle1 and esreli authored Feb 23, 2021
1 parent 39d3261 commit cdaa6b5
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 33 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ The app can be run as-is, but it's recommended you do some configuration to set
For OAuth configuration, create a new Application in your ArcGIS Portal to obtain a `Client ID` and configure a `Redirect URL`. The **Client ID** configures the ArcGIS Runtime to show your users, during the login process, that the application was built by you and can be trusted. The **Redirect URL** configures the OAuth process to then return to your app once authentication is complete.

1. Log in to [https://developers.arcgis.com](https://developers.arcgis.com) with either your ArcGIS Organizational Account or an ArcGIS Developer Account.
2. Register a new Application. ![Register ArcGIS Application](https://user-images.githubusercontent.com/20545379/48228207-6885e500-e359-11e8-99dd-fe528dc50875.png)
3. In the Authentication tab, note the **Client ID** and add a **Redirect URL**, e.g. `data-collection://auth`. We will use this URL in the **Configuring the project** section below. ![Configure ArcGIS Application](https://user-images.githubusercontent.com/20545379/48228212-6de32f80-e359-11e8-9404-aa50858f7cb3.png)
2. Register a new Application, following the instructions in [Register your applications](https://developers.arcgis.com/documentation/security-and-authentication/oauth-2.0/register-your-application/).
3. Note the **Client ID** and add a **Redirect URL**, e.g. `data-collection://auth`. You will use these values in the **Configuring the project** section below.

#### 2. Configure the project

Expand All @@ -116,13 +116,13 @@ For OAuth configuration, create a new Application in your ArcGIS Portal to obtai

## Learn more

Learn more about Esri Open Source Apps [here](https://developers.arcgis.com/example-apps).
Learn more about Esri Open Source Apps [here](https://developers.arcgis.com/documentation/app-templates-and-builders/open-source-apps/).

## Requirements

* [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/) or later
* Visual Studio 2019 is required if you want to use the .NET Core version of the WPF app.
* [ArcGIS Runtime SDK for .NET](https://developers.arcgis.com/downloads/apis-and-sdks?product=net)
* [ArcGIS Runtime SDK for .NET](https://developers.arcgis.com/downloads/)
* To edit records or take a web map offline you will need an ArcGIS Online Organizational account, an ArcGIS Online Developer account, or an ArcGIS Online account authenticated using a social login.
* To consume your own web map you will need an ArcGIS Online Organizational account.

Expand Down Expand Up @@ -151,7 +151,7 @@ Unless required by applicable law or agreed to in writing, software distributed

A copy of the license is available in the repository's [LICENSE](LICENSE) file.

For information about licensing your deployed app, see [License your app](https://developers.arcgis.com/net/latest/wpf/guide/license-your-app.htm).
For information about licensing your deployed app, see [License your app](https://developers.arcgis.com/net/license-and-deployment/license/).

### 3rd-party component licensing

Expand Down
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release notes

## 1.2.4

* Updates all versions of the app to use the latest 100.10 release of ArcGIS Runtime.
* Updates the documentation and README to account for the new ArcGIS for Developers website.

## 1.2.3

* Updates all versions of the app to use the latest 100.9 release of ArcGIS Runtime.
Expand Down
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ A user may need to collect data in a location where they are disconnected from t
|-----|-----|
| ![Download Map Offline Extent](/docs/images/anatomy-offline-extent-uwp.png) | ![Download Map Offline Extent](/docs/images/anatomy-offline-extent.png) |

When taking the web map offline, the app asks the user to specify the area of the web map they want to take offline. The app makes use of the offline map creation [on-demand workflow](https://developers.arcgis.com/net/latest/wpf/guide/offline.htm#ESRI_SECTION1_AAADEDF10BF24FDF88DBF6EF04DF8579). After the generate offline map job finishes, the app enters offline work mode and loads the offline mobile map package.
When taking the web map offline, the app asks the user to specify the area of the web map they want to take offline. The app makes use of the [offline map](https://developers.arcgis.com/net/offline-maps-scenes-and-data/) creation on-demand workflow. After the generate offline map job finishes, the app enters offline work mode and loads the offline mobile map package.

> If you perform this behavior using *Trees of Portland* you should expect the download job to take 10 minutes or so to complete.
Expand Down Expand Up @@ -305,7 +305,7 @@ These attributes' values are accompanied by a title label, which is configured b

## Identity model

The app leverages the ArcGIS [identity](https://developers.arcgis.com/authentication/) model to provide access to resources via the [named user](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/#named-user-login) login pattern. When attempting to access secured resources such as secured web maps, layers, or premium content, the app prompts you for your organization’s portal credentials used to obtain a token. The ArcGIS Runtime SDKs provide a simple-to-use API for dealing with ArcGIS logins.
The app leverages the ArcGIS [identity](https://developers.arcgis.com/documentation/security-and-authentication/) model to provide access to resources via the named user login pattern. When attempting to access secured resources such as secured web maps, layers, or premium content, the app prompts you for your organization’s portal credentials used to obtain a token. The ArcGIS Runtime SDKs provide a simple-to-use API for dealing with ArcGIS logins.

The process of accessing token secured services with a challenge handler is illustrated in the following diagram.

Expand All @@ -318,7 +318,7 @@ The process of accessing token secured services with a challenge handler is illu
5. If the user is successfully authenticated, a credential (token) is included in requests to the secured service.
6. The identity manager stores the credential for this portal and all requests for secured content includes the token in the request.

For an application to use this pattern, follow these [guides](https://developers.arcgis.com/authentication/signing-in-arcgis-online-users/) to register your app.
For an application to use this pattern, follow these [guides](https://developers.arcgis.com/documentation/security-and-authentication/arcgis-identity/) to register your app.

The `AuthenticationManager` is set up when the app starts and a challenge handler is configured. A challenge by the authentication manager occurs when a request is made to access a secured resource for which the authentication manager has no credential.

Expand Down Expand Up @@ -363,7 +363,7 @@ public Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri auth

When the user successfully authenticates, a URI is passed from the web browser control. The URI is decoded and passed back to the `AuthenticationManager` to retrieve the token. The .NET app retrieves all the necessary information (`AppClientID` and `RedirectURL`) to set up the `AuthenticationManager` from the [Configuration](#configuration-and-customization) file.

Note the value for `RedirectURL`. Combined with the text `auth` to make `data-collection://auth`, this is the [redirect URI](https://developers.arcgis.com/authentication/browser-based-user-logins/#configuring-a-redirect-uri) that you configured when you registered your app on your [developer dashboard](https://developers.arcgis.com/applications). For more details on the user authorization flow, see the [Authorize REST API](https://developers.arcgis.com/rest/users-groups-and-items/authorize.htm).
Note the value for `RedirectURL`. Combined with the text `auth` to make `data-collection://auth`, this is the [redirect URI](https://developers.arcgis.com/documentation/security-and-authentication/oauth-2.0/serverless-native-apps/) that you configured when you registered your app on your [developer dashboard](https://developers.arcgis.com/applications/). For more details on the user authorization flow, see the [Authorize REST API](https://developers.arcgis.com/rest/users-groups-and-items/authorize.htm).

For more details on configuring the app for OAuth, see [the main README.md](https://github.com/esri/data-collection-dotnet).

Expand Down
11 changes: 3 additions & 8 deletions src/DataCollection.Shared/ViewModels/AuthViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private async Task<Credential> CreateCredentialAsync(CredentialRequestInfo info)
// Create generate token options if necessary
if (info.GenerateTokenOptions == null)
{
info.GenerateTokenOptions = new GenerateTokenOptions { TokenValidity = -1 };
info.GenerateTokenOptions = new GenerateTokenOptions { };
}

// if no refresh token, call to generate credentials
Expand Down Expand Up @@ -322,15 +322,10 @@ private async Task<OAuthTokenCredential> CreateNewCredential(CredentialRequestIn
private void UpdateAuthenticationManager()
{
// Define the server information for ArcGIS Online
var portalServerInfo = new ServerInfo
var portalServerInfo = new ServerInfo(new Uri(_arcGISOnlineURL))
{
ServerUri = new Uri(_arcGISOnlineURL),
TokenAuthenticationType = TokenAuthenticationType.OAuthAuthorizationCode,
OAuthClientInfo = new OAuthClientInfo
{
ClientId = _appClientID,
RedirectUri = new Uri(_redirectURL)
},
OAuthClientInfo = new OAuthClientInfo(_appClientID, new Uri(_redirectURL))
};

try
Expand Down
2 changes: 1 addition & 1 deletion src/DataCollection.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sealed partial class App : Application
public App()
{
// Deployed applications must be licensed at the Lite level or greater.
// See https://developers.arcgis.com/licensing for further details.
// See https://developers.arcgis.com/net/license-and-deployment/license/ for further details.

// Initialize the ArcGIS Runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize();
Expand Down
4 changes: 2 additions & 2 deletions src/DataCollection.UWP/DataCollection.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Esri.ArcGISRuntime.Toolkit">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Esri.ArcGISRuntime.UWP">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Humanizer.Core">
<Version>2.7.9</Version>
Expand Down
2 changes: 1 addition & 1 deletion src/DataCollection.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="a5fe2542-a748-4b21-8484-d65c71379b3e" Publisher="CN=esri" Version="1.2.3.0" />
<Identity Name="a5fe2542-a748-4b21-8484-d65c71379b3e" Publisher="CN=esri" Version="1.2.4.0" />
<mp:PhoneIdentity PhoneProductId="a5fe2542-a748-4b21-8484-d65c71379b3e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>DataCollection.UWP</DisplayName>
Expand Down
4 changes: 2 additions & 2 deletions src/DataCollection.UWP/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: AssemblyVersion("1.2.4.0")]
[assembly: AssemblyFileVersion("1.2.4.0")]
[assembly: ComVisible(false)]
2 changes: 1 addition & 1 deletion src/DataCollection.WPF/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private void Application_Startup(object sender, StartupEventArgs e)
try
{
// Deployed applications must be licensed at the Lite level or greater.
// See https://developers.arcgis.com/licensing for further details.
// See https://developers.arcgis.com/net/license-and-deployment/license/ for further details.

// Initialize the ArcGIS Runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize();
Expand Down
10 changes: 5 additions & 5 deletions src/DataCollection.WPF/DataCollection.WPF (.NET Core).csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<DefaultItemExcludes>$(DefaultItemExcludes);netframework\**;obj\**;netcore\**;out\**</DefaultItemExcludes>
<ApplicationIcon>Images/ArcGIS_Open_Source_apps.ico</ApplicationIcon>
<AssemblyName>DataCollection.WPF</AssemblyName>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
<Version>1.2.3</Version>
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<FileVersion>1.2.4.0</FileVersion>
<Version>1.2.4</Version>
<Authors />
<Company>Esri</Company>
<Product>Data Collection for .NET</Product>
Expand Down Expand Up @@ -54,10 +54,10 @@

<ItemGroup>
<PackageReference Include="Esri.ArcGISRuntime.Toolkit">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Esri.ArcGISRuntime.WPF">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Humanizer.Core">
<Version>2.7.9</Version>
Expand Down
4 changes: 2 additions & 2 deletions src/DataCollection.WPF/DataCollection.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Esri.ArcGISRuntime.Toolkit">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Esri.ArcGISRuntime.WPF">
<Version>100.9.0</Version>
<Version>100.10.0</Version>
</PackageReference>
<PackageReference Include="Humanizer.Core">
<Version>2.7.9</Version>
Expand Down
4 changes: 2 additions & 2 deletions src/DataCollection.WPF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: AssemblyVersion("1.2.4.0")]
[assembly: AssemblyFileVersion("1.2.4.0")]

0 comments on commit cdaa6b5

Please sign in to comment.