From 746599025bf0d9836060401151ba09e941008ca3 Mon Sep 17 00:00:00 2001 From: Douglas Lowder Date: Sun, 8 Sep 2019 11:55:27 -0700 Subject: [PATCH 1/2] tvOS support --- templates/ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ios.js b/templates/ios.js index b9091a02..68cea0ed 100644 --- a/templates/ios.js +++ b/templates/ios.js @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.license = "MIT" # s.license = { :type => "MIT", :file => "FILE_LICENSE" } s.authors = { "${authorName}" => "${authorEmail}" } - s.platform = :ios, "7.0" + s.platforms = { :ios => "7.0", :tvos => "10.0" } s.source = { :git => "https://github.com/${githubAccount}/${moduleName}.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,swift}" From f57f999cb90051e043e2abc1503f2fb7f02266b6 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Sun, 8 Sep 2019 18:21:34 -0400 Subject: [PATCH 2/2] update tests using the following command: yarn jest -u --- .../__snapshots__/create-view-with-defaults.test.js.snap | 2 +- .../create-view-with-example-with-defaults.test.js.snap | 2 +- .../create-view-with-example-with-options.test.js.snap | 2 +- .../__snapshots__/create-view-with-options-for-ios.test.js.snap | 2 +- .../__snapshots__/create-with-defaults.test.js.snap | 2 +- .../create-with-example-with-defaults.test.js.snap | 2 +- .../recover-from-missing-package-scripts.test.js.snap | 2 +- .../__snapshots__/create-with-example-with-options.test.js.snap | 2 +- .../__snapshots__/create-with-name-in-camel-case.test.js.snap | 2 +- .../__snapshots__/create-with-options-for-ios.test.js.snap | 2 +- .../platforms-array/__snapshots__/platforms-array.test.js.snap | 2 +- .../__snapshots__/platforms-comma-separated.test.js.snap | 2 +- .../__snapshots__/create-with-custom-module-prefix.test.js.snap | 2 +- .../__snapshots__/create-with-module-name.test.js.snap | 2 +- .../__snapshots__/cli-command-func-with-options.test.js.snap | 2 +- .../create-with-example-with-defaults.test.js.snap | 2 +- .../__snapshots__/with-yarn-error-logging.test.js.snap | 2 +- .../__snapshots__/create-with-example-with-options.test.js.snap | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap index 8f2f5b49..6e0f9f71 100644 --- a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap @@ -441,7 +441,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap index d2233b45..0959dd28 100644 --- a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap @@ -446,7 +446,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap index 02fe86c9..6b71ec56 100644 --- a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap @@ -446,7 +446,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap b/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap index e13425f0..af492493 100644 --- a/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap @@ -176,7 +176,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap index 3b1ebb5e..a04de89f 100644 --- a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 235633a3..2b5692d3 100644 --- a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -444,7 +444,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap index 1309a470..937f63e3 100644 --- a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap +++ b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap @@ -444,7 +444,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap index cf0a35c2..a2232c97 100644 --- a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -444,7 +444,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap index fd8f5c28..14142190 100644 --- a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap +++ b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap b/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap index f7e18061..b3ec9d85 100644 --- a/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap +++ b/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap @@ -176,7 +176,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap index 3802209b..3603d56b 100644 --- a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap index ded5b0f0..d6d1ffe7 100644 --- a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap index 6552d5f5..02fd40c3 100644 --- a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap +++ b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/custom-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap index 75d01fe0..78dad1ef 100644 --- a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap +++ b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap @@ -439,7 +439,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/custom-native-module.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-mocks/cli/command/func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap b/tests/with-mocks/cli/command/func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap index f51fae06..260b73bd 100644 --- a/tests/with-mocks/cli/command/func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap +++ b/tests/with-mocks/cli/command/func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap @@ -433,7 +433,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 19a1a7fa..c67e7e23 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -499,7 +499,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap index 7ac16a48..caf4871e 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap @@ -499,7 +499,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Your Name\\" => \\"yourname@email.com\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/github_account/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\" diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 918424c2..edb365e5 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -493,7 +493,7 @@ Pod::Spec.new do |s| s.license = \\"MIT\\" # s.license = { :type => \\"MIT\\", :file => \\"FILE_LICENSE\\" } s.authors = { \\"Alice\\" => \\"contact@alice.me\\" } - s.platform = :ios, \\"7.0\\" + s.platforms = { :ios => \\"7.0\\", :tvos => \\"10.0\\" } s.source = { :git => \\"https://github.com/alicebits/react-native-alice-bobbi.git\\", :tag => \\"#{s.version}\\" } s.source_files = \\"ios/**/*.{h,m,swift}\\"