Parcourir la source

Rewrite new example app with RN 0.60

Gaëtan Renaudeau il y a 5 ans
Parent
révision
db04b318f3
No account linked to committer's email address
99 fichiers modifiés avec 7304 ajouts et 7091 suppressions
  1. 0
    3
      example/.babelrc
  2. 4
    0
      example/.eslintrc.js
  3. 67
    12
      example/.flowconfig
  4. 11
    5
      example/.gitignore
  5. 5
    0
      example/.prettierrc
  6. 0
    454
      example/App.js
  7. 0
    355
      example/App.windows.js
  8. 0
    31
      example/Btn.js
  9. 0
    12
      example/README.md
  10. 0
    112
      example/Viewshoot.js
  11. 28
    39
      example/android/app/BUCK
  12. 79
    31
      example/android/app/build.gradle
  13. 19
    0
      example/android/app/build_defs.bzl
  14. 0
    56
      example/android/app/proguard-rules.pro
  15. 8
    0
      example/android/app/src/debug/AndroidManifest.xml
  16. 5
    14
      example/android/app/src/main/AndroidManifest.xml
  17. 13
    0
      example/android/app/src/main/java/com/viewshotexample/MainActivity.java
  18. 13
    17
      example/android/app/src/main/java/com/viewshotexample/MainApplication.java
  19. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  20. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  21. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  22. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  23. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  24. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  25. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  26. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  27. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  28. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  29. 1
    0
      example/android/app/src/main/res/values/styles.xml
  30. 16
    31
      example/android/build.gradle
  31. 2
    1
      example/android/gradle.properties
  32. BIN
      example/android/gradle/wrapper/gradle-wrapper.jar
  33. 1
    2
      example/android/gradle/wrapper/gradle-wrapper.properties
  34. 17
    1
      example/android/gradlew
  35. 17
    1
      example/android/gradlew.bat
  36. 0
    8
      example/android/keystores/BUCK
  37. 0
    4
      example/android/keystores/debug.keystore.properties
  38. 1
    15
      example/android/settings.gradle
  39. 4
    0
      example/app.json
  40. 3
    0
      example/babel.config.js
  41. BIN
      example/docs/android.png
  42. BIN
      example/docs/ios.png
  43. BIN
      example/docs/recursive.gif
  44. 0
    4
      example/index.android.js
  45. 0
    4
      example/index.ios.js
  46. 9
    0
      example/index.js
  47. 0
    4
      example/index.windows.js
  48. 47
    0
      example/ios/Podfile
  49. 251
    0
      example/ios/Podfile.lock
  50. 53
    0
      example/ios/ViewShotExample-tvOS/Info.plist
  51. 24
    0
      example/ios/ViewShotExample-tvOSTests/Info.plist
  52. 584
    802
      example/ios/ViewShotExample.xcodeproj/project.pbxproj
  53. 129
    0
      example/ios/ViewShotExample.xcodeproj/xcshareddata/xcschemes/ViewShotExample-tvOS.xcscheme
  54. 25
    1
      example/ios/ViewShotExample.xcodeproj/xcshareddata/xcschemes/ViewShotExample.xcscheme
  55. 10
    0
      example/ios/ViewShotExample.xcworkspace/contents.xcworkspacedata
  56. 5
    6
      example/ios/ViewShotExample/AppDelegate.h
  57. 17
    14
      example/ios/ViewShotExample/AppDelegate.m
  58. 6
    0
      example/ios/ViewShotExample/Images.xcassets/Contents.json
  59. 18
    15
      example/ios/ViewShotExample/Info.plist
  60. 3
    5
      example/ios/ViewShotExample/main.m
  61. 1
    1
      example/ios/ViewShotExampleTests/Info.plist
  62. 4
    6
      example/ios/ViewShotExampleTests/ViewShotExampleTests.m
  63. 17
    0
      example/metro.config.js
  64. 24
    16
      example/package.json
  65. 58
    0
      example/src/App.js
  66. 29
    0
      example/src/Btn.js
  67. 446
    0
      example/src/Full.js
  68. 130
    0
      example/src/Viewshoot.js
  69. 0
    0
      example/src/broadchurch.mp4
  70. 0
    0
      example/src/homer-simpson.svg
  71. 0
    89
      example/windows/.gitignore
  72. 0
    6
      example/windows/ViewShotExample.Net46/App.config
  73. 0
    8
      example/windows/ViewShotExample.Net46/App.xaml
  74. 0
    101
      example/windows/ViewShotExample.Net46/App.xaml.cs
  75. 0
    32
      example/windows/ViewShotExample.Net46/AppReactPage.cs
  76. 0
    55
      example/windows/ViewShotExample.Net46/Properties/AssemblyInfo.cs
  77. 0
    71
      example/windows/ViewShotExample.Net46/Properties/Resources.Designer.cs
  78. 0
    117
      example/windows/ViewShotExample.Net46/Properties/Resources.resx
  79. 0
    30
      example/windows/ViewShotExample.Net46/Properties/Settings.Designer.cs
  80. 0
    7
      example/windows/ViewShotExample.Net46/Properties/Settings.settings
  81. 0
    130
      example/windows/ViewShotExample.Net46/ViewShotExample.Net46.csproj
  82. 0
    209
      example/windows/ViewShotExample.sln
  83. 0
    8
      example/windows/ViewShotExample/App.xaml
  84. 0
    147
      example/windows/ViewShotExample/App.xaml.cs
  85. BIN
      example/windows/ViewShotExample/Assets/LockScreenLogo.scale-200.png
  86. BIN
      example/windows/ViewShotExample/Assets/SplashScreen.scale-200.png
  87. BIN
      example/windows/ViewShotExample/Assets/Square150x150Logo.scale-200.png
  88. BIN
      example/windows/ViewShotExample/Assets/Square44x44Logo.scale-200.png
  89. BIN
      example/windows/ViewShotExample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
  90. BIN
      example/windows/ViewShotExample/Assets/StoreLogo.png
  91. BIN
      example/windows/ViewShotExample/Assets/Wide310x150Logo.scale-200.png
  92. 0
    56
      example/windows/ViewShotExample/MainPage.cs
  93. 0
    49
      example/windows/ViewShotExample/Package.appxmanifest
  94. 0
    29
      example/windows/ViewShotExample/Properties/AssemblyInfo.cs
  95. 0
    31
      example/windows/ViewShotExample/Properties/Default.rd.xml
  96. 0
    234
      example/windows/ViewShotExample/ViewShotExample.csproj
  97. BIN
      example/windows/ViewShotExample/ViewShotExample_TemporaryKey.pfx
  98. 0
    17
      example/windows/ViewShotExample/project.json
  99. 5100
    3583
      example/yarn.lock

+ 0
- 3
example/.babelrc Voir le fichier

@@ -1,3 +0,0 @@
1
-{
2
-"presets": ["react-native"]
3
-}

+ 4
- 0
example/.eslintrc.js Voir le fichier

@@ -0,0 +1,4 @@
1
+module.exports = {
2
+  root: true,
3
+  extends: '@react-native-community',
4
+};

+ 67
- 12
example/.flowconfig Voir le fichier

@@ -11,20 +11,54 @@
11 11
 ; Ignore duplicate module providers
12 12
 ; For RN Apps installed via npm, "Libraries" folder is inside
13 13
 ; "node_modules/react-native" but in the source repo it is in the root
14
-.*/Libraries/react-native/React.js
15
-.*/Libraries/react-native/ReactNative.js
14
+node_modules/react-native/Libraries/react-native/React.js
15
+
16
+; Ignore polyfills
17
+node_modules/react-native/Libraries/polyfills/.*
18
+
19
+; These should not be required directly
20
+; require from fbjs/lib instead: require('fbjs/lib/warning')
21
+node_modules/warning/.*
22
+
23
+; Flow doesn't support platforms
24
+.*/Libraries/Utilities/HMRLoadingView.js
25
+
26
+[untyped]
27
+.*/node_modules/@react-native-community/cli/.*/.*
16 28
 
17 29
 [include]
18 30
 
19 31
 [libs]
20 32
 node_modules/react-native/Libraries/react-native/react-native-interface.js
21
-node_modules/react-native/flow
22
-flow/
33
+node_modules/react-native/flow/
23 34
 
24 35
 [options]
25
-module.system=haste
36
+emoji=true
26 37
 
27
-experimental.strict_type_args=true
38
+esproposal.optional_chaining=enable
39
+esproposal.nullish_coalescing=enable
40
+
41
+module.file_ext=.js
42
+module.file_ext=.json
43
+module.file_ext=.ios.js
44
+
45
+module.system=haste
46
+module.system.haste.use_name_reducers=true
47
+# get basename
48
+module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
49
+# strip .js or .js.flow suffix
50
+module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
51
+# strip .ios suffix
52
+module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
53
+module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
54
+module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
55
+module.system.haste.paths.blacklist=.*/__tests__/.*
56
+module.system.haste.paths.blacklist=.*/__mocks__/.*
57
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
28 62
 
29 63
 munge_underscores=true
30 64
 
@@ -32,13 +66,34 @@ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|we
32 66
 
33 67
 suppress_type=$FlowIssue
34 68
 suppress_type=$FlowFixMe
35
-suppress_type=$FixMe
69
+suppress_type=$FlowFixMeProps
70
+suppress_type=$FlowFixMeState
71
+
72
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
74
+suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
36 75
 
37
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
76
+[lints]
77
+sketchy-null-number=warn
78
+sketchy-null-mixed=warn
79
+sketchy-number=warn
80
+untyped-type-import=warn
81
+nonstrict-import=warn
82
+deprecated-type=warn
83
+unsafe-getters-setters=warn
84
+inexact-spread=warn
85
+unnecessary-invariant=warn
86
+signature-verification-failure=warn
87
+deprecated-utility=error
40 88
 
41
-unsafe.enable_getters_and_setters=true
89
+[strict]
90
+deprecated-type
91
+nonstrict-import
92
+sketchy-null
93
+unclear-type
94
+unsafe-getters-setters
95
+untyped-import
96
+untyped-type-import
42 97
 
43 98
 [version]
44
-^0.36.0
99
+^0.98.0

+ 11
- 5
example/.gitignore Voir le fichier

@@ -34,11 +34,11 @@ local.properties
34 34
 #
35 35
 node_modules/
36 36
 npm-debug.log
37
+yarn-error.log
37 38
 
38 39
 # BUCK
39 40
 buck-out/
40 41
 \.buckd/
41
-android/app/libs
42 42
 *.keystore
43 43
 
44 44
 # fastlane
@@ -46,8 +46,14 @@ android/app/libs
46 46
 # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 47
 # screenshots whenever they are needed.
48 48
 # For more information about the recommended setup visit:
49
-# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
49
+# https://docs.fastlane.tools/best-practices/source-control/
50 50
 
51
-fastlane/report.xml
52
-fastlane/Preview.html
53
-fastlane/screenshots
51
+*/fastlane/report.xml
52
+*/fastlane/Preview.html
53
+*/fastlane/screenshots
54
+
55
+# Bundle artifact
56
+*.jsbundle
57
+
58
+# CocoaPods
59
+/ios/Pods/

+ 5
- 0
example/.prettierrc Voir le fichier

@@ -0,0 +1,5 @@
1
+{
2
+  "singleQuote": true,
3
+  "trailingComma": "all",
4
+  "printWidth": 100
5
+}

+ 0
- 454
example/App.js Voir le fichier

@@ -1,454 +0,0 @@
1
-import React, { Component } from "react";
2
-import {
3
-  StyleSheet,
4
-  Text,
5
-  View,
6
-  ScrollView,
7
-  Image,
8
-  Switch,
9
-  TextInput,
10
-  Picker,
11
-  Slider,
12
-  WebView,
13
-  ART
14
-} from "react-native";
15
-import SvgUri from "react-native-svg-uri";
16
-import omit from "lodash/omit";
17
-import { captureRef, captureScreen } from "react-native-view-shot";
18
-import { Surface } from "gl-react-native";
19
-import GL from "gl-react";
20
-import MapView from "react-native-maps";
21
-import Video from "react-native-video";
22
-import Btn from "./Btn";
23
-
24
-const catsSource = {
25
-  uri: "https://i.imgur.com/5EOyTDQ.jpg"
26
-};
27
-
28
-const shaders = GL.Shaders.create({
29
-  helloGL: {
30
-    frag: `
31
-precision highp float;
32
-varying vec2 uv;
33
-uniform float blue;
34
-void main () {
35
-  gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
36
-}`
37
-  }
38
-});
39
-
40
-const HelloGL = GL.createComponent(
41
-  ({ blue }) => <GL.Node shader={shaders.helloGL} uniforms={{ blue }} />,
42
-  { displayName: "HelloGL" }
43
-);
44
-
45
-export default class App extends Component {
46
-  state = {
47
-    previewSource: catsSource,
48
-    error: null,
49
-    res: null,
50
-    value: {
51
-      format: "png",
52
-      quality: 0.9,
53
-      result: "tmpfile",
54
-      snapshotContentContainer: false
55
-    }
56
-  };
57
-
58
-  snapshot = refname => () =>
59
-    (refname
60
-      ? captureRef(this.refs[refname], this.state.value)
61
-      : captureScreen(this.state.value)
62
-    )
63
-      .then(
64
-        res =>
65
-          this.state.value.result !== "tmpfile"
66
-            ? res
67
-            : new Promise((success, failure) =>
68
-                // just a test to ensure res can be used in Image.getSize
69
-                Image.getSize(
70
-                  res,
71
-                  (width, height) => (
72
-                    console.log(res, width, height), success(res)
73
-                  ),
74
-                  failure
75
-                )
76
-              )
77
-      )
78
-      .then(res =>
79
-        this.setState({
80
-          error: null,
81
-          res,
82
-          previewSource: {
83
-            uri:
84
-              this.state.value.result === "base64"
85
-                ? "data:image/" + this.state.value.format + ";base64," + res
86
-                : res
87
-          }
88
-        })
89
-      )
90
-      .catch(
91
-        error => (
92
-          console.warn(error),
93
-          this.setState({ error, res: null, previewSource: null })
94
-        )
95
-      );
96
-
97
-  render() {
98
-    const { value, previewSource, error, res } = this.state;
99
-    const {
100
-      format,
101
-      quality,
102
-      width,
103
-      height,
104
-      result,
105
-      snapshotContentContainer
106
-    } = value;
107
-    return (
108
-      <ScrollView
109
-        ref="full"
110
-        style={styles.root}
111
-        contentContainerStyle={styles.container}
112
-      >
113
-        <View ref="header" style={styles.header}>
114
-          <Text style={styles.title}>😃 ViewShot Example 😜</Text>
115
-          <View style={styles.p1}>
116
-            <Text style={styles.text}>This is a </Text>
117
-            <Text style={styles.code}>react-native-view-shot</Text>
118
-            <Text style={styles.text}> showcase.</Text>
119
-          </View>
120
-          <View style={styles.preview}>
121
-            {error ? (
122
-              <Text style={styles.previewError}>
123
-                {"" + (error.message || error)}
124
-              </Text>
125
-            ) : (
126
-              <Image
127
-                fadeDuration={0}
128
-                resizeMode="contain"
129
-                style={styles.previewImage}
130
-                source={previewSource}
131
-              />
132
-            )}
133
-          </View>
134
-          <Text numberOfLines={1} style={styles.previewUriText}>
135
-            {res ? res.slice(0, 200) : ""}
136
-          </Text>
137
-        </View>
138
-        <View ref="form" style={styles.form}>
139
-          <View style={styles.btns}>
140
-            <Btn
141
-              label="😻 Reset"
142
-              onPress={() => this.setState({ previewSource: catsSource })}
143
-            />
144
-            <Btn label="📷 Head Section" onPress={this.snapshot("header")} />
145
-            <Btn label="📷 Form" onPress={this.snapshot("form")} />
146
-            <Btn
147
-              label="📷 Experimental Section"
148
-              onPress={this.snapshot("complex")}
149
-            />
150
-            <Btn label="📷 All (ScrollView)" onPress={this.snapshot("full")} />
151
-            <Btn label="📷 SVG" onPress={this.snapshot("svg")} />
152
-            <Btn label="📷 Transform" onPress={this.snapshot("transformParent")} />
153
-            <Btn label="📷 Transform Child" onPress={this.snapshot("transform")} />
154
-            <Btn label="📷 GL React" onPress={this.snapshot("gl")} />
155
-            <Btn label="📷 MapView" onPress={this.snapshot("mapview")} />
156
-            <Btn label="📷 WebView" onPress={this.snapshot("webview")} />
157
-            <Btn label="📷 Video" onPress={this.snapshot("video")} />
158
-            <Btn label="📷 Native Screenshot" onPress={this.snapshot()} />
159
-            <Btn
160
-              label="📷 Empty View (should crash)"
161
-              onPress={this.snapshot("empty")}
162
-            />
163
-          </View>
164
-          <View style={styles.field}>
165
-            <Text style={styles.label}>Format</Text>
166
-            <Picker
167
-              style={styles.input}
168
-              selectedValue={format}
169
-              onValueChange={format =>
170
-                this.setState({ value: { ...value, format } })}
171
-            >
172
-              <Picker.Item label="PNG" value="png" />
173
-              <Picker.Item label="JPEG" value="jpeg" />
174
-              <Picker.Item label="WEBM (android only)" value="webm" />
175
-              <Picker.Item label="RAW (android only)" value="raw" />
176
-              <Picker.Item label="INVALID" value="_invalid_" />
177
-            </Picker>
178
-          </View>
179
-          <View style={styles.field}>
180
-            <Text style={styles.label}>Quality</Text>
181
-            <Slider
182
-              style={styles.input}
183
-              value={quality}
184
-              onValueChange={quality =>
185
-                this.setState({ value: { ...value, quality } })}
186
-            />
187
-            <Text>{(quality * 100).toFixed(0)}%</Text>
188
-          </View>
189
-          <View style={styles.field}>
190
-            <Text style={styles.label}>Size</Text>
191
-            <Switch
192
-              style={styles.switch}
193
-              value={width !== undefined}
194
-              onValueChange={checked =>
195
-                this.setState({
196
-                  value: omit(
197
-                    {
198
-                      ...value,
199
-                      width: 300,
200
-                      height: 300
201
-                    },
202
-                    checked ? [] : ["width", "height"]
203
-                  )
204
-                })}
205
-            />
206
-            {width !== undefined ? (
207
-              <TextInput
208
-                style={styles.inputText}
209
-                value={"" + width}
210
-                keyboardType="number-pad"
211
-                onChangeText={txt =>
212
-                  !isNaN(txt) &&
213
-                  this.setState({
214
-                    value: { ...value, width: parseInt(txt, 10) }
215
-                  })}
216
-              />
217
-            ) : (
218
-              <Text style={styles.inputText}>(auto)</Text>
219
-            )}
220
-            <Text>x</Text>
221
-            {height !== undefined ? (
222
-              <TextInput
223
-                style={styles.inputText}
224
-                value={"" + height}
225
-                keyboardType="number-pad"
226
-                onChangeText={txt =>
227
-                  !isNaN(txt) &&
228
-                  this.setState({
229
-                    value: { ...value, height: parseInt(txt, 10) }
230
-                  })}
231
-              />
232
-            ) : (
233
-              <Text style={styles.inputText}>(auto)</Text>
234
-            )}
235
-          </View>
236
-          <View style={styles.field}>
237
-            <Text style={styles.label}>Result</Text>
238
-            <Picker
239
-              style={styles.input}
240
-              selectedValue={result}
241
-              onValueChange={result =>
242
-                this.setState({ value: { ...value, result } })}
243
-            >
244
-              <Picker.Item label="tmpfile" value="tmpfile" />
245
-              <Picker.Item label="base64" value="base64" />
246
-              <Picker.Item label="zip-base64 (Android Only)" value="zip-base64" />
247
-              <Picker.Item label="data URI" value="data-uri" />
248
-              <Picker.Item label="INVALID" value="_invalid_" />
249
-            </Picker>
250
-          </View>
251
-          <View style={styles.field}>
252
-            <Text style={styles.label}>snapshotContentContainer</Text>
253
-            <Switch
254
-              style={styles.switch}
255
-              value={snapshotContentContainer}
256
-              onValueChange={snapshotContentContainer =>
257
-                this.setState({
258
-                  value: { ...value, snapshotContentContainer }
259
-                })}
260
-            />
261
-          </View>
262
-        </View>
263
-        <View ref="empty" collapsable={false} />
264
-        <View style={styles.experimental} ref="complex" collapsable={false}>
265
-          <Text style={styles.experimentalTitle}>Experimental Stuff</Text>
266
-          <View ref="transformParent" collapsable={false} style={{flex: 1, flexDirection: 'row'}}>
267
-              <View ref="transformInner" collapsable={false} style={styles.experimentalTransform}>
268
-                <Text ref="transform" >Transform</Text>
269
-                <ART.Surface ref="surface" width={20} height={20}>
270
-                    <ART.Text
271
-                            fill="#000000"
272
-                            font={{fontFamily:'Arial',fontSize: 6}}
273
-                            >Sample Text</ART.Text>
274
-                    <ART.Shape
275
-                            d='M2.876,10.6499757 L16.375,18.3966817 C16.715,18.5915989 17.011,18.4606545 17.125,18.3956822 C17.237,18.3307098 17.499,18.1367923 17.499,17.746958 L17.499,2.25254636 C17.499,1.86271212 17.237,1.66879457 17.125,1.6038222 C17.011,1.53884983 16.715,1.4079055 16.375,1.60282262 L2.876,9.34952866 C2.537,9.54544536 2.5,9.86930765 2.5,10.000252 C2.5,10.1301967 2.537,10.4550586 2.876,10.6499757 M16.749,20 C16.364,20 15.98,19.8990429 15.629,19.6971288 L2.13,11.9504227 L2.129,11.9504227 C1.422,11.5445953 1,10.8149056 1,10.000252 C1,9.18459879 1.422,8.45590864 2.129,8.04908162 L15.629,0.302375584 C16.332,-0.10245228 17.173,-0.10045313 17.876,0.306373884 C18.579,0.713200898 18.999,1.44089148 18.999,2.25254636 L18.999,17.746958 C18.999,18.5586129 18.579,19.2863035 17.876,19.6931305 C17.523,19.8970438 17.136,20 16.749,20'
276
-                            fill="blue"
277
-                            stroke="black"
278
-                            strokeWidth={0}
279
-                            >
280
-                    </ART.Shape>
281
-                </ART.Surface>
282
-              </View>
283
-              <View ref="right" style={styles.experimentalTransformV2}>
284
-                <ART.Surface ref="surface2" width={20} height={20}>
285
-                    <ART.Shape
286
-                            x={0}
287
-                            y={10}
288
-                            d='M2.876,10.6499757 L16.375,18.3966817 C16.715,18.5915989 17.011,18.4606545 17.125,18.3956822 C17.237,18.3307098 17.499,18.1367923 17.499,17.746958 L17.499,2.25254636 C17.499,1.86271212 17.237,1.66879457 17.125,1.6038222 C17.011,1.53884983 16.715,1.4079055 16.375,1.60282262 L2.876,9.34952866 C2.537,9.54544536 2.5,9.86930765 2.5,10.000252 C2.5,10.1301967 2.537,10.4550586 2.876,10.6499757 M16.749,20 C16.364,20 15.98,19.8990429 15.629,19.6971288 L2.13,11.9504227 L2.129,11.9504227 C1.422,11.5445953 1,10.8149056 1,10.000252 C1,9.18459879 1.422,8.45590864 2.129,8.04908162 L15.629,0.302375584 C16.332,-0.10245228 17.173,-0.10045313 17.876,0.306373884 C18.579,0.713200898 18.999,1.44089148 18.999,2.25254636 L18.999,17.746958 C18.999,18.5586129 18.579,19.2863035 17.876,19.6931305 C17.523,19.8970438 17.136,20 16.749,20'
289
-                            fill="red"
290
-                            >
291
-                    </ART.Shape>
292
-                </ART.Surface>
293
-              </View>
294
-          </View>
295
-          <View ref="svg" collapsable={false}>
296
-            <SvgUri
297
-              width={200}
298
-              height={200}
299
-              source={require("./homer-simpson.svg")}
300
-            />
301
-          </View>
302
-          <View ref="gl" collapsable={false}>
303
-            <Surface width={300} height={300}>
304
-              <HelloGL blue={0.5} />
305
-            </Surface>
306
-          </View>
307
-          <MapView
308
-            ref="mapview"
309
-            initialRegion={{
310
-              latitude: 37.78825,
311
-              longitude: -122.4324,
312
-              latitudeDelta: 0.0922,
313
-              longitudeDelta: 0.0421
314
-            }}
315
-            style={{ width: 300, height: 300 }}
316
-          />
317
-          <View
318
-            ref="webview"
319
-            collapsable={false}
320
-            style={{ width: 300, height: 300 }}
321
-          >
322
-            <WebView
323
-              source={{
324
-                uri: "https://github.com/gre/react-native-view-shot"
325
-              }}
326
-            />
327
-          </View>
328
-          <Video
329
-            ref="video"
330
-            style={{ width: 300, height: 300 }}
331
-            source={require("./broadchurch.mp4")}
332
-            volume={0}
333
-            repeat
334
-          />
335
-        </View>
336
-      </ScrollView>
337
-    );
338
-  }
339
-}
340
-
341
-const styles = StyleSheet.create({
342
-  root: {
343
-    flex: 1,
344
-    backgroundColor: "#f6f6f6"
345
-  },
346
-  container: {
347
-    paddingVertical: 20,
348
-    backgroundColor: "#f6f6f6"
349
-  },
350
-  title: {
351
-    fontSize: 20,
352
-    textAlign: "center",
353
-    margin: 10
354
-  },
355
-  experimental: {
356
-    padding: 10,
357
-    flexDirection: "column",
358
-    alignItems: "center"
359
-  },
360
-  experimentalTitle: {
361
-    fontSize: 16,
362
-    margin: 10
363
-  },
364
-  experimentalTransform: {
365
-    transform: [{ rotate: '180deg' }],
366
-    backgroundColor: 'powderblue',
367
-  },
368
-  experimentalTransformV2: {
369
-//    transform: [{ rotate: '180deg' }],
370
-    backgroundColor: 'skyblue',
371
-  },
372
-  p1: {
373
-    marginBottom: 10,
374
-    flexDirection: "row",
375
-    flexWrap: "wrap",
376
-    justifyContent: "center",
377
-    alignItems: "center"
378
-  },
379
-  text: {
380
-    color: "#333"
381
-  },
382
-  code: {
383
-    fontWeight: "bold",
384
-    color: "#000"
385
-  },
386
-  field: {
387
-    flexDirection: "row",
388
-    alignItems: "center",
389
-    paddingVertical: 4,
390
-    paddingHorizontal: 10
391
-  },
392
-  label: {
393
-    minWidth: 80,
394
-    fontStyle: "italic",
395
-    color: "#888"
396
-  },
397
-  switch: {
398
-    marginRight: 50
399
-  },
400
-  input: {
401
-    flex: 1,
402
-    marginHorizontal: 5
403
-  },
404
-  inputText: {
405
-    flex: 1,
406
-    marginHorizontal: 5,
407
-    color: "red",
408
-    textAlign: "center"
409
-  },
410
-  preview: {
411
-    flexDirection: "row",
412
-    alignItems: "center",
413
-    justifyContent: "space-around"
414
-  },
415
-  previewImage: {
416
-    width: 375,
417
-    height: 300
418
-  },
419
-  previewUriText: {
420
-    fontSize: 12,
421
-    fontStyle: "italic",
422
-    color: "#666",
423
-    textAlign: "center",
424
-    padding: 10,
425
-    paddingBottom: 0
426
-  },
427
-  previewError: {
428
-    width: 375,
429
-    height: 300,
430
-    paddingTop: 20,
431
-    textAlign: "center",
432
-    fontSize: 20,
433
-    fontWeight: "bold",
434
-    color: "#fff",
435
-    backgroundColor: "#c00"
436
-  },
437
-  header: {
438
-    backgroundColor: "#f6f6f6",
439
-    borderColor: "#000",
440
-    borderWidth: 1,
441
-    paddingBottom: 20
442
-  },
443
-  form: {
444
-    backgroundColor: "#fff"
445
-  },
446
-  btns: {
447
-    flexDirection: "row",
448
-    flexWrap: "wrap",
449
-    alignItems: "center",
450
-    justifyContent: "center",
451
-    paddingVertical: 10,
452
-    margin: 4
453
-  }
454
-});

+ 0
- 355
example/App.windows.js Voir le fichier

@@ -1,355 +0,0 @@
1
-import React, { Component } from "react";
2
-import {
3
-  StyleSheet,
4
-  Text,
5
-  View,
6
-  ScrollView,
7
-  Image,
8
-  Switch,
9
-  TextInput,
10
-  Picker,
11
-  Slider,
12
-  WebView,
13
-} from "react-native";
14
-import omit from "lodash/omit";
15
-import { takeSnapshot } from "react-native-view-shot";
16
-// import { Surface } from "gl-react-native";
17
-// import GL from "gl-react";
18
-// import MapView from "react-native-maps";
19
-import Video from "react-native-video";
20
-import Btn from "./Btn";
21
-
22
-const catsSource = {
23
-  uri: "https://i.imgur.com/5EOyTDQ.jpg",
24
-};
25
-
26
-/*const shaders = GL.Shaders.create({
27
-  helloGL: {
28
-    frag: `
29
-precision highp float;
30
-varying vec2 uv;
31
-uniform float blue;
32
-void main () {
33
-  gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
34
-}`
35
-  }
36
-});
37
-
38
-const HelloGL = GL.createComponent(
39
-  ({ blue }) =>
40
-  <GL.Node
41
-    shader={shaders.helloGL}
42
-    uniforms={{ blue }}
43
-  />,
44
-  { displayName: "HelloGL" });*/
45
-
46
-export default class App extends Component {
47
-  state = {
48
-    previewSource: catsSource,
49
-    error: null,
50
-    res: null,
51
-    value: {
52
-      format: "png",
53
-      quality: 0.9,
54
-      result: "file",
55
-      snapshotContentContainer: false,
56
-    },
57
-  };
58
-
59
-  snapshot = refname => () =>
60
-    takeSnapshot(this.refs[refname], this.state.value)
61
-    .then(res =>
62
-      this.state.value.result !== "file"
63
-      ? res
64
-      : new Promise((success, failure) =>
65
-      // just a test to ensure res can be used in Image.getSize
66
-      Image.getSize(
67
-        res,
68
-        (width, height) => (console.log(res,width,height), success(res)),
69
-        failure)))
70
-    .then(res => this.setState({
71
-      error: null,
72
-      res,
73
-      previewSource: { uri:
74
-        this.state.value.result === "base64"
75
-        ? "data:image/"+this.state.value.format+";base64,"+res
76
-        : res }
77
-    }))
78
-    .catch(error => (console.warn(error), this.setState({ error, res: null, previewSource: null })));
79
-
80
-  render() {
81
-    const { value, previewSource, error, res } = this.state;
82
-    const { format, quality, width, height, result, snapshotContentContainer } = value;
83
-    return (
84
-      <ScrollView
85
-        ref="full"
86
-        style={styles.root}
87
-        contentContainerStyle={styles.container}>
88
-        <View
89
-          ref="header"
90
-          style={styles.header}>
91
-          <Text style={styles.title}>
92
-            😃 ViewShot Example 😜
93
-          </Text>
94
-          <View style={styles.p1}>
95
-            <Text style={styles.text}>
96
-              This is a{" "}
97
-            </Text>
98
-            <Text style={styles.code}>
99
-              react-native-view-shot
100
-            </Text>
101
-            <Text style={styles.text}>
102
-            {" "}showcase.
103
-            </Text>
104
-          </View>
105
-          <View style={styles.preview}>
106
-            { error
107
-              ? <Text style={styles.previewError}>
108
-                  {""+(error.message || error)}
109
-                </Text>
110
-              : <Image
111
-                  fadeDuration={0}
112
-                  resizeMode="contain"
113
-                  style={styles.previewImage}
114
-                  source={previewSource}
115
-                /> }
116
-          </View>
117
-          <Text numberOfLines={1} style={styles.previewUriText}>
118
-          {res ? res.slice(0, 200) : ""}
119
-          </Text>
120
-        </View>
121
-        <View
122
-          ref="form"
123
-          style={styles.form}>
124
-          <View style={styles.btns}>
125
-            <Btn label="😻 Reset" onPress={() => this.setState({ previewSource: catsSource })} />
126
-            <Btn label="📷 Head Section" onPress={this.snapshot("header")} />
127
-            <Btn label="📷 Form" onPress={this.snapshot("form")} />
128
-            <Btn label="📷 Experimental Section" onPress={this.snapshot("complex")} />
129
-            <Btn label="📷 All (ScrollView)" onPress={this.snapshot("full")} />
130
-            <Btn label="📷 GL React" onPress={this.snapshot("gl")} />
131
-            <Btn label="📷 MapView" onPress={this.snapshot("mapview")} />
132
-            <Btn label="📷 WebView" onPress={this.snapshot("webview")} />
133
-            <Btn label="📷 Video" onPress={this.snapshot("video")} />
134
-            <Btn label="📷 Empty View (should crash)" onPress={this.snapshot("empty")} />
135
-          </View>
136
-          <View style={styles.field}>
137
-            <Text style={styles.label}>Format</Text>
138
-            <Picker
139
-              style={styles.input}
140
-              selectedValue={format}
141
-              onValueChange={format => this.setState({ value: { ...value, format } })}>
142
-              <Picker.Item label="PNG" value="png" />
143
-              <Picker.Item label="JPEG" value="jpeg" />
144
-              <Picker.Item label="WEBM (android only)" value="webm" />
145
-              <Picker.Item label="INVALID" value="_invalid_" />
146
-            </Picker>
147
-          </View>
148
-          <View style={styles.field}>
149
-            <Text style={styles.label}>Quality</Text>
150
-            <Slider
151
-              style={styles.input}
152
-              value={quality}
153
-              onValueChange={quality => this.setState({ value: { ...value, quality } })}
154
-            />
155
-            <Text>{(quality*100).toFixed(0)}%</Text>
156
-          </View>
157
-          <View style={styles.field}>
158
-            <Text style={styles.label}>Size</Text>
159
-            <Switch
160
-              style={styles.switch}
161
-              value={width!==undefined}
162
-              onValueChange={checked => this.setState({
163
-                value: omit({
164
-                  ...value,
165
-                  width: 300,
166
-                  height: 300,
167
-                }, checked ? [] : ["width","height"])
168
-              })}
169
-            />
170
-            { width!==undefined ? <TextInput
171
-              style={styles.inputText}
172
-              value={""+width}
173
-              keyboardType="number-pad"
174
-              onChangeText={txt => !isNaN(txt) && this.setState({
175
-                value: { ...value, width: parseInt(txt, 10) }
176
-              })}
177
-            /> : <Text style={styles.inputText}>(auto)</Text> }
178
-            <Text>x</Text>
179
-            { height!==undefined ? <TextInput
180
-              style={styles.inputText}
181
-              value={""+height}
182
-              keyboardType="number-pad"
183
-              onChangeText={txt => !isNaN(txt) && this.setState({
184
-                value: { ...value, height: parseInt(txt, 10) }
185
-              })}
186
-            /> : <Text style={styles.inputText}>(auto)</Text> }
187
-          </View>
188
-          <View style={styles.field}>
189
-            <Text style={styles.label}>Result</Text>
190
-            <Picker
191
-              style={styles.input}
192
-              selectedValue={result}
193
-              onValueChange={result => this.setState({ value: { ...value, result } })}>
194
-              <Picker.Item label="file" value="file" />
195
-              <Picker.Item label="base64" value="base64" />
196
-              <Picker.Item label="data URI" value="data-uri" />
197
-              <Picker.Item label="INVALID" value="_invalid_" />
198
-            </Picker>
199
-          </View>
200
-          <View style={styles.field}>
201
-            <Text style={styles.label}>snapshotContentContainer</Text>
202
-            <Switch
203
-              style={styles.switch}
204
-              value={snapshotContentContainer}
205
-              onValueChange={snapshotContentContainer => this.setState({
206
-                value: { ...value, snapshotContentContainer }
207
-              })}
208
-            />
209
-          </View>
210
-        </View>
211
-        <View ref="empty" collapsable={false} />
212
-        <View style={styles.experimental} ref="complex" collapsable={false}>
213
-          <Text style={styles.experimentalTitle}>Experimental Stuff</Text>
214
-          {/*<Surface ref="gl" width={300} height={300}>
215
-            <HelloGL blue={0.5} />
216
-          </Surface>
217
-          <MapView
218
-             ref="mapview"
219
-            initialRegion={{
220
-              latitude: 37.78825,
221
-              longitude: -122.4324,
222
-              latitudeDelta: 0.0922,
223
-              longitudeDelta: 0.0421,
224
-            }}
225
-            style={{ width: 300, height: 300 }}
226
-          />*/}
227
-          <View
228
-            ref="webview"
229
-            collapsable={false}
230
-            style={{ width: 300, height: 300 }}>
231
-            <WebView
232
-              source={{
233
-                uri: "https://github.com/gre/react-native-view-shot"
234
-              }}
235
-            />
236
-          </View>
237
-          <Video
238
-            ref="video"
239
-            style={{ width: 300, height: 300 }}
240
-            source={require("./broadchurch.mp4")}
241
-            volume={0}
242
-            repeat
243
-          />
244
-        </View>
245
-      </ScrollView>
246
-    );
247
-  }
248
-}
249
-
250
-const styles = StyleSheet.create({
251
-  root: {
252
-    flex: 1,
253
-    backgroundColor: "#f6f6f6",
254
-  },
255
-  container: {
256
-    paddingVertical: 20,
257
-    backgroundColor: "#f6f6f6",
258
-  },
259
-  title: {
260
-    fontSize: 20,
261
-    textAlign: "center",
262
-    margin: 10,
263
-  },
264
-  experimental: {
265
-    padding: 10,
266
-    flexDirection: "column",
267
-    alignItems: "center",
268
-  },
269
-  experimentalTitle: {
270
-    fontSize: 16,
271
-    margin: 10,
272
-  },
273
-  p1: {
274
-    marginBottom: 10,
275
-    flexDirection: "row",
276
-    flexWrap: "wrap",
277
-    justifyContent: "center",
278
-    alignItems: "center",
279
-  },
280
-  text: {
281
-    color: "#333",
282
-  },
283
-  code: {
284
-    fontWeight: "bold",
285
-    color: "#000",
286
-  },
287
-  field: {
288
-    flexDirection: "row",
289
-    alignItems: "center",
290
-    paddingVertical: 4,
291
-    paddingHorizontal: 10,
292
-  },
293
-  label: {
294
-    minWidth: 80,
295
-    fontStyle: "italic",
296
-    color: "#888",
297
-  },
298
-  switch: {
299
-    marginRight: 50,
300
-  },
301
-  input: {
302
-    flex: 1,
303
-    marginHorizontal: 5,
304
-  },
305
-  inputText: {
306
-    flex: 1,
307
-    marginHorizontal: 5,
308
-    color: "red",
309
-    textAlign: "center",
310
-  },
311
-  preview: {
312
-    flexDirection: "row",
313
-    alignItems: "center",
314
-    justifyContent: "space-around",
315
-  },
316
-  previewImage: {
317
-    width: 375,
318
-    height: 300,
319
-  },
320
-  previewUriText: {
321
-    fontSize: 12,
322
-    fontStyle: "italic",
323
-    color: "#666",
324
-    textAlign: "center",
325
-    padding: 10,
326
-    paddingBottom: 0,
327
-  },
328
-  previewError: {
329
-    width: 375,
330
-    height: 300,
331
-    paddingTop: 20,
332
-    textAlign: "center",
333
-    fontSize: 20,
334
-    fontWeight: "bold",
335
-    color: "#fff",
336
-    backgroundColor: "#c00",
337
-  },
338
-  header: {
339
-    backgroundColor: "#f6f6f6",
340
-    borderColor: "#000",
341
-    borderWidth: 1,
342
-    paddingBottom: 20,
343
-  },
344
-  form: {
345
-    backgroundColor: "#fff",
346
-  },
347
-  btns: {
348
-    flexDirection: "row",
349
-    flexWrap: "wrap",
350
-    alignItems: "center",
351
-    justifyContent: "center",
352
-    paddingVertical: 10,
353
-    margin: 4,
354
-  }
355
-});

+ 0
- 31
example/Btn.js Voir le fichier

@@ -1,31 +0,0 @@
1
-//@flow
2
-import React, { Component } from "react";
3
-import PropTypes from "prop-types";
4
-import { Text, TouchableOpacity, StyleSheet } from "react-native";
5
-
6
-const styles = StyleSheet.create({
7
-  root: {
8
-    margin: 3,
9
-    paddingVertical: 4,
10
-    paddingHorizontal: 8,
11
-    color: "#36f",
12
-    borderWidth: 1,
13
-    borderColor: "#36f",
14
-    fontSize: 12
15
-  }
16
-});
17
-
18
-export default class Btn extends Component {
19
-  static propTypes = {
20
-    onPress: PropTypes.func.isRequired,
21
-    label: PropTypes.string.isRequired
22
-  };
23
-  render() {
24
-    const { onPress, label } = this.props;
25
-    return (
26
-      <TouchableOpacity onPress={onPress}>
27
-        <Text style={styles.root}>{label}</Text>
28
-      </TouchableOpacity>
29
-    );
30
-  }
31
-}

+ 0
- 12
example/README.md Voir le fichier

@@ -1,12 +0,0 @@
1
-## react-native-view-shot-example
2
-
3
-Example for [react-native-view-shot](https://github.com/gre/react-native-view-shot).
4
-
5
-<img src="docs/recursive.gif" width=300 />
6
-
7
-
8
-## Support for iOS and Android
9
-
10
-<img src="docs/android.png" width=300 />
11
-
12
-<img src="docs/ios.png" width=300 />

+ 0
- 112
example/Viewshoot.js Voir le fichier

@@ -1,112 +0,0 @@
1
-/**
2
- * Sample How To Screenshot Screen inside of ScrollView
3
- * The original github from 
4
- * https://github.com/gre/react-native-view-shot
5
- */
6
-import React, {Component} from 'react';
7
-import {ScrollView, StyleSheet, Text, View, Button, Image, } from 'react-native';
8
-
9
-import ViewShot from "react-native-view-shot";
10
-
11
-export default class App extends Component {
12
-    constructor(props) {
13
-        super(props)
14
-        this.state={
15
-            error: null,
16
-            res: null,
17
-            options: {
18
-                format: "jpg",
19
-                quality: 0.9
20
-            }
21
-        }
22
-    }
23
-
24
-    renderContent()
25
-	{
26
-		const data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23];
27
-		return data.map((item,index) => {
28
-			return (
29
-				<View style={styles.item} key={index}>
30
-					<Text>{item}</Text>
31
-				</View>
32
-			);
33
-		})
34
-	}
35
-
36
-    renderResultSnapshot()
37
-    {
38
-        if(this.state.res!==null)
39
-        {
40
-        console.log('Result on return snapshot: ', this.state.res);
41
-        return(
42
-            <Image
43
-                fadeDuration={0}
44
-                resizeMode="contain"
45
-                style={styles.previewImage}
46
-                source={this.state.res}
47
-            />
48
-        );
49
-        }
50
-
51
-        return;
52
-    }
53
-
54
-    
55
-
56
-    renderShootButton(){
57
-        return(
58
-            <Button
59
-                onPress={ async () => await this.captureViewShoot()}
60
-                title="Shoot Me"
61
-                color="#841584"
62
-            />
63
-        )
64
-    }
65
-    
66
-    captureViewShoot()
67
-    {
68
-        this.refs.full.capture().then(uri => {
69
-            console.log("do something with ", uri);
70
-            this.setState({res: {uri: uri}})
71
-        });
72
-    }
73
-
74
-    renderViewShot()
75
-    {
76
-        return(
77
-            <ScrollView style={styles.container}>
78
-                <ViewShot 
79
-                    ref="full" 
80
-                    options={{ format: this.state.options.format, quality: this.state.options.quality }} 
81
-                    style={styles.container}
82
-                >
83
-                    {this.renderResultSnapshot()}
84
-                    {this.renderContent()}
85
-                    {this.renderShootButton()}
86
-                </ViewShot>
87
-            </ScrollView>
88
-        )
89
-    }
90
-
91
-    render() {
92
-        return this.renderViewShot();
93
-    }
94
-}
95
-
96
-const styles = StyleSheet.create({
97
-    container: {
98
-        flex: 1,
99
-        backgroundColor: '#fff'
100
-    },
101
-    content: {
102
-        padding: 10,
103
-        backgroundColor: '#fff'
104
-    },
105
-    item: {
106
-        height: 50,
107
-    },
108
-    previewImage: {
109
-        width: 375,
110
-        height: 300
111
-    },
112
-});

+ 28
- 39
example/android/app/BUCK Voir le fichier

@@ -1,5 +1,3 @@
1
-import re
2
-
3 1
 # To learn about Buck see [Docs](https://buckbuild.com/).
4 2
 # To run your application with Buck:
5 3
 # - install Buck
@@ -10,57 +8,48 @@ import re
10 8
 # - `buck install -r android/app` - compile, install and run application
11 9
 #
12 10
 
11
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
+
13 13
 lib_deps = []
14
-for jarfile in glob(['libs/*.jar']):
15
-  name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16
-  lib_deps.append(':' + name)
17
-  prebuilt_jar(
18
-    name = name,
19
-    binary_jar = jarfile,
20
-  )
21 14
 
22
-for aarfile in glob(['libs/*.aar']):
23
-  name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24
-  lib_deps.append(':' + name)
25
-  android_prebuilt_aar(
26
-    name = name,
27
-    aar = aarfile,
28
-  )
15
+create_aar_targets(glob(["libs/*.aar"]))
16
+
17
+create_jar_targets(glob(["libs/*.jar"]))
29 18
 
30 19
 android_library(
31
-  name = 'all-libs',
32
-  exported_deps = lib_deps
20
+    name = "all-libs",
21
+    exported_deps = lib_deps,
33 22
 )
34 23
 
35 24
 android_library(
36
-  name = 'app-code',
37
-  srcs = glob([
38
-    'src/main/java/**/*.java',
39
-  ]),
40
-  deps = [
41
-    ':all-libs',
42
-    ':build_config',
43
-    ':res',
44
-  ],
25
+    name = "app-code",
26
+    srcs = glob([
27
+        "src/main/java/**/*.java",
28
+    ]),
29
+    deps = [
30
+        ":all-libs",
31
+        ":build_config",
32
+        ":res",
33
+    ],
45 34
 )
46 35
 
47 36
 android_build_config(
48
-  name = 'build_config',
49
-  package = 'com.viewshotexample',
37
+    name = "build_config",
38
+    package = "com.viewshotexample",
50 39
 )
51 40
 
52 41
 android_resource(
53
-  name = 'res',
54
-  res = 'src/main/res',
55
-  package = 'com.viewshotexample',
42
+    name = "res",
43
+    package = "com.viewshotexample",
44
+    res = "src/main/res",
56 45
 )
57 46
 
58 47
 android_binary(
59
-  name = 'app',
60
-  package_type = 'debug',
61
-  manifest = 'src/main/AndroidManifest.xml',
62
-  keystore = '//android/keystores:debug',
63
-  deps = [
64
-    ':app-code',
65
-  ],
48
+    name = "app",
49
+    keystore = "//android/keystores:debug",
50
+    manifest = "src/main/AndroidManifest.xml",
51
+    package_type = "debug",
52
+    deps = [
53
+        ":app-code",
54
+    ],
66 55
 )

+ 79
- 31
example/android/app/build.gradle Voir le fichier

@@ -18,6 +18,9 @@ import com.android.build.OutputFile
18 18
  *   // the entry file for bundle generation
19 19
  *   entryFile: "index.android.js",
20 20
  *
21
+ *   // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22
+ *   bundleCommand: "ram-bundle",
23
+ *
21 24
  *   // whether to bundle JS and assets in debug mode
22 25
  *   bundleInDebug: false,
23 26
  *
@@ -33,6 +36,13 @@ import com.android.build.OutputFile
33 36
  *   // bundleInPaidRelease: true,
34 37
  *   // bundleInBeta: true,
35 38
  *
39
+ *   // whether to disable dev mode in custom build variants (by default only disabled in release)
40
+ *   // for example: to disable dev mode in the staging build type (if configured)
41
+ *   devDisabledInStaging: true,
42
+ *   // The configuration property can be in the following formats
43
+ *   //         'devDisabledIn${productFlavor}${buildType}'
44
+ *   //         'devDisabledIn${buildType}'
45
+ *
36 46
  *   // the root of your project, i.e. where "package.json" lives
37 47
  *   root: "../../",
38 48
  *
@@ -58,16 +68,17 @@ import com.android.build.OutputFile
58 68
  *   inputExcludes: ["android/**", "ios/**"],
59 69
  *
60 70
  *   // override which node gets called and with what additional arguments
61
- *   nodeExecutableAndArgs: ["node"]
71
+ *   nodeExecutableAndArgs: ["node"],
62 72
  *
63 73
  *   // supply additional arguments to the packager
64 74
  *   extraPackagerArgs: []
65 75
  * ]
66 76
  */
67 77
 
68
-if (!project.file("../../node_modules/react-native/react.gradle").exists()) {
69
-    throw new RuntimeException("React modules are not installed. execute: 'yarn install' in 'example' folder. ")
70
-}
78
+project.ext.react = [
79
+    entryFile: "index.js",
80
+    enableHermes: false,  // clean and rebuild if changing
81
+]
71 82
 
72 83
 apply from: "../../node_modules/react-native/react.gradle"
73 84
 
@@ -86,32 +97,67 @@ def enableSeparateBuildPerCPUArchitecture = false
86 97
  */
87 98
 def enableProguardInReleaseBuilds = false
88 99
 
100
+/**
101
+ * The preferred build flavor of JavaScriptCore.
102
+ *
103
+ * For example, to use the international variant, you can use:
104
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
105
+ *
106
+ * The international variant includes ICU i18n library and necessary data
107
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
108
+ * give correct results when using with locales other than en-US.  Note that
109
+ * this variant is about 6MiB larger per architecture than default.
110
+ */
111
+def jscFlavor = 'org.webkit:android-jsc:+'
112
+
113
+/**
114
+ * Whether to enable the Hermes VM.
115
+ *
116
+ * This should be set on project.ext.react and mirrored here.  If it is not set
117
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
118
+ * and the benefits of using Hermes will therefore be sharply reduced.
119
+ */
120
+def enableHermes = project.ext.react.get("enableHermes", false);
121
+
89 122
 android {
90
-    compileSdkVersion 27
91
-    buildToolsVersion '28.0.3'
123
+    compileSdkVersion rootProject.ext.compileSdkVersion
124
+
125
+    compileOptions {
126
+        sourceCompatibility JavaVersion.VERSION_1_8
127
+        targetCompatibility JavaVersion.VERSION_1_8
128
+    }
92 129
 
93 130
     defaultConfig {
94 131
         applicationId "com.viewshotexample"
95
-        minSdkVersion 16
96
-        targetSdkVersion 27
97
-
132
+        minSdkVersion rootProject.ext.minSdkVersion
133
+        targetSdkVersion rootProject.ext.targetSdkVersion
98 134
         versionCode 1
99 135
         versionName "1.0"
100
-
101
-        ndk {
102
-            abiFilters "armeabi-v7a", "x86"
103
-        }
104 136
     }
105 137
     splits {
106 138
         abi {
107 139
             reset()
108 140
             enable enableSeparateBuildPerCPUArchitecture
109 141
             universalApk false  // If true, also generate a universal APK
110
-            include "armeabi-v7a", "x86"
142
+            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
143
+        }
144
+    }
145
+    signingConfigs {
146
+        debug {
147
+            storeFile file('debug.keystore')
148
+            storePassword 'android'
149
+            keyAlias 'androiddebugkey'
150
+            keyPassword 'android'
111 151
         }
112 152
     }
113 153
     buildTypes {
154
+        debug {
155
+            signingConfig signingConfigs.debug
156
+        }
114 157
         release {
158
+            // Caution! In production, you need to generate your own keystore file.
159
+            // see https://facebook.github.io/react-native/docs/signed-apk-android.
160
+            signingConfig signingConfigs.debug
115 161
             minifyEnabled enableProguardInReleaseBuilds
116 162
             proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
117 163
         }
@@ -120,38 +166,38 @@ android {
120 166
     applicationVariants.all { variant ->
121 167
         variant.outputs.each { output ->
122 168
             // For each separate APK per architecture, set a unique version code as described here:
123
-            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
124
-            def versionCodes = ["armeabi-v7a": 1, "x86": 2]
169
+            // https://developer.android.com/studio/build/configure-apk-splits.html
170
+            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
125 171
             def abi = output.getFilter(OutputFile.ABI)
126 172
             if (abi != null) {  // null for the universal-debug, universal-release variants
127 173
                 output.versionCodeOverride =
128 174
                         versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
129 175
             }
176
+
130 177
         }
131 178
     }
132
-}
133 179
 
134
-repositories {
135
-    google()
136
-    jcenter()
137
-    mavenLocal()
138
-    maven {
139
-        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
140
-        url "${project.projectDir}/../node_modules/react-native/android"
180
+    packagingOptions {
181
+        pickFirst '**/armeabi-v7a/libc++_shared.so'
182
+        pickFirst '**/x86/libc++_shared.so'
183
+        pickFirst '**/arm64-v8a/libc++_shared.so'
184
+        pickFirst '**/x86_64/libc++_shared.so'
185
+        pickFirst '**/x86/libjsc.so'
186
+        pickFirst '**/armeabi-v7a/libjsc.so'
141 187
     }
142 188
 }
143 189
 
144 190
 dependencies {
145
-    implementation project(':react-native-svg')
146 191
     implementation fileTree(dir: "libs", include: ["*.jar"])
147
-
148
-    implementation "com.android.support:appcompat-v7:27.+"
149 192
     implementation "com.facebook.react:react-native:+"  // From node_modules
150 193
 
151
-    implementation project(':react-native-view-shot')
152
-    implementation project(':gl-react-native')
153
-    implementation project(':react-native-maps')
154
-    implementation project(':react-native-video')
194
+    if (enableHermes) {
195
+      def hermesPath = "../../node_modules/hermesvm/android/";
196
+      debugImplementation files(hermesPath + "hermes-debug.aar")
197
+      releaseImplementation files(hermesPath + "hermes-release.aar")
198
+    } else {
199
+      implementation jscFlavor
200
+    }
155 201
 }
156 202
 
157 203
 // Run this once to be able to run the application with BUCK
@@ -160,3 +206,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
160 206
     from configurations.compile
161 207
     into 'libs'
162 208
 }
209
+
210
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

+ 19
- 0
example/android/app/build_defs.bzl Voir le fichier

@@ -0,0 +1,19 @@
1
+"""Helper definitions to glob .aar and .jar targets"""
2
+
3
+def create_aar_targets(aarfiles):
4
+    for aarfile in aarfiles:
5
+        name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
+        lib_deps.append(":" + name)
7
+        android_prebuilt_aar(
8
+            name = name,
9
+            aar = aarfile,
10
+        )
11
+
12
+def create_jar_targets(jarfiles):
13
+    for jarfile in jarfiles:
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
+        )

+ 0
- 56
example/android/app/proguard-rules.pro Voir le fichier

@@ -8,59 +8,3 @@
8 8
 #   http://developer.android.com/guide/developing/tools/proguard.html
9 9
 
10 10
 # Add any project specific keep options here:
11
-
12
-# If your project uses WebView with JS, uncomment the following
13
-# and specify the fully qualified class name to the JavaScript interface
14
-# class:
15
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
-#   public *;
17
-#}
18
-
19
-# Disabling obfuscation is useful if you collect stack traces from production crashes
20
-# (unless you are using a system that supports de-obfuscate the stack traces).
21
--dontobfuscate
22
-
23
-# React Native
24
-
25
-# Keep our interfaces so they can be used by other ProGuard rules.
26
-# See http://sourceforge.net/p/proguard/bugs/466/
27
--keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28
--keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29
--keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30
-
31
-# Do not strip any method/class that is annotated with @DoNotStrip
32
--keep @com.facebook.proguard.annotations.DoNotStrip class *
33
--keep @com.facebook.common.internal.DoNotStrip class *
34
--keepclassmembers class * {
35
-    @com.facebook.proguard.annotations.DoNotStrip *;
36
-    @com.facebook.common.internal.DoNotStrip *;
37
-}
38
-
39
--keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40
-  void set*(***);
41
-  *** get*();
42
-}
43
-
44
--keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45
--keep class * extends com.facebook.react.bridge.NativeModule { *; }
46
--keepclassmembers,includedescriptorclasses class * { native <methods>; }
47
--keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
48
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50
-
51
--dontwarn com.facebook.react.**
52
-
53
-# okhttp
54
-
55
--keepattributes Signature
56
--keepattributes *Annotation*
57
--keep class okhttp3.** { *; }
58
--keep interface okhttp3.** { *; }
59
--dontwarn okhttp3.**
60
-
61
-# okio
62
-
63
--keep class sun.misc.Unsafe { *; }
64
--dontwarn java.nio.file.*
65
--dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66
--dontwarn okio.**

+ 8
- 0
example/android/app/src/debug/AndroidManifest.xml Voir le fichier

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:tools="http://schemas.android.com/tools">
4
+
5
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
+
7
+    <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8
+</manifest>

+ 5
- 14
example/android/app/src/main/AndroidManifest.xml Voir le fichier

@@ -1,29 +1,20 @@
1 1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.viewshotexample"
3
-    android:versionCode="1"
4
-    android:versionName="1.0">
2
+  package="com.viewshotexample">
5 3
 
6 4
     <uses-permission android:name="android.permission.INTERNET" />
7
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
8
-
9
-    <uses-sdk
10
-        android:minSdkVersion="16"
11
-        android:targetSdkVersion="22" />
12 5
 
13 6
     <application
14 7
       android:name=".MainApplication"
15
-      android:allowBackup="true"
16 8
       android:label="@string/app_name"
17 9
       android:icon="@mipmap/ic_launcher"
10
+      android:roundIcon="@mipmap/ic_launcher_round"
11
+      android:allowBackup="false"
18 12
       android:theme="@style/AppTheme">
19
-      <meta-data
20
-        android:name="com.google.android.geo.API_KEY"
21
-        android:value="AIzaSyBizL7n_wUI-J2h2JMuFzNGzZ0NOoWLoHo"
22
-      />
23 13
       <activity
24 14
         android:name=".MainActivity"
25 15
         android:label="@string/app_name"
26
-        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
16
+        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
17
+        android:windowSoftInputMode="adjustResize">
27 18
         <intent-filter>
28 19
             <action android:name="android.intent.action.MAIN" />
29 20
             <category android:name="android.intent.category.LAUNCHER" />

+ 13
- 0
example/android/app/src/main/java/com/viewshotexample/MainActivity.java Voir le fichier

@@ -1,6 +1,9 @@
1 1
 package com.viewshotexample;
2 2
 
3 3
 import com.facebook.react.ReactActivity;
4
+import com.facebook.react.ReactActivityDelegate;
5
+import com.facebook.react.ReactRootView;
6
+import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
4 7
 
