Remove isOfficial from iOS
This commit is contained in:
parent
dba4a4ba1a
commit
c940a41bbe
|
@ -1,5 +1,3 @@
|
|||
import RNConfigReader from 'react-native-config-reader';
|
||||
|
||||
export const isFDroidBuild = RNConfigReader.FDROID_BUILD;
|
||||
|
||||
export const isOfficial = RNConfigReader.IS_OFFICIAL;
|
||||
|
|
|
@ -3,7 +3,6 @@ import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';
|
|||
import logger from '@nozbe/watermelondb/utils/common/logger';
|
||||
|
||||
import { appGroupPath } from './appGroup';
|
||||
import { isOfficial } from '../constants';
|
||||
import Subscription from './model/Subscription';
|
||||
import Room from './model/Room';
|
||||
import Message from './model/Message';
|
||||
|
@ -30,7 +29,7 @@ if (__DEV__) {
|
|||
console.log(`📂 ${appGroupPath}`);
|
||||
}
|
||||
|
||||
const getDatabasePath = (name: string) => `${appGroupPath}${name}${isOfficial ? '' : '-experimental'}.db`;
|
||||
const getDatabasePath = (name: string) => `${appGroupPath}${name}.db`;
|
||||
|
||||
export const getDatabase = (database = ''): Database => {
|
||||
const path = database.replace(/(^\w+:|^)\/\//, '').replace(/\//g, '.');
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>IS_OFFICIAL</key>
|
||||
<false/>
|
||||
<key>KeychainGroup</key>
|
||||
<string>$(AppIdentifierPrefix)chat.rocket.reactnative</string>
|
||||
<key>NSExtension</key>
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>IS_OFFICIAL</key>
|
||||
<false/>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>KeychainGroup</key>
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
<string>4.40.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>IS_OFFICIAL</key>
|
||||
<false/>
|
||||
<key>KeychainGroup</key>
|
||||
<string>$(AppIdentifierPrefix)chat.rocket.reactnative</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
|
|
@ -25,8 +25,7 @@ final class Database {
|
|||
init(server: String) {
|
||||
if let url = URL(string: server) {
|
||||
if let domain = url.domain, let directory = directory {
|
||||
let isOfficial = Bundle.main.object(forInfoDictionaryKey: "IS_OFFICIAL") as? Bool ?? false
|
||||
self.database = WatermelonDB.Database(path: "\(directory)/\(domain)\(isOfficial ? "" : "-experimental").db")
|
||||
self.database = WatermelonDB.Database(path: "\(directory)/\(domain).db")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue