Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/lib/database/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Database } from '@nozbe/watermelondb';
import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';
import logger from '@nozbe/watermelondb/utils/common/logger';
import RNFetchBlob from 'rn-fetch-blob';

import Subscription from './model/Subscription';
import Room from './model/Room';
Expand All @@ -26,8 +25,9 @@ import migrations from './model/migrations';
import serversMigrations from './model/serversMigrations';

import { isIOS } from '../../utils/deviceInfo';
import appGroup from '../../utils/appGroup';

const appGroupPath = isIOS ? `${ RNFetchBlob.fs.syncPathAppGroup('group.ios.chat.rocket') }/` : '';
const appGroupPath = isIOS ? appGroup.path : '';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice


if (__DEV__ && isIOS) {
console.log(appGroupPath);
Expand Down
11 changes: 11 additions & 0 deletions app/utils/appGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NativeModules } from 'react-native';

import { isIOS } from './deviceInfo';

const { AppGroup } = NativeModules;

const appGroup = {
path: isIOS ? AppGroup.path : ''
};

export default appGroup;
11 changes: 11 additions & 0 deletions ios/AppGroup/AppGroup.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// AppGroup.m
// RocketChatRN
//
// Created by Djorkaeff Alexandre Vilela Pereira on 8/31/20.
// Copyright © 2020 Facebook. All rights reserved.
//

#import "React/RCTBridgeModule.h"
@interface RCT_EXTERN_MODULE(AppGroup, NSObject)
@end
26 changes: 26 additions & 0 deletions ios/AppGroup/AppGroup.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// AppGroup.swift
// RocketChatRN
//
// Created by Djorkaeff Alexandre Vilela Pereira on 8/31/20.
// Copyright © 2020 Facebook. All rights reserved.
//

import Foundation

@objc(AppGroup)
class AppGroup: NSObject {

@objc
func constantsToExport() -> [AnyHashable : Any]! {
// Get App Group directory
var path = ""
if let suiteName = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as? String {
if let directory = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: suiteName) {
path = directory.path
}
}

return ["path": "\(path)/"]
}
}
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,6 @@ PODS:
- React
- rn-extensions-share (2.4.0):
- React
- rn-fetch-blob (0.12.0):
- React-Core
- RNBootSplash (2.2.5):
- React
- RNCAsyncStorage (1.11.0):
Expand Down Expand Up @@ -614,7 +612,6 @@ DEPENDENCIES:
- ReactNativeKeyboardInput (from `../node_modules/react-native-keyboard-input`)
- ReactNativeKeyboardTrackingView (from `../node_modules/react-native-keyboard-tracking-view`)
- rn-extensions-share (from `../node_modules/rn-extensions-share`)
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- RNBootSplash (from `../node_modules/react-native-bootsplash`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
Expand Down Expand Up @@ -791,8 +788,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-keyboard-tracking-view"
rn-extensions-share:
:path: "../node_modules/rn-extensions-share"
rn-fetch-blob:
:path: "../node_modules/rn-fetch-blob"
RNBootSplash:
:path: "../node_modules/react-native-bootsplash"
RNCAsyncStorage:
Expand Down Expand Up @@ -939,7 +934,6 @@ SPEC CHECKSUMS:
ReactNativeKeyboardInput: c37e26821519869993b3b61844350feb9177ff37
ReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306
rn-extensions-share: 8db79372089567cbc5aefe8444869bbc808578d3
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNBootSplash: b3836aa90c5bec690c6cd3c9ab355fcf98d0fe1d
RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
Expand Down
1 change: 0 additions & 1 deletion ios/Pods/Headers/Private/rn-fetch-blob/IOS7Polyfill.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Private/rn-fetch-blob/RNFetchBlob.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Private/rn-fetch-blob/RNFetchBlobConst.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Private/rn-fetch-blob/RNFetchBlobFS.h

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/IOS7Polyfill.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/RNFetchBlob.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/RNFetchBlobConst.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/RNFetchBlobFS.h

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/RNFetchBlobNetwork.h

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ios/Pods/Headers/Public/rn-fetch-blob/RNFetchBlobRequest.h

This file was deleted.

21 changes: 0 additions & 21 deletions ios/Pods/Local Podspecs/rn-fetch-blob.podspec.json

This file was deleted.

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

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

Loading