5 8
 public class MainActivity extends ReactActivity {
6 9
 
@@ -12,4 +15,14 @@ public class MainActivity extends ReactActivity {
12 15
     protected String getMainComponentName() {
13 16
         return "ViewShotExample";
14 17
     }
18
+
19
+    @Override
20
+    protected ReactActivityDelegate createReactActivityDelegate() {
21
+      return new ReactActivityDelegate(this, getMainComponentName()) {
22
+        @Override
23
+        protected ReactRootView createRootView() {
24
+         return new RNGestureHandlerEnabledRootView(MainActivity.this);
25
+        }
26
+      };
27
+    }
15 28
 }

+ 13
- 17
example/android/app/src/main/java/com/viewshotexample/MainApplication.java Voir le fichier

@@ -3,20 +3,14 @@ package com.viewshotexample;
3 3
 import android.app.Application;
4 4
 import android.util.Log;
5 5
 
6
-import com.airbnb.android.react.maps.MapsPackage;
6
+import com.facebook.react.PackageList;
7
+import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
8
+import com.facebook.react.bridge.JavaScriptExecutorFactory;
7 9
 import com.facebook.react.ReactApplication;
8
-import com.horcrux.svg.SvgPackage;
9
-import com.brentvatne.react.ReactVideoPackage;
10
-import com.facebook.react.ReactInstanceManager;
11 10
 import com.facebook.react.ReactNativeHost;
12 11
 import com.facebook.react.ReactPackage;
13
-import com.facebook.react.shell.MainReactPackage;
14 12
 import com.facebook.soloader.SoLoader;
15
-import com.projectseptember.RNGL.RNGLPackage;
16 13
 
17
-import fr.greweb.reactnativeviewshot.RNViewShotPackage;
18
-
19
-import java.util.Arrays;
20 14
 import java.util.List;
21 15
 
22 16
 public class MainApplication extends Application implements ReactApplication {
@@ -29,14 +23,16 @@ public class MainApplication extends Application implements ReactApplication {
29 23
 
30 24
     @Override
31 25
     protected List<ReactPackage> getPackages() {
32
-      return Arrays.<ReactPackage>asList(
33
-          new MainReactPackage(),
34
-            new SvgPackage(),
35
-            new ReactVideoPackage(),
36
-          new RNViewShotPackage(),
37
-          new MapsPackage(),
38
-          new RNGLPackage()
39
-      );
26
+      @SuppressWarnings("UnnecessaryLocalVariable")
27
+      List<ReactPackage> packages = new PackageList(this).getPackages();
28
+      // Packages that cannot be autolinked yet can be added manually here, for example:
29
+      // packages.add(new MyReactNativePackage());
30
+      return packages;
31
+    }
32
+
33
+    @Override
34
+    protected String getJSMainModuleName() {
35
+      return "index";
40 36
     }
41 37
   };
42 38
 

BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Voir le fichier


BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Voir le fichier


+ 1
- 0
example/android/app/src/main/res/values/styles.xml Voir le fichier

@@ -3,6 +3,7 @@
3 3
     <!-- Base application theme. -->
4 4
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5 5
         <!-- Customize your theme here. -->
6
+        <item name="android:textColor">#000000</item>
6 7
     </style>
7 8
 
8 9
 </resources>

+ 16
- 31
example/android/build.gradle Voir le fichier

@@ -1,53 +1,38 @@
1 1
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 2
 
3 3
 buildscript {
4
+    ext {
5
+        buildToolsVersion = "28.0.3"
6
+        minSdkVersion = 16
7
+        compileSdkVersion = 28
8
+        targetSdkVersion = 28
9
+        supportLibVersion = "28.0.0"
10
+    }
4 11
     repositories {
5 12
         google()
6 13
         jcenter()
7 14
     }
8 15
     dependencies {
9
-        classpath 'com.android.tools.build:gradle:3.1.4'
16
+        classpath("com.android.tools.build:gradle:3.4.1")
10 17
 
11 18
         // NOTE: Do not place your application dependencies here; they belong
12 19
         // in the individual module build.gradle files
13 20
     }
14 21
 }
15 22
 
16
-// This will apply compileSdkVersion and buildToolsVersion to any android modules
17
-subprojects { subproject ->
18
-    afterEvaluate { project ->
19
-        if (!project.name.equalsIgnoreCase("app") && project.hasProperty("android")) {
20
-            android {
21
-                compileSdkVersion 27
22
-                buildToolsVersion '28.0.3'
23
-            }
24
-        }
25
-    }
26
-}
27
-
28
-
29 23
 allprojects {
30 24
     repositories {
31 25
         mavenLocal()
32
-        google()
33
-        jcenter()
34 26
         maven {
35 27
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
36
-            url "$rootDir/../node_modules/react-native/android"
28
+            url("$rootDir/../node_modules/react-native/android")
37 29
         }
38
-    }
39
-}
40
-
41
-
42
-subprojects {
43
-    configurations.all {
44
-        resolutionStrategy {
45
-            eachDependency { details ->
46
-                /* Override by group name */
47
-                switch (details.requested.group) {
48
-                    case 'com.android.support': details.useVersion '27.+'; break
49
-                }
50
-            }
30
+        maven {
31
+            // Android JSC is installed from npm
32
+            url("$rootDir/../node_modules/jsc-android/dist")
51 33
         }
34
+
35
+        google()
36
+        jcenter()
52 37
     }
53
-}
38
+}

+ 2
- 1
example/android/gradle.properties Voir le fichier

@@ -17,4 +17,5 @@
17 17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 18
 # org.gradle.parallel=true
19 19
 
20
-android.useDeprecatedNdk=true
20
+android.useAndroidX=true
21
+android.enableJetifier=true

BIN
example/android/gradle/wrapper/gradle-wrapper.jar Voir le fichier


+ 1
- 2
example/android/gradle/wrapper/gradle-wrapper.properties Voir le fichier

@@ -1,6 +1,5 @@
1
-#Tue Oct 09 08:59:03 CEST 2018
2 1
 distributionBase=GRADLE_USER_HOME
3 2
 distributionPath=wrapper/dists
3
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

+ 17
- 1
example/android/gradlew Voir le fichier

@@ -1,5 +1,21 @@
1 1
 #!/usr/bin/env sh
2 2
 
3
+#
4
+# Copyright 2015 the original author or authors.
5
+#
6
+# Licensed under the Apache License, Version 2.0 (the "License");
7
+# you may not use this file except in compliance with the License.
8
+# You may obtain a copy of the License at
9
+#
10
+#      http://www.apache.org/licenses/LICENSE-2.0
11
+#
12
+# Unless required by applicable law or agreed to in writing, software
13
+# distributed under the License is distributed on an "AS IS" BASIS,
14
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+# See the License for the specific language governing permissions and
16
+# limitations under the License.
17
+#
18
+
3 19
 ##############################################################################
4 20
 ##
5 21
 ##  Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
28 44
 APP_BASE_NAME=`basename "$0"`
29 45
 
30 46
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
-DEFAULT_JVM_OPTS=""
47
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
32 48
 
33 49
 # Use the maximum available, or set MAX_FD != -1 to use that value.
34 50
 MAX_FD="maximum"

+ 17
- 1
example/android/gradlew.bat Voir le fichier

@@ -1,3 +1,19 @@
1
+@rem
2
+@rem Copyright 2015 the original author or authors.
3
+@rem
4
+@rem Licensed under the Apache License, Version 2.0 (the "License");
5
+@rem you may not use this file except in compliance with the License.
6
+@rem You may obtain a copy of the License at
7
+@rem
8
+@rem      http://www.apache.org/licenses/LICENSE-2.0
9
+@rem
10
+@rem Unless required by applicable law or agreed to in writing, software
11
+@rem distributed under the License is distributed on an "AS IS" BASIS,
12
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+@rem See the License for the specific language governing permissions and
14
+@rem limitations under the License.
15
+@rem
16
+
1 17
 @if "%DEBUG%" == "" @echo off
2 18
 @rem ##########################################################################
3 19
 @rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
14 30
 set APP_HOME=%DIRNAME%
15 31
 
16 32
 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
-set DEFAULT_JVM_OPTS=
33
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
18 34
 
19 35
 @rem Find java.exe
20 36
 if defined JAVA_HOME goto findJavaFromJavaHome

+ 0
- 8
example/android/keystores/BUCK Voir le fichier

@@ -1,8 +0,0 @@
1
-keystore(
2
-  name = 'debug',
3
-  store = 'debug.keystore',
4
-  properties = 'debug.keystore.properties',
5
-  visibility = [
6
-    'PUBLIC',
7
-  ],
8
-)

+ 0
- 4
example/android/keystores/debug.keystore.properties Voir le fichier

@@ -1,4 +0,0 @@
1
-key.store=debug.keystore
2
-key.alias=androiddebugkey
3
-key.store.password=android
4
-key.alias.password=android

+ 1
- 15
example/android/settings.gradle Voir le fichier

@@ -1,17 +1,3 @@
1 1
 rootProject.name = 'ViewShotExample'
2
+apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
2 3
 include ':app'
3
-
4
-include ':react-native-svg'
5
-project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
6
-
7
-include ':react-native-view-shot'
8
-project(':react-native-view-shot').projectDir = new File(rootProject.projectDir, '../../android')
9
-
10
-include ':react-native-maps'
11
-project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
12
-
13
-include ':gl-react-native'
14
-project(':gl-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/gl-react-native/android')
15
-
16
-include ':react-native-video'
17
-project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')

+ 4
- 0
example/app.json Voir le fichier

@@ -0,0 +1,4 @@
1
+{
2
+  "name": "ViewShotExample",
3
+  "displayName": "ViewShotExample"
4
+}

+ 3
- 0
example/babel.config.js Voir le fichier

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  presets: ['module:metro-react-native-babel-preset'],
3
+};

BIN
example/docs/android.png Voir le fichier


BIN
example/docs/ios.png Voir le fichier


BIN
example/docs/recursive.gif Voir le fichier


+ 0
- 4
example/index.android.js Voir le fichier

@@ -1,4 +0,0 @@
1
-//@flow
2
-import { AppRegistry } from "react-native";
3
-import App from "./App";
4
-AppRegistry.registerComponent("ViewShotExample", () => App);

+ 0
- 4
example/index.ios.js Voir le fichier

@@ -1,4 +0,0 @@
1
-//@flow
2
-import { AppRegistry } from "react-native";
3
-import App from "./App";
4
-AppRegistry.registerComponent("ViewShotExample", () => App);

+ 9
- 0
example/index.js Voir le fichier

@@ -0,0 +1,9 @@
1
+/**
2
+ * @format
3
+ */
4
+
5
+import { AppRegistry } from 'react-native';
6
+import App from './src/App';
7
+import { name as appName } from './app.json';
8
+
9
+AppRegistry.registerComponent(appName, () => App);

+ 0
- 4
example/index.windows.js Voir le fichier

@@ -1,4 +0,0 @@
1
-//@flow
2
-import { AppRegistry } from "react-native";
3
-import App from "./App";
4
-AppRegistry.registerComponent("ViewShotExample", () => App);

+ 47
- 0
example/ios/Podfile Voir le fichier

@@ -0,0 +1,47 @@
1
+platform :ios, '9.0'
2
+require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
+
4
+target 'ViewShotExample' do
5
+  # Pods for ViewShotExample
6
+  pod 'React', :path => '../node_modules/react-native/'
7
+  pod 'React-Core', :path => '../node_modules/react-native/React'
8
+  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
9
+  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
10
+  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
11
+  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
12
+  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
13
+  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
14
+  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
15
+  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
16
+  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
17
+  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
18
+  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
19
+  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
20
+
21
+  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
22
+  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
23
+  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
24
+  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
25
+  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
26
+
27
+  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
28
+  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
29
+  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
30
+
31
+  target 'ViewShotExampleTests' do
32
+    inherit! :search_paths
33
+    # Pods for testing
34
+  end
35
+
36
+  use_native_modules!
37
+end
38
+
39
+target 'ViewShotExample-tvOS' do
40
+  # Pods for ViewShotExample-tvOS
41
+
42
+  target 'ViewShotExample-tvOSTests' do
43
+    inherit! :search_paths
44
+    # Pods for testing
45
+  end
46
+
47
+end

+ 251
- 0
example/ios/Podfile.lock Voir le fichier

@@ -0,0 +1,251 @@
1
+PODS:
2
+  - boost-for-react-native (1.63.0)
3
+  - DoubleConversion (1.1.6)
4
+  - Folly (2018.10.22.00):
5
+    - boost-for-react-native
6
+    - DoubleConversion
7
+    - Folly/Default (= 2018.10.22.00)
8
+    - glog
9
+  - Folly/Default (2018.10.22.00):
10
+    - boost-for-react-native
11
+    - DoubleConversion
12
+    - glog
13
+  - glog (0.3.5)
14
+  - React (0.60.4):
15
+    - React-Core (= 0.60.4)
16
+    - React-DevSupport (= 0.60.4)
17
+    - React-RCTActionSheet (= 0.60.4)
18
+    - React-RCTAnimation (= 0.60.4)
19
+    - React-RCTBlob (= 0.60.4)
20
+    - React-RCTImage (= 0.60.4)
21
+    - React-RCTLinking (= 0.60.4)
22
+    - React-RCTNetwork (= 0.60.4)
23
+    - React-RCTSettings (= 0.60.4)
24
+    - React-RCTText (= 0.60.4)
25
+    - React-RCTVibration (= 0.60.4)
26
+    - React-RCTWebSocket (= 0.60.4)
27
+  - React-Core (0.60.4):
28
+    - Folly (= 2018.10.22.00)
29
+    - React-cxxreact (= 0.60.4)
30
+    - React-jsiexecutor (= 0.60.4)
31
+    - yoga (= 0.60.4.React)
32
+  - React-cxxreact (0.60.4):
33
+    - boost-for-react-native (= 1.63.0)
34
+    - DoubleConversion
35
+    - Folly (= 2018.10.22.00)
36
+    - glog
37
+    - React-jsinspector (= 0.60.4)
38
+  - React-DevSupport (0.60.4):
39
+    - React-Core (= 0.60.4)
40
+    - React-RCTWebSocket (= 0.60.4)
41
+  - React-fishhook (0.60.4)
42
+  - React-jsi (0.60.4):
43
+    - boost-for-react-native (= 1.63.0)
44
+    - DoubleConversion
45
+    - Folly (= 2018.10.22.00)
46
+    - glog
47
+    - React-jsi/Default (= 0.60.4)
48
+  - React-jsi/Default (0.60.4):
49
+    - boost-for-react-native (= 1.63.0)
50
+    - DoubleConversion
51
+    - Folly (= 2018.10.22.00)
52
+    - glog
53
+  - React-jsiexecutor (0.60.4):
54
+    - DoubleConversion
55
+    - Folly (= 2018.10.22.00)
56
+    - glog
57
+    - React-cxxreact (= 0.60.4)
58
+    - React-jsi (= 0.60.4)
59
+  - React-jsinspector (0.60.4)
60
+  - react-native-maps (0.25.0):
61
+    - React
62
+  - react-native-slider (2.0.0):
63
+    - React
64
+  - react-native-video (5.0.0):
65
+    - React
66
+    - react-native-video/Video (= 5.0.0)
67
+  - react-native-video/Video (5.0.0):
68
+    - React
69
+  - react-native-view-shot (3.0.2):
70
+    - React
71
+  - react-native-webview (6.9.0):
72
+    - React
73
+  - React-RCTActionSheet (0.60.4):
74
+    - React-Core (= 0.60.4)
75
+  - React-RCTAnimation (0.60.4):
76
+    - React-Core (= 0.60.4)
77
+  - React-RCTBlob (0.60.4):
78
+    - React-Core (= 0.60.4)
79
+    - React-RCTNetwork (= 0.60.4)
80
+    - React-RCTWebSocket (= 0.60.4)
81
+  - React-RCTImage (0.60.4):
82
+    - React-Core (= 0.60.4)
83
+    - React-RCTNetwork (= 0.60.4)
84
+  - React-RCTLinking (0.60.4):
85
+    - React-Core (= 0.60.4)
86
+  - React-RCTNetwork (0.60.4):
87
+    - React-Core (= 0.60.4)
88
+  - React-RCTSettings (0.60.4):
89
+    - React-Core (= 0.60.4)
90
+  - React-RCTText (0.60.4):
91
+    - React-Core (= 0.60.4)
92
+  - React-RCTVibration (0.60.4):
93
+    - React-Core (= 0.60.4)
94
+  - React-RCTWebSocket (0.60.4):
95
+    - React-Core (= 0.60.4)
96
+    - React-fishhook (= 0.60.4)
97
+  - ReactNativeART (1.0.1):
98
+    - React
99
+  - RNGestureHandler (1.3.0):
100
+    - React
101
+  - RNGL (2.42.1):
102
+    - React
103
+    - React-RCTImage
104
+  - RNReanimated (1.2.0):
105
+    - React
106
+  - RNSVG (9.6.2):
107
+    - React
108
+  - yoga (0.60.4.React)
109
+
110
+DEPENDENCIES:
111
+  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
112
+  - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
113
+  - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
114
+  - React (from `../node_modules/react-native/`)
115
+  - React-Core (from `../node_modules/react-native/React`)
116
+  - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
117
+  - React-DevSupport (from `../node_modules/react-native/React`)
118
+  - React-fishhook (from `../node_modules/react-native/Libraries/fishhook`)
119
+  - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
120
+  - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
121
+  - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
122
+  - react-native-maps (from `../node_modules/react-native-maps`)
123
+  - "react-native-slider (from `../node_modules/@react-native-community/slider`)"
124
+  - react-native-video (from `../node_modules/react-native-video`)
125
+  - react-native-view-shot (from `../node_modules/react-native-view-shot`)
126
+  - react-native-webview (from `../node_modules/react-native-webview`)
127
+  - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
128
+  - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
129
+  - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
130
+  - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
131
+  - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
132
+  - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
133
+  - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
134
+  - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
135
+  - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
136
+  - React-RCTWebSocket (from `../node_modules/react-native/Libraries/WebSocket`)
137
+  - "ReactNativeART (from `../node_modules/@react-native-community/art`)"
138
+  - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
139
+  - RNGL (from `../node_modules/gl-react-native`)
140
+  - RNReanimated (from `../node_modules/react-native-reanimated`)
141
+  - RNSVG (from `../node_modules/react-native-svg`)
142
+  - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
143
+
144
+SPEC REPOS:
145
+  https://github.com/cocoapods/specs.git:
146
+    - boost-for-react-native
147
+
148
+EXTERNAL SOURCES:
149
+  DoubleConversion:
150
+    :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
151
+  Folly:
152
+    :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
153
+  glog:
154
+    :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
155
+  React:
156
+    :path: "../node_modules/react-native/"
157
+  React-Core:
158
+    :path: "../node_modules/react-native/React"
159
+  React-cxxreact:
160
+    :path: "../node_modules/react-native/ReactCommon/cxxreact"
161
+  React-DevSupport:
162
+    :path: "../node_modules/react-native/React"
163
+  React-fishhook:
164
+    :path: "../node_modules/react-native/Libraries/fishhook"
165
+  React-jsi:
166
+    :path: "../node_modules/react-native/ReactCommon/jsi"
167
+  React-jsiexecutor:
168
+    :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
169
+  React-jsinspector:
170
+    :path: "../node_modules/react-native/ReactCommon/jsinspector"
171
+  react-native-maps:
172
+    :path: "../node_modules/react-native-maps"
173
+  react-native-slider:
174
+    :path: "../node_modules/@react-native-community/slider"
175
+  react-native-video:
176
+    :path: "../node_modules/react-native-video"
177
+  react-native-view-shot:
178
+    :path: "../node_modules/react-native-view-shot"
179
+  react-native-webview:
180
+    :path: "../node_modules/react-native-webview"
181
+  React-RCTActionSheet:
182
+    :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
183
+  React-RCTAnimation:
184
+    :path: "../node_modules/react-native/Libraries/NativeAnimation"
185
+  React-RCTBlob:
186
+    :path: "../node_modules/react-native/Libraries/Blob"
187
+  React-RCTImage:
188
+    :path: "../node_modules/react-native/Libraries/Image"
189
+  React-RCTLinking:
190
+    :path: "../node_modules/react-native/Libraries/LinkingIOS"
191
+  React-RCTNetwork:
192
+    :path: "../node_modules/react-native/Libraries/Network"
193
+  React-RCTSettings:
194
+    :path: "../node_modules/react-native/Libraries/Settings"
195
+  React-RCTText:
196
+    :path: "../node_modules/react-native/Libraries/Text"
197
+  React-RCTVibration:
198
+    :path: "../node_modules/react-native/Libraries/Vibration"
199
+  React-RCTWebSocket:
200
+    :path: "../node_modules/react-native/Libraries/WebSocket"
201
+  ReactNativeART:
202
+    :path: "../node_modules/@react-native-community/art"
203
+  RNGestureHandler:
204
+    :path: "../node_modules/react-native-gesture-handler"
205
+  RNGL:
206
+    :path: "../node_modules/gl-react-native"
207
+  RNReanimated:
208
+    :path: "../node_modules/react-native-reanimated"
209
+  RNSVG:
210
+    :path: "../node_modules/react-native-svg"
211
+  yoga:
212
+    :path: "../node_modules/react-native/ReactCommon/yoga"
213
+
214
+SPEC CHECKSUMS:
215
+  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
216
+  DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
217
+  Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
218
+  glog: 1f3da668190260b06b429bb211bfbee5cd790c28
219
+  React: ff7ee2ae5ee1c1d9ae2183b4111045b25294bb01
220
+  React-Core: 8e0ea421cae5609d2562850f98421b15030476fa
221
+  React-cxxreact: 326880209990151a7182a813311054e9772ba510
222
+  React-DevSupport: e9f10e6721e78e87622fc985db695c0c0168db8a
223
+  React-fishhook: 1f0e5b08449403fa75c3fb3881a0beefbada14af
224
+  React-jsi: 21d3153b1153fbf6510a92b6b11e33e725cb7432
225
+  React-jsiexecutor: 7549641e48bafae7bfee3f3ea19bf4901639c5de
226
+  React-jsinspector: 73f24a02fa684ed6a2b828ba116874a2191ded88
227
+  react-native-maps: 190c02ca533fddac5bb49cf17bdece3644612107
228
+  react-native-slider: 40bdbfc1af0393922ac331bc1d95a6c5d5174fb6
229
+  react-native-video: 6555881252c8ca039760e1cd6df28ac28ffb2baf
230
+  react-native-view-shot: 5f80b8f4f9003c3da8c0c0013488e5b2db17b1e2
231
+  react-native-webview: 2d8de2be422f0f8b9ba38db3f013f9ebfdb9b78f
232
+  React-RCTActionSheet: 9f71d7ae3e8fb10e08d162cbf14c621349dbfab3
233
+  React-RCTAnimation: 981d8c95b0e30918a9832ccac32af83562a27fae
234
+  React-RCTBlob: 21e73d1020a302a75fed30dbaee9f15287b80baa
235
+  React-RCTImage: c0bc6ac0926517b6fb7e4c279b04843113e99d1d
236
+  React-RCTLinking: 1af3f3c59114bed3deec0107c62e7efad0932ee5
237
+  React-RCTNetwork: 35df9de46e19cda5c56380be1a7759b9b8cb2fcd
238
+  React-RCTSettings: f580504c2cd1f44e25add10fb9ed3954f67f8ac5
239
+  React-RCTText: e0f224898b13af9aa036ea7cb3d438daa68c1044
240
+  React-RCTVibration: 0bea40cd51bd089bd591a8f74c86e91fdf2666c5
241
+  React-RCTWebSocket: 163873f4cdd5f1058a9483443404fc3801581cb6
242
+  ReactNativeART: d230fdaf9a6d15d5ec842355ada1edbe326c49d0
243
+  RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0
244
+  RNGL: cb1021a8021300492e6413d17700113d0e65cee1
245
+  RNReanimated: 1b52415c4302f198cb581282a0166690bad62c43
246
+  RNSVG: ff9b094e39dd4a437ebe17d1c7ceed286e75f426
247
+  yoga: c2c050f6ae6e222534760cc82f559b89214b67e2
248
+
249
+PODFILE CHECKSUM: 5899098aff77cdb5710faa624668c5b304ad3d68
250
+
251
+COCOAPODS: 1.7.5

+ 53
- 0
example/ios/ViewShotExample-tvOS/Info.plist Voir le fichier

@@ -0,0 +1,53 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>APPL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>NSAppTransportSecurity</key>
26
+	<dict>
27
+		<key>NSExceptionDomains</key>
28
+		<dict>
29
+			<key>localhost</key>
30
+			<dict>
31
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
32
+				<true/>
33
+			</dict>
34
+		</dict>
35
+	</dict>
36
+	<key>NSLocationWhenInUseUsageDescription</key>
37
+	<string></string>
38
+	<key>UILaunchStoryboardName</key>
39
+	<string>LaunchScreen</string>
40
+	<key>UIRequiredDeviceCapabilities</key>
41
+	<array>
42
+		<string>armv7</string>
43
+	</array>
44
+	<key>UISupportedInterfaceOrientations</key>
45
+	<array>
46
+		<string>UIInterfaceOrientationPortrait</string>
47
+		<string>UIInterfaceOrientationLandscapeLeft</string>
48
+		<string>UIInterfaceOrientationLandscapeRight</string>
49
+	</array>
50
+	<key>UIViewControllerBasedStatusBarAppearance</key>
51
+	<false/>
52
+</dict>
53
+</plist>

+ 24
- 0
example/ios/ViewShotExample-tvOSTests/Info.plist Voir le fichier

@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>BNDL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+</dict>
24
+</plist>

+ 584
- 802
example/ios/ViewShotExample.xcodeproj/project.pbxproj
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 129
- 0
example/ios/ViewShotExample.xcodeproj/xcshareddata/xcschemes/ViewShotExample-tvOS.xcscheme Voir le fichier

@@ -0,0 +1,129 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "0940"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "NO"
7
+      buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React-tvOS"
20
+               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+         <BuildActionEntry
24
+            buildForTesting = "YES"
25
+            buildForRunning = "YES"
26
+            buildForProfiling = "YES"
27
+            buildForArchiving = "YES"
28
+            buildForAnalyzing = "YES">
29
+            <BuildableReference
30
+               BuildableIdentifier = "primary"
31
+               BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
+               BuildableName = "ViewShotExample-tvOS.app"
33
+               BlueprintName = "ViewShotExample-tvOS"
34
+               ReferencedContainer = "container:ViewShotExample.xcodeproj">
35
+            </BuildableReference>
36
+         </BuildActionEntry>
37
+         <BuildActionEntry
38
+            buildForTesting = "YES"
39
+            buildForRunning = "YES"
40
+            buildForProfiling = "NO"
41
+            buildForArchiving = "NO"
42
+            buildForAnalyzing = "YES">
43
+            <BuildableReference
44
+               BuildableIdentifier = "primary"
45
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
+               BuildableName = "ViewShotExample-tvOSTests.xctest"
47
+               BlueprintName = "ViewShotExample-tvOSTests"
48
+               ReferencedContainer = "container:ViewShotExample.xcodeproj">
49
+            </BuildableReference>
50
+         </BuildActionEntry>
51
+      </BuildActionEntries>
52
+   </BuildAction>
53
+   <TestAction
54
+      buildConfiguration = "Debug"
55
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+      shouldUseLaunchSchemeArgsEnv = "YES">
58
+      <Testables>
59
+         <TestableReference
60
+            skipped = "NO">
61
+            <BuildableReference
62
+               BuildableIdentifier = "primary"
63
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
+               BuildableName = "ViewShotExample-tvOSTests.xctest"
65
+               BlueprintName = "ViewShotExample-tvOSTests"
66
+               ReferencedContainer = "container:ViewShotExample.xcodeproj">
67
+            </BuildableReference>
68
+         </TestableReference>
69
+      </Testables>
70
+      <MacroExpansion>
71
+         <BuildableReference
72
+            BuildableIdentifier = "primary"
73
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
+            BuildableName = "ViewShotExample-tvOS.app"
75
+            BlueprintName = "ViewShotExample-tvOS"
76
+            ReferencedContainer = "container:ViewShotExample.xcodeproj">
77
+         </BuildableReference>
78
+      </MacroExpansion>
79
+      <AdditionalOptions>
80
+      </AdditionalOptions>
81
+   </TestAction>
82
+   <LaunchAction
83
+      buildConfiguration = "Debug"
84
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
+      launchStyle = "0"
87
+      useCustomWorkingDirectory = "NO"
88
+      ignoresPersistentStateOnLaunch = "NO"
89
+      debugDocumentVersioning = "YES"
90
+      debugServiceExtension = "internal"
91
+      allowLocationSimulation = "YES">
92
+      <BuildableProductRunnable
93
+         runnableDebuggingMode = "0">
94
+         <BuildableReference
95
+            BuildableIdentifier = "primary"
96
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
+            BuildableName = "ViewShotExample-tvOS.app"
98
+            BlueprintName = "ViewShotExample-tvOS"
99
+            ReferencedContainer = "container:ViewShotExample.xcodeproj">
100
+         </BuildableReference>
101
+      </BuildableProductRunnable>
102
+      <AdditionalOptions>
103
+      </AdditionalOptions>
104
+   </LaunchAction>
105
+   <ProfileAction
106
+      buildConfiguration = "Release"
107
+      shouldUseLaunchSchemeArgsEnv = "YES"
108
+      savedToolIdentifier = ""
109
+      useCustomWorkingDirectory = "NO"
110
+      debugDocumentVersioning = "YES">
111
+      <BuildableProductRunnable
112
+         runnableDebuggingMode = "0">
113
+         <BuildableReference
114
+            BuildableIdentifier = "primary"
115
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
+            BuildableName = "ViewShotExample-tvOS.app"
117
+            BlueprintName = "ViewShotExample-tvOS"
118
+            ReferencedContainer = "container:ViewShotExample.xcodeproj">
119
+         </BuildableReference>
120
+      </BuildableProductRunnable>
121
+   </ProfileAction>
122
+   <AnalyzeAction
123
+      buildConfiguration = "Debug">
124
+   </AnalyzeAction>
125
+   <ArchiveAction
126
+      buildConfiguration = "Release"
127
+      revealArchiveInOrganizer = "YES">
128
+   </ArchiveAction>
129
+</Scheme>

+ 25
- 1
example/ios/ViewShotExample.xcodeproj/xcshareddata/xcschemes/ViewShotExample.xcscheme Voir le fichier

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "0620"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"
@@ -34,6 +34,20 @@
34 34
                ReferencedContainer = "container:ViewShotExample.xcodeproj">
35 35
             </BuildableReference>
36 36
          </BuildActionEntry>
37
+         <BuildActionEntry
38
+            buildForTesting = "YES"
39
+            buildForRunning = "YES"
40
+            buildForProfiling = "NO"
41
+            buildForArchiving = "NO"
42
+            buildForAnalyzing = "YES">
43
+            <BuildableReference
44
+               BuildableIdentifier = "primary"
45
+               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
46
+               BuildableName = "ViewShotExampleTests.xctest"
47
+               BlueprintName = "ViewShotExampleTests"
48
+               ReferencedContainer = "container:ViewShotExample.xcodeproj">
49
+            </BuildableReference>
50
+         </BuildActionEntry>
37 51
       </BuildActionEntries>
38 52
    </BuildAction>
39 53
    <TestAction
@@ -42,6 +56,16 @@
42 56
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43 57
       shouldUseLaunchSchemeArgsEnv = "YES">
44 58
       <Testables>
59
+         <TestableReference
60
+            skipped = "NO">
61
+            <BuildableReference
62
+               BuildableIdentifier = "primary"
63
+               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64
+               BuildableName = "ViewShotExampleTests.xctest"
65
+               BlueprintName = "ViewShotExampleTests"
66
+               ReferencedContainer = "container:ViewShotExample.xcodeproj">
67
+            </BuildableReference>
68
+         </TestableReference>
45 69
       </Testables>
46 70
       <MacroExpansion>
47 71
          <BuildableReference

+ 10
- 0
example/ios/ViewShotExample.xcworkspace/contents.xcworkspacedata Voir le fichier

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:ViewShotExample.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 5
- 6
example/ios/ViewShotExample/AppDelegate.h Voir le fichier

@@ -1,15 +1,14 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
8
+#import <React/RCTBridgeDelegate.h>
10 9
 #import <UIKit/UIKit.h>
11 10
 
12
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
+@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
13 12
 
14 13
 @property (nonatomic, strong) UIWindow *window;
15 14
 

+ 17
- 14
example/ios/ViewShotExample/AppDelegate.m Voir le fichier

@@ -1,30 +1,25 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import "AppDelegate.h"
11 9
 
10
+#import <React/RCTBridge.h>
12 11
 #import <React/RCTBundleURLProvider.h>
13 12
 #import <React/RCTRootView.h>
14
-#import <AVFoundation/AVFoundation.h>
15 13
 
16 14
 @implementation AppDelegate
17 15
 
18 16
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
19 17
 {
20
-  NSURL *jsCodeLocation;
18
+  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19
+  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20
+                                                   moduleName:@"ViewShotExample"
21
+                                            initialProperties:nil];
21 22
 
22
-  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
23
-
24
-  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
25
-                                                      moduleName:@"ViewShotExample"
26
-                                               initialProperties:nil
27
-                                                   launchOptions:launchOptions];
28 23
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
29 24
 
