services | platforms | author |
---|---|---|
app-service\mobile, app-service\web, app-service |
dotnet, xamarin |
lindydonna, syntaxc4 |
Contoso Moments is a photo sharing application that demonstrates the following features of Azure App Service:
- App Service authentication/authorization
- Continuous Integration and deployment
- Mobile app server SDK
- Mobile offline sync client SDK
- Mobile file sync SDK
- Mobile push notifications
Download and install the following tools to build and/or develop this application locally.
-
Fork this repository to your GitHub account
-
Click on the Deploy to Azure Button
-
Fill out the values in the Deployment page
-
If deploying from the main repo, use
true
for ManualIntegration, otherwise usefalse
. This parameter controls whether or not a webhook is created when you deploy. If you don't have permissions to the repo and it tries to create a webhook (i.e.,ManualIntegration
isfalse
, then deployment will fail). -
When the deployment steps complete, it will provide a link to the Web App
The iOS client app is available on the Apple App Store. You can have it connect to your own service by setting the URL in the app's settings page.
The web and mobile client support Facebook and Azure Active Directory Authentication. Follow these tutorials:
- How to configure your App Service application to use Facebook login
- How to configure your App Service application to use Azure Active Directory login
Note: Ensure that the Action to take when request is not authenticated is set to Allow request (no action)
The mobile app uses client-directed login for Facebook, which provides a better user experience on a mobile device. This requires that you set your Facebook App ID in the following locations:
- (iOS) The FacebookAppID key in Info.plist.
- (iOS) The value for CFBundleURLSchemes in Info.plist. This string should have "fb" followed by your app ID.
- (Android) The value for facebook_app_id in strings.xml.
- (Android) The value for fb_login_protocol_scheme in strings.xml. This string should have "fb" followed by your app ID.
To learn more, see:
Our hosted version of the service restricts uploads to the public album to users who are logged in with Azure Active Directory, by setting Image.IsVisible = false
for other users. On the web client, anyone can upload images to the public album, but the image will be marked as not visible and cannot be viewed unless it is changed in the database. On the mobile client, if you're using the default service url (https://contosomoments.azurewebsites.net), the image upload icon is hidden for the public album unless you're logged in with AAD.
The provided ARM template opts out of this behavior by using false
for the app setting PublicAlbumRequiresAuth
.
In Visual Studio or Xamarin Studio, open the project src/ContosoMoments-Mobile.sln.
Platform | Build Status |
---|---|
Android | |
iOS |