Skip to content

Commit 8b2989d

Browse files
Create sample app
1 parent b1dd617 commit 8b2989d

File tree

78 files changed

+20831
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+20831
-58
lines changed

.babelrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["react-native"],
3+
"sourceMaps": "inline"
4+
}

.gitignore

+54-58
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,55 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
33+
# node.js
34+
#
3635
node_modules/
37-
jspm_packages/
38-
39-
# Typescript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
36+
npm-debug.log
37+
yarn-error.log
38+
39+
# BUCK
40+
buck-out/
41+
\.buckd/
42+
*.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
ios/Pods/

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug Android",
9+
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
10+
"type": "reactnative",
11+
"request": "launch",
12+
"platform": "android",
13+
"sourceMaps": true,
14+
"outDir": "${workspaceRoot}/.vscode/.react"
15+
}
16+
]
17+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Visual Studio App Center Sample App for React Native
2+
The React Native application in this repository and its corresponding tutorials will help you quickly and easily onboard to Visual Studio App Center.
3+
4+
## About this repository
5+
The App Center SDK modules and React Native Code Push are already integrated within the application. Simply follow the tutorials to learn how to use each service.
6+
7+
## Tutorials
8+
First navigate to the **Getting Started** tutorial linked below. After following that tutorial, you can choose which App Center service to explore.
9+
10+
## Contents
11+
| Tutorial | Description | Screenshot
12+
|:-|:-|-|
13+
| [Getting Started](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/getting-started) | Set up the app |
14+
| [Build](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/build) | Build the app | ![image](https://user-images.githubusercontent.com/30265843/38382707-5428679a-3913-11e8-93a9-29b47700ee1c.png) |
15+
| [Test](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/test) | Run automated UI tests on real devices | ![image](https://user-images.githubusercontent.com/30265843/38382756-72711986-3913-11e8-92fe-e4c3b643c3f4.png) |
16+
| [Distribute](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/distribute)| Distribute application to a group of users | ![image](https://user-images.githubusercontent.com/30265843/38382777-81af96e8-3913-11e8-8c13-b191921e28ea.png) |
17+
| [Crashes](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/crashes) | Monitor application crashes | ![image](https://user-images.githubusercontent.com/30265843/38382795-8d46268e-3913-11e8-8363-da1f9b621cfa.png) |
18+
| [Analytics](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/analytics) | View user analytics | ![image](https://user-images.githubusercontent.com/30265843/38382813-953b1b56-3913-11e8-9e47-0f12c3f52149.png) |
19+
| [Push](https://docs.microsoft.com/en-us/appcenter/quickstarts/android/push) | Send push notifications to your app users | ![image](https://user-images.githubusercontent.com/30265843/38382824-9d21b942-3913-11e8-99c9-d600a825293f.png) |
20+
| [CodePush](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/) | Deploy mobile app updates directly to their users’ devices | ![image](https://user-images.githubusercontent.com/30265843/38382840-a801ed64-3913-11e8-9e0d-36a5b7092a98.png) |
21+
22+
23+
24+
25+
26+
27+

__tests__/App.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from 'react';
2+
import App from '../src/App';
3+
import * as renderer from 'react-test-renderer';
4+
jest.mock('react-native-code-push', () => 'CodePush');
5+
jest.mock('appcenter-crashes', () => 'AppCenterCrashes');
6+
7+
it('renders correctly', () => {
8+
const tree = renderer.create(<App />);
9+
});

android/app/BUCK

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
lib_deps = []
12+
13+
for jarfile in glob(['libs/*.jar']):
14+
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15+
lib_deps.append(':' + name)
16+
prebuilt_jar(
17+
name = name,
18+
binary_jar = jarfile,
19+
)
20+
21+
for aarfile in glob(['libs/*.aar']):
22+
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23+
lib_deps.append(':' + name)
24+
android_prebuilt_aar(
25+
name = name,
26+
aar = aarfile,
27+
)
28+
29+
android_library(
30+
name = "all-libs",
31+
exported_deps = lib_deps,
32+
)
33+
34+
android_library(
35+
name = "app-code",
36+
srcs = glob([
37+
"src/main/java/**/*.java",
38+
]),
39+
deps = [
40+
":all-libs",
41+
":build_config",
42+
":res",
43+
],
44+
)
45+
46+
android_build_config(
47+
name = "build_config",
48+
package = "com.appcentersample",
49+
)
50+
51+
android_resource(
52+
name = "res",
53+
package = "com.appcentersample",
54+
res = "src/main/res",
55+
)
56+
57+
android_binary(
58+
name = "app",
59+
keystore = "//android/keystores:debug",
60+
manifest = "src/main/AndroidManifest.xml",
61+
package_type = "debug",
62+
deps = [
63+
":app-code",
64+
],
65+
)

0 commit comments

Comments
 (0)