30 25
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
@@ -32,8 +27,16 @@
32 27
   rootViewController.view = rootView;
33 28
   self.window.rootViewController = rootViewController;
34 29
   [self.window makeKeyAndVisible];
35
-  [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
36 30
   return YES;
37 31
 }
38 32
 
33
+- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
34
+{
35
+#if DEBUG
36
+  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
37
+#else
38
+  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39
+#endif
40
+}
41
+
39 42
 @end

+ 6
- 0
example/ios/ViewShotExample/Images.xcassets/Contents.json Voir le fichier

@@ -0,0 +1,6 @@
1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

+ 18
- 15
example/ios/ViewShotExample/Info.plist Voir le fichier

@@ -4,10 +4,12 @@
4 4
 <dict>
5 5
 	<key>CFBundleDevelopmentRegion</key>
6 6
 	<string>en</string>
7
+	<key>CFBundleDisplayName</key>
8
+	<string>ViewShotExample</string>
7 9
 	<key>CFBundleExecutable</key>
8 10
 	<string>$(EXECUTABLE_NAME)</string>
9 11
 	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
12
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11 13
 	<key>CFBundleInfoDictionaryVersion</key>
12 14
 	<string>6.0</string>
13 15
 	<key>CFBundleName</key>
@@ -22,6 +24,21 @@
22 24
 	<string>1</string>
23 25
 	<key>LSRequiresIPhoneOS</key>
24 26
 	<true/>
27
+	<key>NSAppTransportSecurity</key>
28
+	<dict>
29
+		<key>NSAllowsArbitraryLoads</key>
30
+		<true/>
31
+		<key>NSExceptionDomains</key>
32
+		<dict>
33
+			<key>localhost</key>
34
+			<dict>
35
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
36
+				<true/>
37
+			</dict>
38
+		</dict>
39
+	</dict>
40
+	<key>NSLocationWhenInUseUsageDescription</key>
41
+	<string></string>
25 42
 	<key>UILaunchStoryboardName</key>
26 43
 	<string>LaunchScreen</string>
27 44
 	<key>UIRequiredDeviceCapabilities</key>
@@ -36,19 +53,5 @@
36 53
 	</array>
37 54
 	<key>UIViewControllerBasedStatusBarAppearance</key>
38 55
 	<false/>
39
-	<key>NSLocationWhenInUseUsageDescription</key>
40
-	<string></string>
41
-	<key>NSAppTransportSecurity</key>
42
-	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43
-	<dict>
44
-		<key>NSExceptionDomains</key>
45
-		<dict>
46
-			<key>localhost</key>
47
-			<dict>
48
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
49
-				<true/>
50
-			</dict>
51
-		</dict>
52
-	</dict>
53 56
 </dict>
54 57
 </plist>

+ 3
- 5
example/ios/ViewShotExample/main.m Voir le fichier

@@ -1,10 +1,8 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import <UIKit/UIKit.h>

+ 1
- 1
example/ios/ViewShotExampleTests/Info.plist Voir le fichier

@@ -7,7 +7,7 @@
7 7
 	<key>CFBundleExecutable</key>
8 8
 	<string>$(EXECUTABLE_NAME)</string>
9 9
 	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11 11
 	<key>CFBundleInfoDictionaryVersion</key>
12 12
 	<string>6.0</string>
13 13
 	<key>CFBundleName</key>

+ 4
- 6
example/ios/ViewShotExampleTests/ViewShotExampleTests.m Voir le fichier

@@ -1,10 +1,8 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import <UIKit/UIKit.h>
@@ -37,7 +35,7 @@
37 35
 
38 36
 - (void)testRendersWelcomeScreen
