Skip to content

Commit

Permalink
let other react-native APP which use more popular react-native-blob-u…
Browse files Browse the repository at this point in the history
…til instead of rn-fetch-blob avoid ios compile error `ld: 5 duplicate symbols for architecture arm64`
  • Loading branch information
flyskywhy committed Nov 9, 2022
1 parent 263bfe9 commit 8641553
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"redux-thunk": "^2.2.0",
"redux-undo": "^1.0.0-beta9-7",
"resize-image-data": "0.3.1",
"rn-fetch-blob": "0.12.0"
"react-native-blob-util": "0.16.3"
},
"devDependencies": {
"@react-native-community/eslint-config": "3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/apptoolbox/Apptoolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Dimensions, Platform, StyleSheet, View} from 'react-native';
import RNSystemFileBrower from 'react-native-system-file-browser';
if (Platform.OS !== 'web') {
var RNFetchBlob = require('rn-fetch-blob').default;
var ReactNativeBlobUtil = require('react-native-blob-util').default;
}
// import decorateWithKeyBindings from '../../helpers/KeyBindings';

Expand Down Expand Up @@ -78,7 +78,7 @@ class Apptoolbox extends Component {
RNSystemFileBrower.openFileBrower(params).then((res) => {
if (res && typeof res.url === 'string') {
const callback = async (data) => {
let stat = await RNFetchBlob.fs.stat(
let stat = await ReactNativeBlobUtil.fs.stat(
data.file.replace(/^file:\/\//, ''),
);
this.props.setAnimationName(stat.filename);
Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/Newproject/Newproject.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from 'react-native';
import RNSystemFileBrower from 'react-native-system-file-browser';
if (Platform.OS !== 'web') {
var RNFetchBlob = require('rn-fetch-blob').default;
var ReactNativeBlobUtil = require('react-native-blob-util').default;
}

import ModalWindow from '../../modalwindow/Modalwindow';
Expand Down Expand Up @@ -67,7 +67,7 @@ class NewProjectModal extends Component {
if (Platform.OS === 'web') {
importedFileName = data.file.name || importedFileName;
} else {
let stat = await RNFetchBlob.fs.stat(data.file);
let stat = await ReactNativeBlobUtil.fs.stat(data.file);
importedFileName = stat.filename || importedFileName;
}
this.setState({
Expand Down

0 comments on commit 8641553

Please sign in to comment.