upgraded RN to 0.67 to a point apps are building successfully

This commit is contained in:
Nouman Tahir 2022-03-01 17:36:05 +05:00
parent 0f7cc0a458
commit 0359567b64
22 changed files with 2115 additions and 1351 deletions

2
.bundle/config Normal file
View File

@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1

View File

@ -8,10 +8,6 @@
; Ignore polyfills ; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.* node_modules/react-native/Libraries/polyfills/.*
; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*
; Flow doesn't support platforms ; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js .*/Libraries/Utilities/LoadingView.js
@ -27,8 +23,9 @@ node_modules/react-native/flow/
[options] [options]
emoji=true emoji=true
esproposal.optional_chaining=enable exact_by_default=true
esproposal.nullish_coalescing=enable
format.bracket_spacing=false
module.file_ext=.js module.file_ext=.js
module.file_ext=.json module.file_ext=.json
@ -44,10 +41,6 @@ suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState suppress_type=$FlowFixMeState
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[lints] [lints]
sketchy-null-number=warn sketchy-null-number=warn
sketchy-null-mixed=warn sketchy-null-mixed=warn
@ -58,7 +51,6 @@ deprecated-type=warn
unsafe-getters-setters=warn unsafe-getters-setters=warn
unnecessary-invariant=warn unnecessary-invariant=warn
signature-verification-failure=warn signature-verification-failure=warn
deprecated-utility=error
[strict] [strict]
deprecated-type deprecated-type
@ -70,4 +62,4 @@ untyped-import
untyped-type-import untyped-type-import
[version] [version]
^0.122.0 ^0.162.0

1
.gitattributes vendored
View File

@ -1 +0,0 @@
*.pbxproj -text

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ build/
.gradle .gradle
local.properties local.properties
*.iml *.iml
*.hprof
# node.js # node.js
# #

View File

@ -3,4 +3,5 @@ module.exports = {
jsxBracketSameLine: true, jsxBracketSameLine: true,
singleQuote: true, singleQuote: true,
trailingComma: 'all', trailingComma: 'all',
arrowParens: 'avoid',
}; };

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.7.4

6
Gemfile Normal file
View File

@ -0,0 +1,6 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.4'
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

100
Gemfile.lock Normal file
View File

@ -0,0 +1,100 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.4.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.11.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.2)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.9)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.5.4)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
RUBY VERSION
ruby 2.7.4p191
BUNDLED WITH
2.2.27

View File

@ -11,3 +11,6 @@
# -keep class com.facebook.hermes.unicode.** { *; } # -keep class com.facebook.hermes.unicode.** { *; }
# -keep class com.facebook.jni.** { *; } # -keep class com.facebook.jni.** { *; }
# -keep class com.swmansion.reanimated.** { *; }
# -keep class com.facebook.react.turbomodule.** { *; }

View File

@ -4,5 +4,10 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" /> <application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest> </manifest>

View File

@ -21,6 +21,9 @@ import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.List; import java.util.List;
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
public class MainApplication extends MultiDexApplication implements ReactApplication { public class MainApplication extends MultiDexApplication implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@ -44,6 +47,11 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
protected String getJSMainModuleName() { protected String getJSMainModuleName() {
return "index"; return "index";
} }
@Override
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage();
}
}; };
@Override @Override

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
-->
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
</selector>
</inset>

2
android/gradlew vendored
View File

@ -82,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"` APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"` JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath # We build the pattern for arguments to be converted via cygpath

View File

@ -5,6 +5,9 @@ module.exports = (api) => {
if (babelEnv !== 'development') { if (babelEnv !== 'development') {
plugins.push(['transform-remove-console', { exclude: ['error', 'warn'] }]); plugins.push(['transform-remove-console', { exclude: ['error', 'warn'] }]);
} }
//Reanimated should be last plugin added in babel
plugins.push(['react-native-reanimated/plugin']);
return { return {
presets: ['module:metro-react-native-babel-preset'], presets: ['module:metro-react-native-babel-preset'],
sourceMaps: true, sourceMaps: true,

View File

@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native'; import { AppRegistry, LogBox } from 'react-native';
import AppCenter from 'appcenter'; import AppCenter from 'appcenter';
import { name as appName } from './app.json'; import { name as appName } from './app.json';
import 'core-js'; import 'core-js';

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,11 @@
moduleName:@"Ecency" moduleName:@"Ecency"
initialProperties:nil]; initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor systemBackgroundColor];
} else {
rootView.backgroundColor = [UIColor whiteColor];
}
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new]; UIViewController *rootViewController = [UIViewController new];

View File

@ -1,7 +1,7 @@
require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0' platform :ios, '11.0'
target 'Ecency' do target 'Ecency' do
config = use_native_modules! config = use_native_modules!

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ module.exports = {
getTransformOptions: async () => ({ getTransformOptions: async () => ({
transform: { transform: {
experimentalImportSupport: false, experimentalImportSupport: false,
inlineRequires: false, inlineRequires: true,
}, },
}), }),
}, },

View File

@ -27,6 +27,7 @@
"postinstall": "node_modules/.bin/rn-nodeify --install --hack --yarn && cd ios && pod install" "postinstall": "node_modules/.bin/rn-nodeify --install --hack --yarn && cd ios && pod install"
}, },
"dependencies": { "dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.5.5",
"@bugsnag/react-native": "^7.11.0", "@bugsnag/react-native": "^7.11.0",
"@ecency/render-helper": "^2.2.16", "@ecency/render-helper": "^2.2.16",
@ -41,15 +42,16 @@
"@react-native-community/cli-platform-ios": "^4.10.1", "@react-native-community/cli-platform-ios": "^4.10.1",
"@react-native-community/netinfo": "^5.3.3", "@react-native-community/netinfo": "^5.3.3",
"@react-native-community/push-notification-ios": "^1.2.0", "@react-native-community/push-notification-ios": "^1.2.0",
"@react-native-community/toolbar-android": "^0.1.0-rc.2", "@react-native-community/toolbar-android": "^0.2.1",
"@react-native-firebase/analytics": "^7.3.1", "@react-native-community/viewpager": "^5.0.11",
"@react-native-firebase/app": "^8.4.7", "@react-native-firebase/analytics": "^10.0.0",
"@react-native-firebase/dynamic-links": "^7.4.2", "@react-native-firebase/app": "^10.0.0",
"@react-native-firebase/messaging": "^7.4.2", "@react-native-firebase/dynamic-links": "^10.0.0",
"@react-native-firebase/messaging": "^10.0.0",
"@tradle/react-native-http": "^2.0.0", "@tradle/react-native-http": "^2.0.0",
"appcenter": "^4.1.0", "appcenter": "4.1.0",
"appcenter-analytics": "^4.1.0", "appcenter-analytics": "4.1.0",
"appcenter-crashes": "^4.1.0", "appcenter-crashes": "4.1.0",
"assert": "^1.1.1", "assert": "^1.1.1",
"axios": "^0.21.2", "axios": "^0.21.2",
"browserify-zlib": "~0.1.4", "browserify-zlib": "~0.1.4",
@ -76,9 +78,9 @@
"process": "^0.11.0", "process": "^0.11.0",
"punycode": "^1.2.4", "punycode": "^1.2.4",
"querystring-es3": "~0.2.0", "querystring-es3": "~0.2.0",
"react": "16.13.1", "react": "17.0.2",
"react-intl": "^3.9.2", "react-intl": "^3.9.2",
"react-native": "0.63.4", "react-native": "0.67.3",
"react-native-actions-sheet": "^0.5.8", "react-native-actions-sheet": "^0.5.8",
"react-native-actionsheet": "ecency/react-native-actionsheet", "react-native-actionsheet": "ecency/react-native-actionsheet",
"react-native-animatable": "^1.3.3", "react-native-animatable": "^1.3.3",
@ -112,7 +114,7 @@
"react-native-push-notification": "^7.3.1", "react-native-push-notification": "^7.3.1",
"react-native-qrcode-svg": "^6.0.3", "react-native-qrcode-svg": "^6.0.3",
"react-native-randombytes": "^3.6.1", "react-native-randombytes": "^3.6.1",
"react-native-reanimated": "^1", "react-native-reanimated": "^2.4.1",
"react-native-receive-sharing-intent": "ecency/react-native-receive-sharing-intent", "react-native-receive-sharing-intent": "ecency/react-native-receive-sharing-intent",
"react-native-render-html": "^6.0.5", "react-native-render-html": "^6.0.5",
"react-native-restart": "^0.0.23", "react-native-restart": "^0.0.23",
@ -124,8 +126,8 @@
"react-native-splash-screen": "^3.2.0", "react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1", "react-native-svg": "^12.1.1",
"react-native-swiper": "^1.6.0-rc.3", "react-native-swiper": "^1.6.0-rc.3",
"react-native-tcp": "^3.2.1", "react-native-tcp": "^4.0.0",
"react-native-udp": "^2.1.0", "react-native-udp": "^4.1.4",
"react-native-unique-id": "^2.0.0", "react-native-unique-id": "^2.0.0",
"react-native-vector-icons": "^6.6.0", "react-native-vector-icons": "^6.6.0",
"react-native-version": "^4.0.0", "react-native-version": "^4.0.0",
@ -184,6 +186,7 @@
"metro-react-native-babel-preset": "^0.60.0", "metro-react-native-babel-preset": "^0.60.0",
"prettier": "^2.0.2", "prettier": "^2.0.2",
"prettier-eslint": "^9.0.1", "prettier-eslint": "^9.0.1",
"react-native-codegen": "^0.0.13",
"react-test-renderer": "16.13.1", "react-test-renderer": "16.13.1",
"reactotron-react-native": "^5.0.0", "reactotron-react-native": "^5.0.0",
"reactotron-redux": "^3.1.3", "reactotron-redux": "^3.1.3",

2041
yarn.lock

File diff suppressed because it is too large Load Diff