39 37
 {
40
-  UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
38
+  UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
41 39
   NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 40
   BOOL foundElement = NO;
43 41
 

+ 17
- 0
example/metro.config.js Voir le fichier

@@ -0,0 +1,17 @@
1
+/**
2
+ * Metro configuration for React Native
3
+ * https://github.com/facebook/react-native
4
+ *
5
+ * @format
6
+ */
7
+
8
+module.exports = {
9
+  transformer: {
10
+    getTransformOptions: async () => ({
11
+      transform: {
12
+        experimentalImportSupport: false,
13
+        inlineRequires: false,
14
+      },
15
+    }),
16
+  },
17
+};

+ 24
- 16
example/package.json Voir le fichier

@@ -1,27 +1,35 @@
1 1
 {
2 2
   "name": "ViewShotExample",
3
-  "version": "0.1.0",
3
+  "version": "0.0.1",
4 4
   "private": true,
5 5
   "scripts": {
6 6
     "start": "react-native start",
7
-    "android": "react-native run-android",
8
-    "ios": "react-native run-ios"
7
+    "lint": "eslint ."
9 8
   },
10 9
   "dependencies": {
11
-    "gl-react": "^2.3.1",
12
-    "gl-react-native": "^2.47.0",
13
-    "lodash": "4.17.4",
14
-    "prop-types": "^15.6.0",
15
-    "react": "^16.0.0",
16
-    "react-native": "^0.49.0",
17
-    "react-native-maps": "^0.16.2",
18
-    "react-native-svg": "^5.4.1",
19
-    "react-native-svg-uri": "github:gre/react-native-svg-uri#onLoad",
20
-    "react-native-video": "^2.0.0",
21
-    "react-native-view-shot": "file:..",
22
-    "react-native-windows": "^0.47.0-rc.4"
10
+    "@react-native-community/art": "^1.0.1",
11
+    "@react-native-community/slider": "^2.0.0",
12
+    "gl-react": "2",
13
+    "gl-react-native": "2",
14
+    "lodash": "^4.17.15",
15
+    "react": "16.8.6",
16
+    "react-native": "0.60.4",
17
+    "react-native-gesture-handler": "^1.3.0",
18
+    "react-native-maps": "^0.25.0",
19
+    "react-native-reanimated": "^1.2.0",
20
+    "react-native-svg": "^9.6.2",
21
+    "react-native-svg-uri": "^1.2.3",
22
+    "react-native-video": "^5.0.0",
23
+    "react-native-view-shot": "^3.0.2",
24
+    "react-native-webview": "^6.9.0",
25
+    "react-navigation": "^3.11.1"
23 26
   },
24 27
   "devDependencies": {
25
-    "rnpm-plugin-windows": "^0.2.4"
28
+    "@babel/core": "^7.5.5",
29
+    "@babel/runtime": "^7.5.5",
30
+    "@react-native-community/eslint-config": "^0.0.5",
31
+    "eslint": "^6.1.0",
32
+    "metro-react-native-babel-preset": "^0.55.0",
33
+    "react-test-renderer": "16.8.6"
26 34
   }
27 35
 }

+ 58
- 0
example/src/App.js Voir le fichier

@@ -0,0 +1,58 @@
1
+// @flow
2
+import React, { Fragment } from 'react';
3
+import { SafeAreaView, StatusBar, View, Text, TouchableOpacity, StyleSheet } from 'react-native';
4
+import { createStackNavigator, createAppContainer } from 'react-navigation';
5
+import FullScreen from './Full';
6
+import ViewshootScreen from './Viewshoot';
7
+
8
+class HomeScreen extends React.Component {
9
+  static navigationOptions = {
10
+    title: 'Home',
11
+  };
12
+  render() {
13
+    const { navigation } = this.props;
14
+    return (
15
+      <Fragment>
16
+        <StatusBar barStyle="dark-content" />
17
+        <SafeAreaView contentInsetAdjustmentBehavior="automatic">
18
+          {Object.keys(screens).map(key => (
19
+            <TouchableOpacity key={key} onPress={() => navigation.navigate(key)}>
20
+              <View style={styles.entry}>
21
+                <Text style={styles.entryText}>{key}</Text>
22
+              </View>
23
+            </TouchableOpacity>
24
+          ))}
25
+        </SafeAreaView>
26
+      </Fragment>
27
+    );
28
+  }
29
+}
30
+
31
+const styles = StyleSheet.create({
32
+  entry: {
33
+    paddingVertical: 10,
34
+    paddingHorizontal: 20,
35
+  },
36
+  entryText: {
37
+    fontSize: 28,
38
+    color: '#36f',
39
+  },
40
+});
41
+
42
+const screens = {
43
+  Full: {
44
+    screen: FullScreen,
45
+  },
46
+  Viewshoot: {
47
+    screen: ViewshootScreen,
48
+  },
49
+};
50
+
51
+const AppNavigator = createStackNavigator({
52
+  Home: {
53
+    screen: HomeScreen,
54
+  },
55
+  ...screens,
56
+});
57
+
58
+export default createAppContainer(AppNavigator);

+ 29
- 0
example/src/Btn.js Voir le fichier

@@ -0,0 +1,29 @@
1
+//@flow
2
+import React, { Component } from 'react';
3
+import { Text, TouchableOpacity, StyleSheet } from 'react-native';
4
+
5
+const styles = StyleSheet.create({
6
+  root: {
7
+    margin: 3,
8
+    paddingVertical: 4,
9
+    paddingHorizontal: 8,
10
+    color: '#36f',
11
+    borderWidth: 1,
12
+    borderColor: '#36f',
13
+    fontSize: 12,
14
+  },
15
+});
16
+
17
+export default class Btn extends Component<{
18
+  onPress: () => void,
19
+  label: string,
20
+}> {
21
+  render() {
22
+    const { onPress, label } = this.props;
23
+    return (
24
+      <TouchableOpacity onPress={onPress}>
25
+        <Text style={styles.root}>{label}</Text>
26
+      </TouchableOpacity>
27
+    );
28
+  }
29
+}

+ 446
- 0
example/src/Full.js Voir le fichier

@@ -0,0 +1,446 @@
1
+/* eslint-disable react-native/no-inline-styles */
2
+import React, { Fragment, useState, useRef, useCallback } from 'react';
3
+import {
4
+  SafeAreaView,
5
+  StyleSheet,
6
+  Switch,
7
+  TextInput,
8
+  Picker,
9
+  ScrollView,
10
+  View,
11
+  Text,
12
+  StatusBar,
13
+  Image,
14
+} from 'react-native';
15
+
16
+import * as ART from '@react-native-community/art';
17
+import Slider from '@react-native-community/slider';
18
+import omit from 'lodash/omit';
19
+import { captureRef, captureScreen } from 'react-native-view-shot';
20
+import { Surface } from 'gl-react-native';
21
+import GL from 'gl-react';
22
+import MapView from 'react-native-maps';
23
+import WebView from 'react-native-webview';
24
+import Video from 'react-native-video';
25
+import SvgUri from 'react-native-svg-uri';
26
+import Btn from './Btn';
27
+
28
+const catsSource = {
29
+  uri: 'https://i.imgur.com/5EOyTDQ.jpg',
30
+};
31
+
32
+const shaders = GL.Shaders.create({
33
+  helloGL: {
34
+    frag: `
35
+precision highp float;
36
+varying vec2 uv;
37
+uniform float blue;
38
+void main () {
39
+  gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
40
+}`,
41
+  },
42
+});
43
+
44
+const HelloGL = GL.createComponent(
45
+  ({ blue }) => <GL.Node shader={shaders.helloGL} uniforms={{ blue }} />,
46
+  { displayName: 'HelloGL' },
47
+);
48
+
49
+const App = () => {
50
+  const fullRef = useRef();
51
+  const headerRef = useRef();
52
+  const formRef = useRef();
53
+  const emptyRef = useRef();
54
+  const complexRef = useRef();
55
+  const svgRef = useRef();
56
+  const glRef = useRef();
57
+  const mapViewRef = useRef();
58
+  const webviewRef = useRef();
59
+  const videoRef = useRef();
60
+  const transformParentRef = useRef();
61
+  const transformRef = useRef();
62
+  const surfaceRef = useRef();
63
+
64
+  const [previewSource, setPreviewSource] = useState(catsSource);
65
+
66
+  const [result, setResult] = useState({ error: null, res: null });
67
+
68
+  const [config, setConfig] = useState({
69
+    format: 'png',
70
+    quality: 0.9,
71
+    result: 'tmpfile',
72
+    snapshotContentContainer: false,
73
+  });
74
+
75
+  const onCapture = useCallback(
76
+    res => {
77
+      setPreviewSource({
78
+        uri: config.result === 'base64' ? 'data:image/' + config.format + ';base64,' + res : res,
79
+      });
80
+      setResult({
81
+        error: null,
82
+        res,
83
+      });
84
+    },
85
+    [config],
86
+  );
87
+
88
+  const onCaptureFailure = useCallback(error => {
89
+    console.warn(error);
90
+    setPreviewSource(null);
91
+    setResult({
92
+      error,
93
+      res: null,
94
+    });
95
+  }, []);
96
+
97
+  const capture = useCallback(
98
+    ref => {
99
+      (ref ? captureRef(ref, config) : captureScreen(config))
100
+        .then(res =>
101
+          config.result !== 'tmpfile'
102
+            ? res
103
+            : new Promise((success, failure) =>
104
+                // just a test to ensure res can be used in Image.getSize
105
+                Image.getSize(res, (width, height) => success(res), failure),
106
+              ),
107
+        )
108
+        .then(onCapture, onCaptureFailure);
109
+    },
110
+    [config, onCapture, onCaptureFailure],
111
+  );
112
+
113
+  return (
114
+    <Fragment>
115
+      <StatusBar barStyle="dark-content" />
116
+      <SafeAreaView style={styles.root}>
117
+        <ScrollView
118
+          contentInsetAdjustmentBehavior="automatic"
119
+          ref={fullRef}
120
+          contentContainerStyle={styles.container}
121
+        >
122
+          <View ref={headerRef} style={styles.header}>
123
+            <Text style={styles.title}>😃 ViewShot Example 😜</Text>
124
+            <View style={styles.p1}>
125
+              <Text style={styles.text}>This is a </Text>
126
+              <Text style={styles.code}>react-native-view-shot</Text>
127
+              <Text style={styles.text}> showcase.</Text>
128
+            </View>
129
+            <View style={styles.preview}>
130
+              {result.error ? (
131
+                <Text style={styles.previewError}>
132
+                  {'' + (result.error.message || result.error)}
133
+                </Text>
134
+              ) : (
135
+                <Image
136
+                  fadeDuration={0}
137
+                  resizeMode="contain"
138
+                  style={styles.previewImage}
139
+                  source={previewSource}
140
+                />
141
+              )}
142
+            </View>
143
+            <Text numberOfLines={1} style={styles.previewUriText}>
144
+              {result.res ? result.res.slice(0, 200) : ''}
145
+            </Text>
146
+          </View>
147
+
148
+          <View ref={formRef} style={styles.form}>
149
+            <View style={styles.btns}>
150
+              <Btn label="😻 Reset" onPress={() => setPreviewSource(catsSource)} />
151
+              <Btn label="📷 Head Section" onPress={() => capture(headerRef)} />
152
+              <Btn label="📷 Form" onPress={() => capture(formRef)} />
153
+              <Btn label="📷 Experimental Section" onPress={() => capture(complexRef)} />
154
+              <Btn label="📷 All (ScrollView)" onPress={() => capture(fullRef)} />
155
+              <Btn label="📷 SVG" onPress={() => capture(svgRef)} />
156
+              <Btn label="📷 Transform" onPress={() => capture(transformParentRef)} />
157
+              <Btn label="📷 Transform Child" onPress={() => capture(transformRef)} />
158
+              <Btn label="📷 GL React" onPress={() => capture(glRef)} />
159
+              <Btn label="📷 MapView" onPress={() => capture(mapViewRef)} />
160
+              <Btn label="📷 WebView" onPress={() => capture(webviewRef)} />
161
+              <Btn label="📷 Video" onPress={() => capture(videoRef)} />
162
+              <Btn label="📷 Native Screenshot" onPress={() => capture()} />
163
+              <Btn label="📷 Empty View (should crash)" onPress={() => capture(emptyRef)} />
164
+            </View>
165
+            <View style={styles.field}>
166
+              <Text style={styles.label}>Format</Text>
167
+              <Picker
168
+                style={styles.input}
169
+                selectedValue={config.format}
170
+                onValueChange={format => setConfig({ ...config, format })}
171
+              >
172
+                <Picker.Item label="PNG" value="png" />
173
+                <Picker.Item label="JPEG" value="jpg" />
174
+                <Picker.Item label="WEBM (android only)" value="webm" />
175
+                <Picker.Item label="RAW (android only)" value="raw" />
176
+                <Picker.Item label="INVALID" value="_invalid_" />
177
+              </Picker>
178
+            </View>
179
+            <View style={styles.field}>
180
+              <Text style={styles.label}>Quality</Text>
181
+              <Slider
182
+                style={styles.input}
183
+                value={config.quality}
184
+                onValueChange={quality => setConfig({ ...config, quality })}
185
+              />
186
+              <Text>{(config.quality * 100).toFixed(0)}%</Text>
187
+            </View>
188
+            <View style={styles.field}>
189
+              <Text style={styles.label}>Size</Text>
190
+              <Switch
191
+                style={styles.switch}
192
+                value={config.width !== undefined}
193
+                onValueChange={checked =>
194
+                  setConfig(
195
+                    omit(
196
+                      {
197
+                        ...config,
198
+                        width: 300,
199
+                        height: 300,
200
+                      },
201
+                      checked ? [] : ['width', 'height'],
202
+                    ),
203
+                  )
204
+                }
205
+              />
206
+              {config.width !== undefined ? (
207
+                <TextInput
208
+                  style={styles.inputText}
209
+                  value={'' + config.width}
210
+                  keyboardType="number-pad"
211
+                  onChangeText={txt =>
212
+                    !isNaN(txt) && setConfig({ ...config, width: parseInt(txt, 10) })
213
+                  }
214
+                />
215
+              ) : (
216
+                <Text style={styles.inputText}>(auto)</Text>
217
+              )}
218
+              <Text>x</Text>
219
+              {config.height !== undefined ? (
220
+                <TextInput
221
+                  style={styles.inputText}
222
+                  value={'' + config.height}
223
+                  keyboardType="number-pad"
224
+                  onChangeText={txt =>
225
+                    !isNaN(txt) && setConfig({ ...config, height: parseInt(txt, 10) })
226
+                  }
227
+                />
228
+              ) : (
229
+                <Text style={styles.inputText}>(auto)</Text>
230
+              )}
231
+            </View>
232
+            <View style={styles.field}>
233
+              <Text style={styles.label}>Result</Text>
234
+              <Picker
235
+                style={styles.input}
236
+                selectedValue={config.result}
237
+                onValueChange={result => setConfig({ ...config, result })}
238
+              >
239
+                <Picker.Item label="tmpfile" value="tmpfile" />
240
+                <Picker.Item label="base64" value="base64" />
241
+                <Picker.Item label="zip-base64 (Android Only)" value="zip-base64" />
242
+                <Picker.Item label="data URI" value="data-uri" />
243
+                <Picker.Item label="INVALID" value="_invalid_" />
244
+              </Picker>
245
+            </View>
246
+            <View style={styles.field}>
247
+              <Text style={styles.label}>snapshotContentContainer</Text>
248
+              <Switch
249
+                style={styles.switch}
250
+                value={config.snapshotContentContainer}
251
+                onValueChange={snapshotContentContainer =>
252
+                  setConfig({ ...config, snapshotContentContainer })
253
+                }
254
+              />
255
+            </View>
256
+          </View>
257
+          <View ref={emptyRef} collapsable={false} />
258
+          <View style={styles.experimental} ref={complexRef} collapsable={false}>
259
+            <Text style={styles.experimentalTitle}>Experimental Stuff</Text>
260
+            <View ref={transformParentRef} collapsable={false} style={styles.experimentalRoot}>
261
+              <View collapsable={false} style={styles.experimentalTransform}>
262
+                <Text ref={transformRef}>Transform</Text>
263
+                <ART.Surface ref={surfaceRef} width={20} height={20}>
264
+                  <ART.Text fill="#000000" font={{ fontFamily: 'Arial', fontSize: 6 }}>
265
+                    Sample Text
266
+                  </ART.Text>
267
+                  <ART.Shape
268
+                    d="M2.876,10.6499757 L16.375,18.3966817 C16.715,18.5915989 17.011,18.4606545 17.125,18.3956822 C17.237,18.3307098 17.499,18.1367923 17.499,17.746958 L17.499,2.25254636 C17.499,1.86271212 17.237,1.66879457 17.125,1.6038222 C17.011,1.53884983 16.715,1.4079055 16.375,1.60282262 L2.876,9.34952866 C2.537,9.54544536 2.5,9.86930765 2.5,10.000252 C2.5,10.1301967 2.537,10.4550586 2.876,10.6499757 M16.749,20 C16.364,20 15.98,19.8990429 15.629,19.6971288 L2.13,11.9504227 L2.129,11.9504227 C1.422,11.5445953 1,10.8149056 1,10.000252 C1,9.18459879 1.422,8.45590864 2.129,8.04908162 L15.629,0.302375584 C16.332,-0.10245228 17.173,-0.10045313 17.876,0.306373884 C18.579,0.713200898 18.999,1.44089148 18.999,2.25254636 L18.999,17.746958 C18.999,18.5586129 18.579,19.2863035 17.876,19.6931305 C17.523,19.8970438 17.136,20 16.749,20"
269
+                    fill="blue"
270
+                    stroke="black"
271
+                    strokeWidth={0}
272
+                  />
273
+                </ART.Surface>
274
+              </View>
275
+              <View style={styles.experimentalTransformV2}>
276
+                <ART.Surface width={20} height={20}>
277
+                  <ART.Shape
278
+                    x={0}
279
+                    y={10}
280
+                    d="M2.876,10.6499757 L16.375,18.3966817 C16.715,18.5915989 17.011,18.4606545 17.125,18.3956822 C17.237,18.3307098 17.499,18.1367923 17.499,17.746958 L17.499,2.25254636 C17.499,1.86271212 17.237,1.66879457 17.125,1.6038222 C17.011,1.53884983 16.715,1.4079055 16.375,1.60282262 L2.876,9.34952866 C2.537,9.54544536 2.5,9.86930765 2.5,10.000252 C2.5,10.1301967 2.537,10.4550586 2.876,10.6499757 M16.749,20 C16.364,20 15.98,19.8990429 15.629,19.6971288 L2.13,11.9504227 L2.129,11.9504227 C1.422,11.5445953 1,10.8149056 1,10.000252 C1,9.18459879 1.422,8.45590864 2.129,8.04908162 L15.629,0.302375584 C16.332,-0.10245228 17.173,-0.10045313 17.876,0.306373884 C18.579,0.713200898 18.999,1.44089148 18.999,2.25254636 L18.999,17.746958 C18.999,18.5586129 18.579,19.2863035 17.876,19.6931305 C17.523,19.8970438 17.136,20 16.749,20"
281
+                    fill="red"
282
+                  />
283
+                </ART.Surface>
284
+              </View>
285
+            </View>
286
+            <View ref={svgRef} collapsable={false}>
287
+              <SvgUri width={200} height={200} source={require('./homer-simpson.svg')} />
288
+            </View>
289
+            <View ref={glRef} collapsable={false}>
290
+              <Surface width={300} height={300}>
291
+                <HelloGL blue={0.5} />
292
+              </Surface>
293
+            </View>
294
+            <MapView
295
+              ref={mapViewRef}
296
+              initialRegion={{
297
+                latitude: 37.78825,
298
+                longitude: -122.4324,
299
+                latitudeDelta: 0.0922,
300
+                longitudeDelta: 0.0421,
301
+              }}
302
+              style={{ width: 300, height: 300 }}
303
+            />
304
+            <View ref={webviewRef} collapsable={false} style={{ width: 300, height: 300 }}>
305
+              <WebView
306
+                source={{
307
+                  uri: 'https://github.com/gre/react-native-view-shot',
308
+                }}
309
+              />
310
+            </View>
311
+            <Video
312
+              ref={videoRef}
313
+              style={{ width: 300, height: 300 }}
314
+              source={require('./broadchurch.mp4')}
315
+              volume={0}
316
+              repeat
317
+            />
318
+          </View>
319
+        </ScrollView>
320
+      </SafeAreaView>
321
+    </Fragment>
322
+  );
323
+};
324
+
325
+const styles = StyleSheet.create({
326
+  root: {
327
+    backgroundColor: '#f6f6f6',
328
+  },
329
+  container: {
330
+    paddingVertical: 20,
331
+  },
332
+  title: {
333
+    fontSize: 20,
334
+    textAlign: 'center',
335
+    margin: 10,
336
+  },
337
+  experimental: {
338
+    padding: 10,
339
+    flexDirection: 'column',
340
+    alignItems: 'center',
341
+  },
342
+  experimentalTitle: {
343
+    fontSize: 16,
344
+    margin: 10,
345
+  },
346
+  experimentalTransform: {
347
+    transform: [{ rotate: '180deg' }],
348
+    backgroundColor: 'powderblue',
349
+  },
350
+  experimentalTransformV2: {
351
+    //    transform: [{ rotate: '180deg' }],
352
+    backgroundColor: 'skyblue',
353
+  },
354
+  p1: {
355
+    marginBottom: 10,
356
+    flexDirection: 'row',
357
+    flexWrap: 'wrap',
358
+    justifyContent: 'center',
359
+    alignItems: 'center',
360
+  },
361
+  text: {
362
+    color: '#333',
363
+  },
364
+  code: {
365
+    fontWeight: 'bold',
366
+    color: '#000',
367
+  },
368
+  field: {
369
+    flexDirection: 'row',
370
+    alignItems: 'center',
371
+    paddingVertical: 4,
372
+    paddingHorizontal: 10,
373
+  },
374
+  label: {
375
+    minWidth: 80,
376
+    fontStyle: 'italic',
377
+    color: '#888',
378
+  },
379
+  switch: {
380
+    marginRight: 50,
381
+  },
382
+  input: {
383
+    flex: 1,
384
+    marginHorizontal: 5,
385
+  },
386
+  inputText: {
387
+    flex: 1,
388
+    marginHorizontal: 5,
389
+    color: 'red',
390
+    textAlign: 'center',
391
+  },
392
+  preview: {
393
+    flexDirection: 'row',
394
+    alignItems: 'center',
395
+    justifyContent: 'space-around',
396
+  },
397
+  previewImage: {
398
+    width: 375,
399
+    height: 300,
400
+  },
401
+  previewUriText: {
402
+    fontSize: 12,
403
+    fontStyle: 'italic',
404
+    color: '#666',
405
+    textAlign: 'center',
406
+    padding: 10,
407
+    paddingBottom: 0,
408
+  },
409
+  previewError: {
410
+    width: 375,
411
+    height: 300,
412
+    paddingTop: 20,
413
+    textAlign: 'center',
414
+    fontSize: 20,
415
+    fontWeight: 'bold',
416
+    color: '#fff',
417
+    backgroundColor: '#c00',
418
+  },
419
+  header: {
420
+    backgroundColor: '#f6f6f6',
421
+    borderColor: '#000',
422
+    borderWidth: 1,
423
+    paddingBottom: 20,
424
+  },
425
+  form: {
426
+    backgroundColor: '#fff',
427
+  },
428
+  btns: {
429
+    flexDirection: 'row',
430
+    flexWrap: 'wrap',
431
+    alignItems: 'center',
432
+    justifyContent: 'center',
433
+    paddingVertical: 10,
434
+    margin: 4,
435
+  },
436
+  experimentalRoot: {
437
+    flex: 1,
438
+    flexDirection: 'row',
439
+  },
440
+});
441
+
442
+App.navigationOptions = {
443
+  title: 'Full Example',
444
+};
445
+
446
+export default App;

+ 130
- 0
example/src/Viewshoot.js Voir le fichier

@@ -0,0 +1,130 @@
1
+/**
2
+ * Sample How To Screenshot Screen inside of ScrollView
3
+ * The original github from
4
+ * https://github.com/gre/react-native-view-shot
5
+ */
6
+import React, { Component } from 'react';
7
+import { ScrollView, StyleSheet, Text, View, Button, Image } from 'react-native';
8
+
9
+import ViewShot from 'react-native-view-shot';
10
+
11
+export default class Viewshoot extends Component {
12
+  static navigationProps = {
13
+    title: 'Viewshoot',
14
+  };
15
+
16
+  state = {
17
+    error: null,
18
+    res: null,
19
+    options: {
20
+      format: 'jpg',
21
+      quality: 0.9,
22
+    },
23
+  };
24
+
25
+  renderContent() {
26
+    const data = [
27
+      1,
28
+      2,
29
+      3,
30
+      4,
31
+      5,
32
+      6,
33
+      7,
34
+      8,
35
+      9,
36
+      10,
37
+      11,
38
+      12,
39
+      13,
40
+      14,
41
+      15,
42
+      16,
43
+      17,
44
+      18,
45
+      19,
46
+      20,
47
+      21,
48
+      22,
49
+      23,
50
+    ];
51
+    return data.map((item, index) => {
52
+      return (
53
+        <View style={styles.item} key={index}>
54
+          <Text>{item}</Text>
55
+        </View>
56
+      );
57
+    });
58
+  }
59
+
60
+  renderResultSnapshot() {
61
+    if (this.state.res !== null) {
62
+      console.log('Result on return snapshot: ', this.state.res);
63
+      return (
64
+        <Image
65
+          fadeDuration={0}
66
+          resizeMode="contain"
67
+          style={styles.previewImage}
68
+          source={this.state.res}
69
+        />
70
+      );
71
+    }
72
+
73
+    return;
74
+  }
75
+
76
+  renderShootButton() {
77
+    return (
78
+      <Button
79
+        onPress={async () => await this.captureViewShoot()}
80
+        title="Shoot Me"
81
+        color="#841584"
82
+      />
83
+    );
84
+  }
85
+
86
+  captureViewShoot() {
87
+    this.refs.full.capture().then(uri => {
88
+      console.log('do something with ', uri);
89
+      this.setState({ res: { uri: uri } });
90
+    });
91
+  }
92
+
93
+  renderViewShot() {
94
+    return (
95
+      <ScrollView style={styles.container}>
96
+        <ViewShot
97
+          ref="full"
98
+          options={{ format: this.state.options.format, quality: this.state.options.quality }}
99
+          style={styles.container}
100
+        >
101
+          {this.renderResultSnapshot()}
102
+          {this.renderContent()}
103
+          {this.renderShootButton()}
104
+        </ViewShot>
105
+      </ScrollView>
106
+    );
107
+  }
108
+
109
+  render() {
110
+    return this.renderViewShot();
111
+  }
112
+}
113
+
114
+const styles = StyleSheet.create({
115
+  container: {
116
+    flex: 1,
117
+    backgroundColor: '#fff',
118
+  },
119
+  content: {
120
+    padding: 10,
121
+    backgroundColor: '#fff',
122
+  },
123
+  item: {
124
+    height: 50,
125
+  },
126
+  previewImage: {
127
+    width: 375,
128
+    height: 300,
129
+  },
130
+});

example/broadchurch.mp4 → example/src/broadchurch.mp4 Voir le fichier


example/homer-simpson.svg → example/src/homer-simpson.svg Voir le fichier


+ 0
- 89
example/windows/.gitignore Voir le fichier

@@ -1,89 +0,0 @@
1
-*AppPackages*
2
-*BundleArtifacts*
3
-*ReactAssets*
4
-
5
-#OS junk files
6
-[Tt]humbs.db
7
-*.DS_Store
8
-
9
-#Visual Studio files
10
-*.[Oo]bj
11
-*.user
12
-*.aps
13
-*.pch
14
-*.vspscc
15
-*.vssscc
16
-*_i.c
17
-*_p.c
18
-*.ncb
19
-*.suo
20
-*.tlb
21
-*.tlh
22
-*.bak
23
-*.[Cc]ache
24
-*.ilk
25
-*.log
26
-*.lib
27
-*.sbr
28
-*.sdf
29
-*.opensdf
30
-*.opendb
31
-*.unsuccessfulbuild
32
-ipch/
33
-[Oo]bj/
34
-[Bb]in
35
-[Dd]ebug*/
36
-[Rr]elease*/
37
-Ankh.NoLoad
38
-
39
-# Visual C++ cache files
40
-ipch/
41
-*.aps
42
-*.ncb
43
-*.opendb
44
-*.opensdf
45
-*.sdf
46
-*.cachefile
47
-*.VC.db
48
-*.VC.VC.opendb
49
-
50
-#MonoDevelop
51
-*.pidb
52
-*.userprefs
53
-
54
-#Tooling
55
-_ReSharper*/
56
-*.resharper
57
-[Tt]est[Rr]esult*
58
-*.sass-cache
59
-
60
-#Project files
61
-[Bb]uild/
62
-
63
-#Subversion files
64
-.svn
65
-
66
-# Office Temp Files
67
-~$*
68
-
69
-# vim Temp Files
70
-*~
71
-
72
-#NuGet
73
-packages/
74
-*.nupkg
75
-
76
-#ncrunch
77
-*ncrunch*
78
-*crunch*.local.xml
79
-
80
-# visual studio database projects
81
-*.dbmdl
82
-
83
-#Test files
84
-*.testsettings
85
-
86
-#Other files
87
-*.DotSettings
88
-.vs/
89
-*project.lock.json

+ 0
- 6
example/windows/ViewShotExample.Net46/App.config Voir le fichier

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8" ?>
2
-<configuration>
3
-    <startup> 
4
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5
-    </startup>
6
-</configuration>

+ 0
- 8
example/windows/ViewShotExample.Net46/App.xaml Voir le fichier

@@ -1,8 +0,0 @@
1
-<Application x:Class="ViewShotExample.Net46.App"
2
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
-             xmlns:local="clr-namespace:ViewShotExample.Net46">
5
-    <Application.Resources>
6
-         
7
-    </Application.Resources>
8
-</Application>

+ 0
- 101
example/windows/ViewShotExample.Net46/App.xaml.cs Voir le fichier

@@ -1,101 +0,0 @@
1
-using System;
2
-using System.Windows;
3
-using System.Windows.Controls;
4
-using System.Windows.Navigation;
5
-
6
-namespace ViewShotExample.Net46
7
-{
8
-    /// <summary>
9
-    /// Provides application-specific behavior to supplement the default Application class.
10
-    /// </summary>
11
-    public partial class App : Application
12
-    {
13
-        private readonly AppReactPage _reactPage = new AppReactPage();
14
-
15
-        /// <summary>
16
-        /// Initializes the singleton application object.  This is the first line of authored code
17
-        /// executed, and as such is the logical equivalent of main() or WinMain().
18
-        /// </summary>
19
-        public App()
20
-        {
21
-        }
22
-
23
-        /// <summary>
24
-        /// Override method fired prior to the Startup event when the Run method of the Application object is called...
25
-        /// </summary>
26
-        /// <param name="e"></param>
27
-        protected override void OnStartup(StartupEventArgs e)
28
-        {
29
-            base.OnStartup(e);
30
-            OnCreate(e.Args);
31
-        }
32
-
33
-        /// <summary>
34
-        /// Called whenever the app is opened to initialized...
35
-        /// </summary>
36
-        /// <param name="arguments"></param>
37
-        private void OnCreate(string[] arguments)
38
-        {
39
-            var shellWindow = Application.Current.MainWindow;
40
-
41
-            if (shellWindow == null)
42
-            {
43
-                shellWindow = new Window
44
-                {
45
-                    ShowActivated = true,
46
-                    ShowInTaskbar = true,
47
-                    Title = "ViewShotExample.Net46",
48
-                    Height = 768,
49
-                    Width = 1024,
50
-                    WindowStartupLocation = WindowStartupLocation.CenterScreen
51
-                };
52
-
53
-                Application.Current.MainWindow = shellWindow;
54
-            }
55
-
56
-            //Show Window if it is not already active...
57
-            if (!shellWindow.IsLoaded)
58
-            {
59
-                shellWindow.Show();
60
-            }
61
-
62
-            var rootFrame = shellWindow.Content as Frame;
63
-
64
-            // Do not repeat app initialization when the Window already has content,
65
-            // just ensure that the window is active
66
-            if (rootFrame == null)
67
-            {
68
-                _reactPage.OnCreate(arguments);
69
-
70
-                // Create a Frame to act as the navigation context and navigate to the first page
71
-                rootFrame = new Frame();
72
-
73
-                rootFrame.NavigationFailed += OnNavigationFailed;
74
-
75
-                // Place the frame in the current Window
76
-                shellWindow.Content = rootFrame;
77
-            }
78
-
79
-            if (rootFrame.Content == null)
80
-            {
81
-                // When the navigation stack isn't restored navigate to the first page,
82
-                // configuring the new page by passing required information as a navigation
83
-                // parameter
84
-                rootFrame.Content = _reactPage;
85
-            }
86
-
87
-            // Ensure the current window is active
88
-            shellWindow.Activate();
89
-        }
90
-
91
-        /// <summary>
92
-        /// Invoked when Navigation to a certain page fails
93
-        /// </summary>
94
-        /// <param name="sender">The Frame which failed navigation</param>
95
-        /// <param name="e">Details about the navigation failure</param>
96
-        private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
97
-        {
98
-            throw new Exception("Failed to load Page...");
99
-        }
100
-    }
101
-}

+ 0
- 32
example/windows/ViewShotExample.Net46/AppReactPage.cs Voir le fichier

@@ -1,32 +0,0 @@
1
-using ReactNative;
2
-using ReactNative.Bridge;
3
-using ReactNative.Modules.Core;
4
-using ReactNative.Shell;
5
-using ReactNative.UIManager;
6
-using System;
7
-using System.Collections.Generic;
8
-using ReactNativeVideo;
9
-using RNViewShot;
10
-
11
-namespace ViewShotExample.Net46
12
-{
13
-    internal class AppReactPage : ReactPage
14
-    {
15
-        public override string MainComponentName => "ViewShotExample";
16
-
17
-        public override List<IReactPackage> Packages => new List<IReactPackage>
18
-        {
19
-            new MainReactPackage(),
20
-            new RNViewShotPackage(),
21
-            new ReactVideoPackage(),
22
-        };
23
-
24
-        public override bool UseDeveloperSupport
25
-        {
26
-            get
27
-            {
28
-                return true;
29
-            }
30
-        }
31
-    }
32
-}

+ 0
- 55
example/windows/ViewShotExample.Net46/Properties/AssemblyInfo.cs Voir le fichier

@@ -1,55 +0,0 @@
1
-using System.Reflection;
2
-using System.Resources;
3
-using System.Runtime.CompilerServices;
4
-using System.Runtime.InteropServices;
5
-using System.Windows;
6
-
7
-// General Information about an assembly is controlled through the following 
8
-// set of attributes. Change these attribute values to modify the information
9
-// associated with an assembly.
10
-[assembly: AssemblyTitle("ViewShotExample.Net46")]
11
-[assembly: AssemblyDescription("")]
12
-[assembly: AssemblyConfiguration("")]
13
-[assembly: AssemblyCompany("")]
14
-[assembly: AssemblyProduct("ViewShotExample.Net46")]
15
-[assembly: AssemblyCopyright("Copyright ©  2017")]
16
-[assembly: AssemblyTrademark("")]
17
-[assembly: AssemblyCulture("")]
18
-
19
-// Setting ComVisible to false makes the types in this assembly not visible 
20
-// to COM components.  If you need to access a type in this assembly from 
21
-// COM, set the ComVisible attribute to true on that type.
22
-[assembly: ComVisible(false)]
23
-
24
-//In order to begin building localizable applications, set 
25
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26
-//inside a <PropertyGroup>.  For example, if you are using US english
27
-//in your source files, set the <UICulture> to en-US.  Then uncomment
28
-//the NeutralResourceLanguage attribute below.  Update the "en-US" in
29
-//the line below to match the UICulture setting in the project file.
30
-
31
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32
-
33
-
34
-[assembly: ThemeInfo(
35
-    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36
-                                     //(used if a resource is not found in the page, 
37
-                                     // or application resource dictionaries)
38
-    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39
-                                              //(used if a resource is not found in the page, 
40
-                                              // app, or any theme specific resource dictionaries)
41
-)]
42
-
43
-
44
-// Version information for an assembly consists of the following four values:
45
-//
46
-//      Major Version
47
-//      Minor Version 
48
-//      Build Number
49
-//      Revision
50
-//
51
-// You can specify all the values or you can default the Build and Revision Numbers 
52
-// by using the '*' as shown below:
53
-// [assembly: AssemblyVersion("1.0.*")]
54
-[assembly: AssemblyVersion("1.0.0.0")]
55
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0
- 71
example/windows/ViewShotExample.Net46/Properties/Resources.Designer.cs Voir le fichier

@@ -1,71 +0,0 @@
1
-//------------------------------------------------------------------------------
2
-// <auto-generated>
3
-//     This code was generated by a tool.
4
-//     Runtime Version:4.0.30319.42000
5
-//
6
-//     Changes to this file may cause incorrect behavior and will be lost if
7
-//     the code is regenerated.
8
-// </auto-generated>
9
-//------------------------------------------------------------------------------
10
-
11
-namespace ViewShotExample.Net46.Properties
12
-{
13
-
14
-
15
-    /// <summary>
16
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
17
-    /// </summary>
18
-    // This class was auto-generated by the StronglyTypedResourceBuilder
19
-    // class via a tool like ResGen or Visual Studio.
20
-    // To add or remove a member, edit your .ResX file then rerun ResGen
21
-    // with the /str option, or rebuild your VS project.
22
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25
-    internal class Resources
26
-    {
27
-
28
-        private static global::System.Resources.ResourceManager resourceMan;
29
-
30
-        private static global::System.Globalization.CultureInfo resourceCulture;
31
-
32
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33
-        internal Resources()
34
-        {
35
-        }
36
-
37
-        /// <summary>
38
-        ///   Returns the cached ResourceManager instance used by this class.
39
-        /// </summary>
40
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41
-        internal static global::System.Resources.ResourceManager ResourceManager
42
-        {
43
-            get
44
-            {
45
-                if ((resourceMan == null))
46
-                {
47
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ViewShotExample.Net46.Properties.Resources", typeof(Resources).Assembly);
48
-                    resourceMan = temp;
49
-                }
50
-                return resourceMan;
51
-            }
52
-        }
53
-
54
-        /// <summary>
55
-        ///   Overrides the current thread's CurrentUICulture property for all
56
-        ///   resource lookups using this strongly typed resource class.
57
-        /// </summary>
58
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59
-        internal static global::System.Globalization.CultureInfo Culture
60
-        {
61
-            get
62
-            {
63
-                return resourceCulture;
64
-            }
65
-            set
66
-            {
67
-                resourceCulture = value;
68
-            }
69
-        }
70
-    }
71
-}

+ 0
- 117
example/windows/ViewShotExample.Net46/Properties/Resources.resx Voir le fichier

@@ -1,117 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:element name="root" msdata:IsDataSet="true">
64
-      <xsd:complexType>
65
-        <xsd:choice maxOccurs="unbounded">
66
-          <xsd:element name="metadata">
67
-            <xsd:complexType>
68
-              <xsd:sequence>
69
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
70
-              </xsd:sequence>
71
-              <xsd:attribute name="name" type="xsd:string" />
72
-              <xsd:attribute name="type" type="xsd:string" />
73
-              <xsd:attribute name="mimetype" type="xsd:string" />
74
-            </xsd:complexType>
75
-          </xsd:element>
76
-          <xsd:element name="assembly">
77
-            <xsd:complexType>
78
-              <xsd:attribute name="alias" type="xsd:string" />
79
-              <xsd:attribute name="name" type="xsd:string" />
80
-            </xsd:complexType>
81
-          </xsd:element>
82
-          <xsd:element name="data">
83
-            <xsd:complexType>
84
-              <xsd:sequence>
85
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
86
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
87
-              </xsd:sequence>
88
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
89
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
90
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
91
-            </xsd:complexType>
92
-          </xsd:element>
93
-          <xsd:element name="resheader">
94
-            <xsd:complexType>
95
-              <xsd:sequence>
96
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
97
-              </xsd:sequence>
98
-              <xsd:attribute name="name" type="xsd:string" use="required" />
99
-            </xsd:complexType>
100
-          </xsd:element>
101
-        </xsd:choice>
102
-      </xsd:complexType>
103
-    </xsd:element>
104
-  </xsd:schema>
105
-  <resheader name="resmimetype">
106
-    <value>text/microsoft-resx</value>
107
-  </resheader>
108
-  <resheader name="version">
109
-    <value>2.0</value>
110
-  </resheader>
111
-  <resheader name="reader">
112
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
113
-  </resheader>
114
-  <resheader name="writer">
115
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-</root>

+ 0
- 30
example/windows/ViewShotExample.Net46/Properties/Settings.Designer.cs Voir le fichier

@@ -1,30 +0,0 @@
1
-//------------------------------------------------------------------------------
2
-// <auto-generated>
3
-//     This code was generated by a tool.
4
-//     Runtime Version:4.0.30319.42000
5
-//
6
-//     Changes to this file may cause incorrect behavior and will be lost if
7
-//     the code is regenerated.
8
-// </auto-generated>
9
-//------------------------------------------------------------------------------
10
-
11
-namespace ViewShotExample.Net46.Properties
12
-{
13
-
14
-
15
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18
-    {
19
-
20
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21
-
22
-        public static Settings Default
23
-        {
24
-            get
25
-            {
26
-                return defaultInstance;
27
-            }
28
-        }
29
-    }
30
-}

+ 0
- 7
example/windows/ViewShotExample.Net46/Properties/Settings.settings Voir le fichier

@@ -1,7 +0,0 @@
1
-<?xml version='1.0' encoding='utf-8'?>
2
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
3
-  <Profiles>
4
-    <Profile Name="(Default)" />
5
-  </Profiles>
6
-  <Settings />
7
-</SettingsFile>

+ 0
- 130
example/windows/ViewShotExample.Net46/ViewShotExample.Net46.csproj Voir le fichier

@@ -1,130 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
-  <PropertyGroup>
5
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
-    <ProjectGuid>{2A3E5645-CC81-4577-A1AC-397A09B76546}</ProjectGuid>
8
-    <OutputType>WinExe</OutputType>
9
-    <AppDesignerFolder>Properties</AppDesignerFolder>
10
-    <RootNamespace>ViewShotExample.Net46</RootNamespace>
11
-    <AssemblyName>ViewShotExample.Net46</AssemblyName>
12
-    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13
-    <FileAlignment>512</FileAlignment>
14
-    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15
-    <WarningLevel>4</WarningLevel>
16
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
17
-  </PropertyGroup>
18
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
19
-    <DebugSymbols>true</DebugSymbols>
20
-    <OutputPath>bin\x86\Debug\</OutputPath>
21
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
22
-    <DebugType>full</DebugType>
23
-    <PlatformTarget>x86</PlatformTarget>
24
-    <ErrorReport>prompt</ErrorReport>
25
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
26
-    <Prefer32Bit>true</Prefer32Bit>
27
-  </PropertyGroup>
28
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
29
-    <OutputPath>bin\x86\Release\</OutputPath>
30
-    <DefineConstants>TRACE</DefineConstants>
31
-    <Optimize>true</Optimize>
32
-    <DebugType>pdbonly</DebugType>
33
-    <PlatformTarget>x86</PlatformTarget>
34
-    <ErrorReport>prompt</ErrorReport>
35
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
36
-    <Prefer32Bit>true</Prefer32Bit>
37
-  </PropertyGroup>
38
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
39
-    <DebugSymbols>true</DebugSymbols>
40
-    <OutputPath>bin\x64\Debug\</OutputPath>
41
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
42
-    <DebugType>full</DebugType>
43
-    <PlatformTarget>x64</PlatformTarget>
44
-    <ErrorReport>prompt</ErrorReport>
45
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
46
-    <Prefer32Bit>true</Prefer32Bit>
47
-  </PropertyGroup>
48
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
49
-    <OutputPath>bin\x64\Release\</OutputPath>
50
-    <DefineConstants>TRACE</DefineConstants>
51
-    <Optimize>true</Optimize>
52
-    <DebugType>pdbonly</DebugType>
53
-    <PlatformTarget>x64</PlatformTarget>
54
-    <ErrorReport>prompt</ErrorReport>
55
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
56
-    <Prefer32Bit>true</Prefer32Bit>
57
-  </PropertyGroup>
58
-  <ItemGroup>
59
-    <Reference Include="System" />
60
-    <Reference Include="System.Data" />
61
-    <Reference Include="System.Xml" />
62
-    <Reference Include="Microsoft.CSharp" />
63
-    <Reference Include="System.Core" />
64
-    <Reference Include="System.Xml.Linq" />
65
-    <Reference Include="System.Data.DataSetExtensions" />
66
-    <Reference Include="System.Net.Http" />
67
-    <Reference Include="System.Xaml">
68
-      <RequiredTargetFramework>4.0</RequiredTargetFramework>
69
-    </Reference>
70
-    <Reference Include="WindowsBase" />
71
-    <Reference Include="PresentationCore" />
72
-    <Reference Include="PresentationFramework" />
73
-  </ItemGroup>
74
-  <ItemGroup>
75
-    <ApplicationDefinition Include="App.xaml">
76
-      <Generator>MSBuild:Compile</Generator>
77
-      <SubType>Designer</SubType>
78
-    </ApplicationDefinition>
79
-    <Compile Include="App.xaml.cs">
80
-      <DependentUpon>App.xaml</DependentUpon>
81
-      <SubType>Code</SubType>
82
-    </Compile>
83
-    <Compile Include="AppReactPage.cs" />
84
-  </ItemGroup>
85
-  <ItemGroup>
86
-    <Compile Include="Properties\AssemblyInfo.cs">
87
-      <SubType>Code</SubType>
88
-    </Compile>
89
-    <Compile Include="Properties\Resources.Designer.cs">
90
-      <AutoGen>True</AutoGen>
91
-      <DesignTime>True</DesignTime>
92
-      <DependentUpon>Resources.resx</DependentUpon>
93
-    </Compile>
94
-    <Compile Include="Properties\Settings.Designer.cs">
95
-      <AutoGen>True</AutoGen>
96
-      <DependentUpon>Settings.settings</DependentUpon>
97
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
98
-    </Compile>
99
-    <EmbeddedResource Include="Properties\Resources.resx">
100
-      <Generator>ResXFileCodeGenerator</Generator>
101
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
102
-    </EmbeddedResource>
103
-    <None Include="Properties\Settings.settings">
104
-      <Generator>SettingsSingleFileGenerator</Generator>
105
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
106
-    </None>
107
-    <AppDesigner Include="Properties\" />
108
-  </ItemGroup>
109
-  <ItemGroup>
110
-    <None Include="App.config" />
111
-  </ItemGroup>
112
-  <ItemGroup>
113
-    <ProjectReference Include="..\..\node_modules\react-native-view-shot\windows\RNViewShot.Net46\RNViewShot.Net46.csproj">
114
-      <Project>{1dd45d00-ddf4-43b4-ab28-f98e6dc325b5}</Project>
115
-      <Name>RNViewShot.Net46</Name>
116
-    </ProjectReference>
117
-    <ProjectReference Include="..\..\node_modules\react-native-windows\ReactWindows\ReactNative.Net46\ReactNative.Net46.csproj">
118
-      <Project>{22cbff9c-fe36-43e8-a246-266c7635e662}</Project>
119
-      <Name>ReactNative.Net46</Name>
120
-    </ProjectReference>
121
-  </ItemGroup>
122
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
123
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
124
-       Other similar extension points exist, see Microsoft.Common.targets.
125
-  <Target Name="BeforeBuild">
126
-  </Target>
127
-  <Target Name="AfterBuild">
128
-  </Target>
129
-  -->
130
-</Project>

+ 0
- 209
example/windows/ViewShotExample.sln Voir le fichier

@@ -1,209 +0,0 @@
1
-Microsoft Visual Studio Solution File, Format Version 12.00
2
-# Visual Studio 14
3
-VisualStudioVersion = 14.0.25420.1
4
-MinimumVisualStudioVersion = 10.0.40219.1
5
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ViewShotExample", "ViewShotExample\ViewShotExample.csproj", "{385046CD-7621-4286-9E49-4CA26B4A9C23}"
6
-EndProject
7
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChakraBridge", "..\node_modules\react-native-windows\ReactWindows\ChakraBridge\ChakraBridge.vcxproj", "{4B72C796-16D5-4E3A-81C0-3E36F531E578}"
8
-EndProject
9
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RNViewShot", "..\node_modules\react-native-view-shot\windows\RNViewShot\RNViewShot.csproj", "{391A35D0-FEBA-11E6-9171-BD5177E581B7}"
10
-EndProject
11
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative", "..\node_modules\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj", "{C7673AD5-E3AA-468C-A5FD-FA38154E205C}"
12
-EndProject
13
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ReactNative.Shared", "..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.shproj", "{EEA8B852-4D07-48E1-8294-A21AB5909FE5}"
14
-EndProject
15
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNativeVideo", "..\node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj", "{E8F5F57F-757E-4237-AD23-F7A8755427CD}"
16
-EndProject
17
-Global
18
-	GlobalSection(SharedMSBuildProjectFiles) = preSolution
19
-		..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.projitems*{c7673ad5-e3aa-468c-a5fd-fa38154e205c}*SharedItemsImports = 4
20
-		..\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\ReactNative.Shared.projitems*{eea8b852-4d07-48e1-8294-a21ab5909fe5}*SharedItemsImports = 13
21
-	EndGlobalSection
22
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
23
-		Debug|ARM = Debug|ARM
24
-		Debug|x64 = Debug|x64
25
-		Debug|x86 = Debug|x86
26
-		DebugBundle|ARM = DebugBundle|ARM
27
-		DebugBundle|x64 = DebugBundle|x64
28
-		DebugBundle|x86 = DebugBundle|x86
29
-		Development|ARM = Development|ARM
30
-		Development|x64 = Development|x64
31
-		Development|x86 = Development|x86
32
-		Release|ARM = Release|ARM
33
-		Release|x64 = Release|x64
34
-		Release|x86 = Release|x86
35
-		ReleaseBundle|ARM = ReleaseBundle|ARM
36
-		ReleaseBundle|x64 = ReleaseBundle|x64
37
-		ReleaseBundle|x86 = ReleaseBundle|x86
38
-	EndGlobalSection
39
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
40
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|ARM.ActiveCfg = Debug|ARM
41
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|ARM.Build.0 = Debug|ARM
42
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|ARM.Deploy.0 = Debug|ARM
43
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x64.ActiveCfg = Debug|x64
44
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x64.Build.0 = Debug|x64
45
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x64.Deploy.0 = Debug|x64
46
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x86.ActiveCfg = Debug|x86
47
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x86.Build.0 = Debug|x86
48
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Debug|x86.Deploy.0 = Debug|x86
49
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|ARM.ActiveCfg = DebugBundle|ARM
50
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|ARM.Build.0 = DebugBundle|ARM
51
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|ARM.Deploy.0 = DebugBundle|ARM
52
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x64.ActiveCfg = DebugBundle|x64
53
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x64.Build.0 = DebugBundle|x64
54
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x64.Deploy.0 = DebugBundle|x64
55
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x86.ActiveCfg = DebugBundle|x86
56
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x86.Build.0 = DebugBundle|x86
57
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.DebugBundle|x86.Deploy.0 = DebugBundle|x86
58
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|ARM.ActiveCfg = DebugBundle|ARM
59
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|ARM.Build.0 = DebugBundle|ARM
60
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|ARM.Deploy.0 = DebugBundle|ARM
61
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x64.ActiveCfg = DebugBundle|x64
62
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x64.Build.0 = DebugBundle|x64
63
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x64.Deploy.0 = DebugBundle|x64
64
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x86.ActiveCfg = DebugBundle|x86
65
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x86.Build.0 = DebugBundle|x86
66
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Development|x86.Deploy.0 = DebugBundle|x86
67
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|ARM.ActiveCfg = Release|ARM
68
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|ARM.Build.0 = Release|ARM
69
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|ARM.Deploy.0 = Release|ARM
70
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x64.ActiveCfg = Release|x64
71
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x64.Build.0 = Release|x64
72
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x64.Deploy.0 = Release|x64
73
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x86.ActiveCfg = Release|x86
74
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x86.Build.0 = Release|x86
75
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.Release|x86.Deploy.0 = Release|x86
76
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|ARM.ActiveCfg = ReleaseBundle|ARM
77
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|ARM.Build.0 = ReleaseBundle|ARM
78
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|ARM.Deploy.0 = ReleaseBundle|ARM
79
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x64.ActiveCfg = ReleaseBundle|x64
80
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x64.Build.0 = ReleaseBundle|x64
81
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x64.Deploy.0 = ReleaseBundle|x64
82
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x86.ActiveCfg = ReleaseBundle|x86
83
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x86.Build.0 = ReleaseBundle|x86
84
-		{385046CD-7621-4286-9E49-4CA26B4A9C23}.ReleaseBundle|x86.Deploy.0 = ReleaseBundle|x86
85
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|ARM.ActiveCfg = Debug|ARM
86
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|ARM.Build.0 = Debug|ARM
87
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x64.ActiveCfg = Debug|x64
88
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x64.Build.0 = Debug|x64
89
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x86.ActiveCfg = Debug|Win32
90
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Debug|x86.Build.0 = Debug|Win32
91
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|ARM.ActiveCfg = Debug|ARM
92
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|ARM.Build.0 = Debug|ARM
93
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|x64.ActiveCfg = Debug|x64
94
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|x64.Build.0 = Debug|x64
95
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|x86.ActiveCfg = Debug|Win32
96
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.DebugBundle|x86.Build.0 = Debug|Win32
97
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|ARM.ActiveCfg = Debug|ARM
98
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|ARM.Build.0 = Debug|ARM
99
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x64.ActiveCfg = Debug|x64
100
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x64.Build.0 = Debug|x64
101
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x86.ActiveCfg = Debug|Win32
102
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Development|x86.Build.0 = Debug|Win32
103
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|ARM.ActiveCfg = Release|ARM
104
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|ARM.Build.0 = Release|ARM
105
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x64.ActiveCfg = Release|x64
106
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x64.Build.0 = Release|x64
107
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x86.ActiveCfg = Release|Win32
108
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.Release|x86.Build.0 = Release|Win32
109
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|ARM.ActiveCfg = Release|ARM
110
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|ARM.Build.0 = Release|ARM
111
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|x64.ActiveCfg = Release|x64
112
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|x64.Build.0 = Release|x64
113
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|x86.ActiveCfg = Release|Win32
114
-		{4B72C796-16D5-4E3A-81C0-3E36F531E578}.ReleaseBundle|x86.Build.0 = Release|Win32
115
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|ARM.ActiveCfg = Debug|ARM
116
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|ARM.Build.0 = Debug|ARM
117
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|x64.ActiveCfg = Debug|x64
118
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|x64.Build.0 = Debug|x64
119
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|x86.ActiveCfg = Debug|x86
120
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Debug|x86.Build.0 = Debug|x86
121
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|ARM.ActiveCfg = Debug|ARM
122
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|ARM.Build.0 = Debug|ARM
123
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|x64.ActiveCfg = Debug|x64
124
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|x64.Build.0 = Debug|x64
125
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|x86.ActiveCfg = Debug|x86
126
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.DebugBundle|x86.Build.0 = Debug|x86
127
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|ARM.ActiveCfg = Development|ARM
128
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|ARM.Build.0 = Development|ARM
129
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|x64.ActiveCfg = Development|x64
130
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|x64.Build.0 = Development|x64
131
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|x86.ActiveCfg = Development|x86
132
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Development|x86.Build.0 = Development|x86
133
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|ARM.ActiveCfg = Release|ARM
134
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|ARM.Build.0 = Release|ARM
135
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|x64.ActiveCfg = Release|x64
136
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|x64.Build.0 = Release|x64
137
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|x86.ActiveCfg = Release|x86
138
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.Release|x86.Build.0 = Release|x86
139
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|ARM.ActiveCfg = Release|ARM
140
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|ARM.Build.0 = Release|ARM
141
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|x64.ActiveCfg = Release|x64
142
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|x64.Build.0 = Release|x64
143
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|x86.ActiveCfg = Release|x86
144
-		{391A35D0-FEBA-11E6-9171-BD5177E581B7}.ReleaseBundle|x86.Build.0 = Release|x86
145
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|ARM.ActiveCfg = Debug|ARM
146
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|ARM.Build.0 = Debug|ARM
147
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x64.ActiveCfg = Debug|x64
148
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x64.Build.0 = Debug|x64
149
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x86.ActiveCfg = Debug|x86
150
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Debug|x86.Build.0 = Debug|x86
151
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|ARM.ActiveCfg = Debug|ARM
152
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|ARM.Build.0 = Debug|ARM
153
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|x64.ActiveCfg = Debug|x64
154
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|x64.Build.0 = Debug|x64
155
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|x86.ActiveCfg = Debug|x86
156
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.DebugBundle|x86.Build.0 = Debug|x86
157
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|ARM.ActiveCfg = Debug|ARM
158
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|ARM.Build.0 = Debug|ARM
159
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x64.ActiveCfg = Debug|x64
160
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x64.Build.0 = Debug|x64
161
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x86.ActiveCfg = Debug|x86
162
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Development|x86.Build.0 = Debug|x86
163
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|ARM.ActiveCfg = Release|ARM
164
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|ARM.Build.0 = Release|ARM
165
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x64.ActiveCfg = Release|x64
166
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x64.Build.0 = Release|x64
167
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x86.ActiveCfg = Release|x86
168
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.Release|x86.Build.0 = Release|x86
169
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|ARM.ActiveCfg = Release|ARM
170
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|ARM.Build.0 = Release|ARM
171
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|x64.ActiveCfg = Release|x64
172
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|x64.Build.0 = Release|x64
173
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|x86.ActiveCfg = Release|x86
174
-		{C7673AD5-E3AA-468C-A5FD-FA38154E205C}.ReleaseBundle|x86.Build.0 = Release|x86
175
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|ARM.ActiveCfg = Debug|ARM
176
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|ARM.Build.0 = Debug|ARM
177
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|x64.ActiveCfg = Debug|x64
178
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|x64.Build.0 = Debug|x64
179
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|x86.ActiveCfg = Debug|x86
180
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Debug|x86.Build.0 = Debug|x86
181
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|ARM.ActiveCfg = Debug|ARM
182
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|ARM.Build.0 = Debug|ARM
183
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|x64.ActiveCfg = Debug|x64
184
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|x64.Build.0 = Debug|x64
185
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|x86.ActiveCfg = Debug|x86
186
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.DebugBundle|x86.Build.0 = Debug|x86
187
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|ARM.ActiveCfg = Debug|ARM
188
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|ARM.Build.0 = Debug|ARM
189
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|x64.ActiveCfg = Debug|x64
190
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|x64.Build.0 = Debug|x64
191
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|x86.ActiveCfg = Debug|x86
192
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Development|x86.Build.0 = Debug|x86
193
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|ARM.ActiveCfg = Release|ARM
194
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|ARM.Build.0 = Release|ARM
195
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|x64.ActiveCfg = Release|x64
196
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|x64.Build.0 = Release|x64
197
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|x86.ActiveCfg = Release|x86
198
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.Release|x86.Build.0 = Release|x86
199
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|ARM.ActiveCfg = Release|ARM
200
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|ARM.Build.0 = Release|ARM
201
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|x64.ActiveCfg = Release|x64
202
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|x64.Build.0 = Release|x64
203
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|x86.ActiveCfg = Release|x86
204
-		{E8F5F57F-757E-4237-AD23-F7A8755427CD}.ReleaseBundle|x86.Build.0 = Release|x86
205
-	EndGlobalSection
206
-	GlobalSection(SolutionProperties) = preSolution
207
-		HideSolutionNode = FALSE
208
-	EndGlobalSection
209
-EndGlobal

+ 0
- 8
example/windows/ViewShotExample/App.xaml Voir le fichier

@@ -1,8 +0,0 @@
1
-<Application
2
-    x:Class="ViewShotExample.App"
3
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
-    xmlns:local="using:ViewShotExample"
6
-    RequestedTheme="Light">
7
-
8
-</Application>

+ 0
- 147
example/windows/ViewShotExample/App.xaml.cs Voir le fichier

@@ -1,147 +0,0 @@
1
-using ReactNative;
2
-using ReactNative.Modules.Launch;
3
-using System;
4
-using Windows.ApplicationModel;
5
-using Windows.ApplicationModel.Activation;
6
-using Windows.UI.Core;
7
-using Windows.UI.Xaml;
8
-using Windows.UI.Xaml.Controls;
9
-using Windows.UI.Xaml.Navigation;
10
-
11
-namespace ViewShotExample
12
-{
13
-    /// <summary>
14
-    /// Provides application-specific behavior to supplement the default Application class.
15
-    /// </summary>
16
-    sealed partial class App : Application
17
-    {
18
-        private readonly ReactPage _reactPage;
19
-
20
-        /// <summary>
21
-        /// Initializes the singleton application object.  This is the first line of authored code
22
-        /// executed, and as such is the logical equivalent of main() or WinMain().
23
-        /// </summary>
24
-        public App()
25
-        {
26
-            this.InitializeComponent();
27
-            this.Suspending += OnSuspending;
28
-            this.Resuming += OnResuming;
29
-
30
-            _reactPage = new MainPage();
31
-        }
32
-
33
-        /// <summary>
34
-        /// Invoked when the application is launched normally by the end user.  Other entry points
35
-        /// will be used such as when the application is launched to open a specific file.
36
-        /// </summary>
37
-        /// <param name="e">Details about the launch request and process.</param>
38
-        protected override void OnLaunched(LaunchActivatedEventArgs e)
39
-        {
40
-            base.OnLaunched(e);
41
-            OnCreate(e.Arguments);
42
-        }
43
-
44
-        /// <summary>
45
-        /// Invoked when the application is activated.
46
-        /// </summary>
47
-        /// <param name="args">The activated event arguments.</param>
48
-        protected override void OnActivated(IActivatedEventArgs args)
49
-        {
50
-            base.OnActivated(args);
51
-
52
-            switch (args.Kind)
53
-            {
54
-                case ActivationKind.Protocol:
55
-                case ActivationKind.ProtocolForResults:
56
-                    var protocolArgs = (IProtocolActivatedEventArgs)args;
57
-                    LauncherModule.SetActivatedUrl(protocolArgs.Uri.AbsoluteUri);
58
-                    break;
59
-            }
60
-
61
-            if (args.PreviousExecutionState != ApplicationExecutionState.Running &&
62
-                args.PreviousExecutionState != ApplicationExecutionState.Suspended)
63
-            {
64
-                OnCreate(null);
65
-            }
66
-        }
67
-
68
-        /// <summary>
69
-        /// Called whenever the app is opened to initia
70
-        /// </summary>
71
-        /// <param name="arguments"></param>
72
-        private void OnCreate(string arguments)
73
-        {
74
-            _reactPage.OnResume(Exit);
75
-
76
-#if DEBUG
77
-            if (System.Diagnostics.Debugger.IsAttached)
78
-            {
79
-                this.DebugSettings.EnableFrameRateCounter = true;
80
-            }
81
-
82
-            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
83
-                AppViewBackButtonVisibility.Visible;
84
-#endif
85
-
86
-            Frame rootFrame = Window.Current.Content as Frame;
87
-
88
-            // Do not repeat app initialization when the Window already has content,
89
-            // just ensure that the window is active
90
-            if (rootFrame == null)
91
-            {
92
-                _reactPage.OnCreate(arguments);
93
-
94
-                // Create a Frame to act as the navigation context and navigate to the first page
95
-                rootFrame = new Frame();
96
-
97
-                rootFrame.NavigationFailed += OnNavigationFailed;
98
-
99
-                // Place the frame in the current Window
100
-                Window.Current.Content = rootFrame;
101
-            }
102
-
103
-            if (rootFrame.Content == null)
104
-            {
105
-                // When the navigation stack isn't restored navigate to the first page,
106
-                // configuring the new page by passing required information as a navigation
107
-                // parameter
108
-                rootFrame.Content = _reactPage;
109
-            }
110
-
111
-            // Ensure the current window is active
112
-            Window.Current.Activate();
113
-        }
114
-
115
-        /// <summary>
116
-        /// Invoked when Navigation to a certain page fails
117
-        /// </summary>
118
-        /// <param name="sender">The Frame which failed navigation</param>
119
-        /// <param name="e">Details about the navigation failure</param>
120
-        private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
121
-        {
122
-            throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
123
-        }
124
-
125
-        /// <summary>
126
-        /// Invoked when application execution is being suspended.  Application state is saved
127
-        /// without knowing whether the application will be terminated or resumed with the contents
128
-        /// of memory still intact.
129
-        /// </summary>
130
-        /// <param name="sender">The source of the suspend request.</param>
131
-        /// <param name="e">Details about the suspend request.</param>
132
-        private void OnSuspending(object sender, SuspendingEventArgs e)
133
-        {
134
-            _reactPage.OnSuspend();
135
-        }
136
-
137
-        /// <summary>
138
-        /// Invoked when application execution is being resumed.
139
-        /// </summary>
140
-        /// <param name="sender">The source of the resume request.</param>
141
-        /// <param name="e">Details about the resume request.</param>
142
-        private void OnResuming(object sender, object e)
143
-        {
144
-            _reactPage.OnResume(Exit);
145
-        }
146
-    }
147
-}

BIN
example/windows/ViewShotExample/Assets/LockScreenLogo.scale-200.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/SplashScreen.scale-200.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/Square150x150Logo.scale-200.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/Square44x44Logo.scale-200.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/StoreLogo.png Voir le fichier


BIN
example/windows/ViewShotExample/Assets/Wide310x150Logo.scale-200.png Voir le fichier


+ 0
- 56
example/windows/ViewShotExample/MainPage.cs Voir le fichier

@@ -1,56 +0,0 @@
1
-using ReactNative;
2
-using ReactNative.Modules.Core;
3
-using ReactNative.Shell;
4
-using RNViewShot;
5
-using System.Collections.Generic;
6
-using ReactNativeVideo;
7
-
8
-namespace ViewShotExample
9
-{
10
-    class MainPage : ReactPage
11
-    {
12
-        public override string MainComponentName
13
-        {
14
-            get
15
-            {
16
-                return "ViewShotExample";
17
-            }
18
-        }
19
-
20
-#if BUNDLE
21
-        public override string JavaScriptBundleFile
22
-        {
23
-            get
24
-            {
25
-                return "ms-appx:///ReactAssets/index.windows.bundle";
26
-            }
27
-        }
28
-#endif
29
-
30
-        public override List<IReactPackage> Packages
31
-        {
32
-            get
33
-            {
34
-                return new List<IReactPackage>
35
-                {
36
-                    new MainReactPackage(),
37
-                    new RNViewShotPackage(),
38
-                    new ReactVideoPackage(),
39
-                };
40
-            }
41
-        }
42
-
43
-        public override bool UseDeveloperSupport
44
-        {
45
-            get
46
-            {
47
-#if !BUNDLE || DEBUG
48
-                return true;
49
-#else
50
-                return false;
51
-#endif
52
-            }
53
-        }
54
-    }
55
-
56
-}

+ 0
- 49
example/windows/ViewShotExample/Package.appxmanifest Voir le fichier

@@ -1,49 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
3
-<Package
4
-  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5
-  xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
6
-  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
7
-  IgnorableNamespaces="uap mp">
8
-
9
-  <Identity
10
-    Name="f9dbffb7-9062-4d4a-b665-0131622ae226"
11
-    Publisher="CN=publisher"
12
-    Version="1.0.0.0" />
13
-
14
-  <mp:PhoneIdentity PhoneProductId="f9dbffb7-9062-4d4a-b665-0131622ae226" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
15
-
16
-  <Properties>
17
-    <DisplayName>ViewShotExample</DisplayName>
18
-    <PublisherDisplayName>React Native for UWP</PublisherDisplayName>
19
-    <Logo>Assets\StoreLogo.png</Logo>
20
-  </Properties>
21
-
22
-  <Dependencies>
23
-    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
24
-  </Dependencies>
25
-
26
-  <Resources>
27
-    <Resource Language="x-generate"/>
28
-  </Resources>
29
-
30
-  <Applications>
31
-    <Application Id="App"
32
-      Executable="$targetnametoken$.exe"
33
-      EntryPoint="ViewShotExample.App">
34
-      <uap:VisualElements
35
-        DisplayName="ViewShotExample"
36
-        Square150x150Logo="Assets\Square150x150Logo.png"
37
-        Square44x44Logo="Assets\Square44x44Logo.png"
38
-        Description="ViewShotExample"
39
-        BackgroundColor="transparent">
40
-        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
41
-        <uap:SplashScreen Image="Assets\SplashScreen.png" />
42
-      </uap:VisualElements>
43
-    </Application>
44
-  </Applications>
45
-
46
-  <Capabilities>
47
-    <Capability Name="internetClient" />
48
-  </Capabilities>
49
-</Package>

+ 0
- 29
example/windows/ViewShotExample/Properties/AssemblyInfo.cs Voir le fichier

@@ -1,29 +0,0 @@
1
-using System.Reflection;
2
-using System.Runtime.CompilerServices;
3
-using System.Runtime.InteropServices;
4
-
5
-// General Information about an assembly is controlled through the following 
6
-// set of attributes. Change these attribute values to modify the information
7
-// associated with an assembly.
8
-[assembly: AssemblyTitle("ViewShotExample")]
9
-[assembly: AssemblyDescription("")]
10
-[assembly: AssemblyConfiguration("")]
11
-[assembly: AssemblyCompany("")]
12
-[assembly: AssemblyProduct("ViewShotExample")]
13
-[assembly: AssemblyCopyright("Copyright ©  2016")]
14
-[assembly: AssemblyTrademark("")]
15
-[assembly: AssemblyCulture("")]
16
-
17
-// Version information for an assembly consists of the following four values:
18
-//
19
-//      Major Version
20
-//      Minor Version 
21
-//      Build Number
22
-//      Revision
23
-//
24
-// You can specify all the values or you can default the Build and Revision Numbers 
25
-// by using the '*' as shown below:
26
-// [assembly: AssemblyVersion("1.0.*")]
27
-[assembly: AssemblyVersion("1.0.0.0")]
28
-[assembly: AssemblyFileVersion("1.0.0.0")]
29
-[assembly: ComVisible(false)]

+ 0
- 31
example/windows/ViewShotExample/Properties/Default.rd.xml Voir le fichier

@@ -1,31 +0,0 @@
1
-<!--
2
-    This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
3
-    developers. However, you can modify these parameters to modify the behavior of the .NET Native
4
-    optimizer.
5
-
6
-    Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
7
-
8
-    To fully enable reflection for ViewShotExample.MyClass and all of its public/private members
9
-    <Type Name="ViewShotExample.MyClass" Dynamic="Required All"/>
10
-
11
-    To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
12
-    <TypeInstantiation Name="ViewShotExample.AppClass" Arguments="System.Int32" Activate="Required Public" />
13
-
14
-    Using the Namespace directive to apply reflection policy to all the types in a particular namespace
15
-    <Namespace Name="DataClasses.ViewModels" Seralize="All" />
16
--->
17
-
18
-<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
19
-  <Application>
20
-    <!--
21
-      An Assembly element with Name="*Application*" applies to all assemblies in
22
-      the application package. The asterisks are not wildcards.
23
-    -->
24
-    <Assembly Name="*Application*" Dynamic="Required All" />
25
-    
26
-    
27
-    <!-- Add your application specific runtime directives here. -->
28
-
29
-
30
-  </Application>
31
-</Directives>

+ 0
- 234
example/windows/ViewShotExample/ViewShotExample.csproj Voir le fichier

@@ -1,234 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
-  <PropertyGroup>
5
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
-    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7
-    <ProjectGuid>{385046CD-7621-4286-9E49-4CA26B4A9C23}</ProjectGuid>
8
-    <OutputType>AppContainerExe</OutputType>
9
-    <AppDesignerFolder>Properties</AppDesignerFolder>
10
-    <RootNamespace>ViewShotExample</RootNamespace>
11
-    <AssemblyName>ViewShotExample</AssemblyName>
12
-    <DefaultLanguage>en-US</DefaultLanguage>
13
-    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14
-    <TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
15
-    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
16
-    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
17
-    <FileAlignment>512</FileAlignment>
18
-    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19
-    <PackageCertificateKeyFile>ViewShotExample_TemporaryKey.pfx</PackageCertificateKeyFile>
20
-  </PropertyGroup>
21
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
22
-    <DebugSymbols>true</DebugSymbols>
23
-    <OutputPath>bin\x86\Debug\</OutputPath>
24
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
25
-    <NoWarn>;2008</NoWarn>
26
-    <DebugType>full</DebugType>
27
-    <PlatformTarget>x86</PlatformTarget>
28
-    <UseVSHostingProcess>false</UseVSHostingProcess>
29
-    <ErrorReport>prompt</ErrorReport>
30
-    <Prefer32Bit>true</Prefer32Bit>
31
-  </PropertyGroup>
32
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugBundle|x86'">
33
-    <DebugSymbols>true</DebugSymbols>
34
-    <OutputPath>bin\x86\DebugBundle\</OutputPath>
35
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
36
-    <NoWarn>;2008</NoWarn>
37
-    <NoStdLib>true</NoStdLib>
38
-    <DebugType>full</DebugType>
39
-    <PlatformTarget>x86</PlatformTarget>
40
-    <UseVSHostingProcess>false</UseVSHostingProcess>
41
-    <ErrorReport>prompt</ErrorReport>
42
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43
-    <Prefer32Bit>true</Prefer32Bit>
44
-  </PropertyGroup>
45
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
46
-    <OutputPath>bin\x86\Release\</OutputPath>
47
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
48
-    <Optimize>true</Optimize>
49
-    <NoWarn>;2008</NoWarn>
50
-    <DebugType>pdbonly</DebugType>
51
-    <PlatformTarget>x86</PlatformTarget>
52
-    <UseVSHostingProcess>false</UseVSHostingProcess>
53
-    <ErrorReport>prompt</ErrorReport>
54
-    <Prefer32Bit>true</Prefer32Bit>
55
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
56
-  </PropertyGroup>
57
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseBundle|x86'">
58
-    <OutputPath>bin\x86\ReleaseBundle\</OutputPath>
59
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
60
-    <Optimize>true</Optimize>
61
-    <NoWarn>;2008</NoWarn>
62
-    <NoStdLib>true</NoStdLib>
63
-    <DebugType>pdbonly</DebugType>
64
-    <PlatformTarget>x86</PlatformTarget>
65
-    <UseVSHostingProcess>false</UseVSHostingProcess>
66
-    <ErrorReport>prompt</ErrorReport>
67
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
68
-    <Prefer32Bit>true</Prefer32Bit>
69
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
70
-  </PropertyGroup>
71
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
72
-    <DebugSymbols>true</DebugSymbols>
73
-    <OutputPath>bin\ARM\Debug\</OutputPath>
74
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
75
-    <NoWarn>;2008</NoWarn>
76
-    <DebugType>full</DebugType>
77
-    <PlatformTarget>ARM</PlatformTarget>
78
-    <UseVSHostingProcess>false</UseVSHostingProcess>
79
-    <ErrorReport>prompt</ErrorReport>
80
-    <Prefer32Bit>true</Prefer32Bit>
81
-  </PropertyGroup>
82
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugBundle|ARM'">
83
-    <DebugSymbols>true</DebugSymbols>
84
-    <OutputPath>bin\ARM\DebugBundle\</OutputPath>
85
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
86
-    <NoWarn>;2008</NoWarn>
87
-    <NoStdLib>true</NoStdLib>
88
-    <DebugType>full</DebugType>
89
-    <PlatformTarget>ARM</PlatformTarget>
90
-    <UseVSHostingProcess>false</UseVSHostingProcess>
91
-    <ErrorReport>prompt</ErrorReport>
92
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
93
-    <Prefer32Bit>true</Prefer32Bit>
94
-  </PropertyGroup>
95
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
96
-    <OutputPath>bin\ARM\Release\</OutputPath>
97
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
98
-    <Optimize>true</Optimize>
99
-    <NoWarn>;2008</NoWarn>
100
-    <DebugType>pdbonly</DebugType>
101
-    <PlatformTarget>ARM</PlatformTarget>
102
-    <UseVSHostingProcess>false</UseVSHostingProcess>
103
-    <ErrorReport>prompt</ErrorReport>
104
-    <Prefer32Bit>true</Prefer32Bit>
105
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
106
-  </PropertyGroup>
107
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseBundle|ARM'">
108
-    <OutputPath>bin\ARM\ReleaseBundle\</OutputPath>
109
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
110
-    <Optimize>true</Optimize>
111
-    <NoWarn>;2008</NoWarn>
112
-    <NoStdLib>true</NoStdLib>
113
-    <DebugType>pdbonly</DebugType>
114
-    <PlatformTarget>ARM</PlatformTarget>
115
-    <UseVSHostingProcess>false</UseVSHostingProcess>
116
-    <ErrorReport>prompt</ErrorReport>
117
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
118
-    <Prefer32Bit>true</Prefer32Bit>
119
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
120
-  </PropertyGroup>
121
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
122
-    <DebugSymbols>true</DebugSymbols>
123
-    <OutputPath>bin\x64\Debug\</OutputPath>
124
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
125
-    <NoWarn>;2008</NoWarn>
126
-    <DebugType>full</DebugType>
127
-    <PlatformTarget>x64</PlatformTarget>
128
-    <UseVSHostingProcess>false</UseVSHostingProcess>
129
-    <ErrorReport>prompt</ErrorReport>
130
-    <Prefer32Bit>true</Prefer32Bit>
131
-  </PropertyGroup>
132
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugBundle|x64'">
133
-    <DebugSymbols>true</DebugSymbols>
134
-    <OutputPath>bin\x64\DebugBundle\</OutputPath>
135
-    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
136
-    <NoWarn>;2008</NoWarn>
137
-    <NoStdLib>true</NoStdLib>
138
-    <DebugType>full</DebugType>
139
-    <PlatformTarget>x64</PlatformTarget>
140
-    <UseVSHostingProcess>false</UseVSHostingProcess>
141
-    <ErrorReport>prompt</ErrorReport>
142
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
143
-    <Prefer32Bit>true</Prefer32Bit>
144
-  </PropertyGroup>
145
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
146
-    <OutputPath>bin\x64\Release\</OutputPath>
147
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
148
-    <Optimize>true</Optimize>
149
-    <NoWarn>;2008</NoWarn>
150
-    <DebugType>pdbonly</DebugType>
151
-    <PlatformTarget>x64</PlatformTarget>
152
-    <UseVSHostingProcess>false</UseVSHostingProcess>
153
-    <ErrorReport>prompt</ErrorReport>
154
-    <Prefer32Bit>true</Prefer32Bit>
155
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
156
-  </PropertyGroup>
157
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseBundle|x64'">
158
-    <OutputPath>bin\x64\ReleaseBundle\</OutputPath>
159
-    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;BUNDLE</DefineConstants>
160
-    <Optimize>true</Optimize>
161
-    <NoWarn>;2008</NoWarn>
162
-    <NoStdLib>true</NoStdLib>
163
-    <DebugType>pdbonly</DebugType>
164
-    <PlatformTarget>x64</PlatformTarget>
165
-    <UseVSHostingProcess>false</UseVSHostingProcess>
166
-    <ErrorReport>prompt</ErrorReport>
167
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
168
-    <Prefer32Bit>true</Prefer32Bit>
169
-    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
170
-  </PropertyGroup>
171
-  <ItemGroup>
172
-    <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
173
-    <None Include="project.json" />
174
-  </ItemGroup>
175
-  <ItemGroup>
176
-    <Compile Include="App.xaml.cs">
177
-      <DependentUpon>App.xaml</DependentUpon>
178
-    </Compile>
179
-    <Compile Include="MainPage.cs" />
180
-    <Compile Include="Properties\AssemblyInfo.cs" />
181
-  </ItemGroup>
182
-  <ItemGroup>
183
-    <AppxManifest Include="Package.appxmanifest">
184
-      <SubType>Designer</SubType>
185
-    </AppxManifest>
186
-    <None Include="ViewShotExample_TemporaryKey.pfx" />
187
-  </ItemGroup>
188
-  <ItemGroup>
189
-    <Content Include="Properties\Default.rd.xml" />
190
-    <Content Include="Assets\LockScreenLogo.scale-200.png" />
191
-    <Content Include="Assets\SplashScreen.scale-200.png" />
192
-    <Content Include="Assets\Square150x150Logo.scale-200.png" />
193
-    <Content Include="Assets\Square44x44Logo.scale-200.png" />
194
-    <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
195
-    <Content Include="Assets\StoreLogo.png" />
196
-    <Content Include="Assets\Wide310x150Logo.scale-200.png" />
197
-  </ItemGroup>
198
-  <ItemGroup>
199
-    <ApplicationDefinition Include="App.xaml">
200
-      <Generator>MSBuild:Compile</Generator>
201
-      <SubType>Designer</SubType>
202
-    </ApplicationDefinition>
203
-  </ItemGroup>
204
-  <ItemGroup>
205
-    <ProjectReference Include="..\..\node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj">
206
-      <Project>{e8f5f57f-757e-4237-ad23-f7a8755427cd}</Project>
207
-      <Name>ReactNativeVideo</Name>
208
-    </ProjectReference>
209
-    <ProjectReference Include="..\..\node_modules\react-native-view-shot\windows\RNViewShot\RNViewShot.csproj">
210
-      <Project>{391A35D0-FEBA-11E6-9171-BD5177E581B7}</Project>
211
-      <Name>RNViewShot</Name>
212
-    </ProjectReference>
213
-    <ProjectReference Include="..\..\node_modules\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj">
214
-      <Project>{c7673ad5-e3aa-468c-a5fd-fa38154e205c}</Project>
215
-      <Name>ReactNative</Name>
216
-    </ProjectReference>
217
-  </ItemGroup>
218
-  <ItemGroup Condition="'$(Configuration)' == 'ReleaseBundle' or '$(Configuration)' == 'DebugBundle'">
219
-    <Content Include="ReactAssets\**\*">
220
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
221
-    </Content>
222
-  </ItemGroup>
223
-  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
224
-    <VisualStudioVersion>14.0</VisualStudioVersion>
225
-  </PropertyGroup>
226
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
227
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
228
-       Other similar extension points exist, see Microsoft.Common.targets.
229
-  <Target Name="BeforeBuild">
230
-  </Target>
231
-  <Target Name="AfterBuild">
232
-  </Target>
233
-  -->
234
-</Project>

BIN
example/windows/ViewShotExample/ViewShotExample_TemporaryKey.pfx Voir le fichier


+ 0
- 17
example/windows/ViewShotExample/project.json Voir le fichier

@@ -1,17 +0,0 @@
1
-{
2
-  "dependencies": {
3
-    "Facebook.Yoga": "1.1.0.23-pre",
4
-    "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
5
-  },
6
-  "frameworks": {
7
-    "uap10.0": {}
8
-  },
9
-  "runtimes": {
10
-    "win10-arm": {},
11
-    "win10-arm-aot": {},
12
-    "win10-x86": {},
13
-    "win10-x86-aot": {},
14
-    "win10-x64": {},
15
-    "win10-x64-aot": {}
16
-  }
17
-}

+ 5100
- 3583
example/yarn.lock
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier