Skip to content

Commit

Permalink
fix palette initilization for ios
Browse files Browse the repository at this point in the history
* Fix duplicate icons issue on ios build
oblador/react-native-vector-icons#1074 (comment)
  • Loading branch information
kamalkishor1991 committed Nov 19, 2021
1 parent 85ed5b9 commit 45d8a89
Show file tree
Hide file tree
Showing 30 changed files with 11,273 additions and 10,893 deletions.
22 changes: 11 additions & 11 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ActivityIndicator,
NativeModules,
StatusBar,
StyleSheet, Text,
StyleSheet,
View
} from "react-native";
import AboutUsScreen from "./screens/AboutUsScreen";
Expand All @@ -26,16 +26,16 @@ export default function App() {
useEffect(() => {
(async () => {
await applicationState.loadInitPaletteFromStore();
setIsPalettesLoaded(true);
const isFree =
setIsPalettesLoaded(true);
/* const isFree =
(await NativeModules.CromaModule.getConfigString("isProFree")) ===
"true";
if (isFree) {
applicationState.setPurchase({
platfrom: "android",
isProFree: true
});
}
"true";*/

applicationState.setPurchase({
platform: "android",
isProFree: true
});

})();
}, []);

Expand Down Expand Up @@ -81,7 +81,7 @@ export default function App() {
</CromaContext.Provider>
);

return MainContent;
return !isPalettesLoaded ? spinner : MainContent;
}

const styles = StyleSheet.create({
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/java/app/croma/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
rootProject.name = 'croma'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
2 changes: 1 addition & 1 deletion components/PaletteCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Colors from "../constants/Colors";
import { Share } from "react-native";

import MultiColorView from "./MultiColorView";
import { FontAwesome } from "react-native-vector-icons/";
import FontAwesome from "react-native-vector-icons/FontAwesome";
import Touchable from "react-native-platform-touchable";
import { CromaContext } from "../store/store";
import { logEvent } from "../libs/Helpers";
Expand Down
66 changes: 16 additions & 50 deletions ios/Croma.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ PODS:
- React-jsi (= 0.66.3)
- React-logger (= 0.66.3)
- React-perflogger (= 0.66.3)
- RNCAsyncStorage (1.15.11):
- React-Core
- RNFS (2.18.0):
- React
- RNGestureHandler (1.10.3):
Expand Down Expand Up @@ -440,6 +442,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
Expand Down Expand Up @@ -528,6 +531,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNCAsyncStorage:
:path: "../node_modules/@react-native-async-storage/async-storage"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
Expand Down Expand Up @@ -588,6 +593,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 50cfe7049167cfc7e83ac5542c6fff0c76791a9b
React-runtimeexecutor: bbbdb3d8fcf327c6e2249ee71b6ef1764b7dc266
ReactCommon: 9bac022ab71596f2b0fde1268272543184c63971
RNCAsyncStorage: eb05c0284dd6b50b32f92fad55e2a41e03358c43
RNFS: 3ab21fa6c56d65566d1fb26c2228e2b6132e5e32
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: 65583befd5706cc9c86ae9a081786181ced37b93
Expand Down
1 change: 1 addition & 0 deletions ios/Pods/Headers/Private/RNCAsyncStorage/RNCAsyncStorage.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ios/Pods/Headers/Public/RNCAsyncStorage/RNCAsyncStorage.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions ios/Pods/Local Podspecs/RNCAsyncStorage.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ios/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 45d8a89

Please sign in to comment.