Skip to content

Commit

Permalink
mobile: rip out useDevTools development auth in favor of new setup
Browse files Browse the repository at this point in the history
  • Loading branch information
latter-bolden committed Mar 13, 2024
1 parent 3e84528 commit 7bdbf80
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 60 deletions.
2 changes: 0 additions & 2 deletions apps/tlon-mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
defaultShipLoginAccessCode: process.env.DEFAULT_SHIP_LOGIN_ACCESS_CODE,
recaptchaSiteKeyAndroid: process.env.RECAPTCHA_SITE_KEY_ANDROID,
recaptchaSiteKeyIOS: process.env.RECAPTCHA_SITE_KEY_IOS,
devLocal: Boolean(process.env.DEV_LOCAL),
devLocalCode: process.env.DEV_LOCAL_CODE,
},
ios: {
runtimeVersion: '4.0.0',
Expand Down
22 changes: 17 additions & 5 deletions apps/tlon-mobile/ios/Landscape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
mainGroup = 83CBB9F61A601CBA00E9B192;
packageReferences = (
70A62C5F2A5A6B1A00EBED16 /* XCRemoteSwiftPackageReference "SimpleKeychain" */,
70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire.git" */,
70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire" */,
70D3866D2A60A3B300AFB46E /* XCRemoteSwiftPackageReference "UrsusSigil" */,
);
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
Expand Down Expand Up @@ -1221,6 +1221,12 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -1330,6 +1336,12 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -1398,7 +1410,7 @@
minimumVersion = 1.0.0;
};
};
70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire.git" */ = {
70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
requirement = {
Expand All @@ -1422,7 +1434,7 @@
minimumVersion = 1.0.0;
};
};
70DBBFE32B7C60B50021EA96 /* XCRemoteSwiftPackageReference "Alamofire.git" */ = {
70DBBFE32B7C60B50021EA96 /* XCRemoteSwiftPackageReference "Alamofire" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
requirement = {
Expand All @@ -1448,7 +1460,7 @@
};
70D386472A6098F800AFB46E /* Alamofire */ = {
isa = XCSwiftPackageProductDependency;
package = 70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire.git" */;
package = 70D386462A6098F800AFB46E /* XCRemoteSwiftPackageReference "Alamofire" */;
productName = Alamofire;
};
70D3866E2A60A3B300AFB46E /* UrsusSigil */ = {
Expand All @@ -1463,7 +1475,7 @@
};
70DBBFE22B7C60B50021EA96 /* Alamofire */ = {
isa = XCSwiftPackageProductDependency;
package = 70DBBFE32B7C60B50021EA96 /* XCRemoteSwiftPackageReference "Alamofire.git" */;
package = 70DBBFE32B7C60B50021EA96 /* XCRemoteSwiftPackageReference "Alamofire" */;
productName = Alamofire;
};
70DBBFE42B7C60B50021EA96 /* UrsusSigil */ = {
Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
sqlite3: f163dbbb7aa3339ad8fc622782c2d9d7b72f7e9c
UMAppLoader: 5df85360d65cabaef544be5424ac64672e648482
Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312

PODFILE CHECKSUM: 82da24eb176d4abdeaf445b3581717ec492dd7e8

Expand Down
3 changes: 0 additions & 3 deletions apps/tlon-mobile/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
import { useTailwind } from 'tailwind-rn';

import { LoadingSpinner } from './components/LoadingSpinner';
import { DEV_LOCAL, DEV_LOCAL_CODE } from './constants';
import { ShipProvider, useShip } from './contexts/ship';
import * as db from './db';
import { useDeepLink } from './hooks/useDeepLink';
import { useIsDarkMode } from './hooks/useIsDarkMode';
import { useScreenOptions } from './hooks/useScreenOptions';
import { inviteShipWithLure } from './lib/hostingApi';
import { syncContacts } from './lib/sync';
import { useDevTools } from './lib/useDevTools';
import { TabStack } from './navigation/TabStack';
import { CheckVerifyScreen } from './screens/CheckVerifyScreen';
import { EULAScreen } from './screens/EULAScreen';
Expand All @@ -51,7 +49,6 @@ type Props = {
const OnboardingStack = createNativeStackNavigator<OnboardingStackParamList>();

const App = ({ wer: initialWer }: Props) => {
useDevTools({ enabled: DEV_LOCAL, localCode: DEV_LOCAL_CODE });
const isDarkMode = useIsDarkMode();
const tailwind = useTailwind();
const { isLoading, isAuthenticated, ship } = useShip();
Expand Down
5 changes: 3 additions & 2 deletions apps/tlon-mobile/src/components/SingletonWebview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { URL } from 'react-native-url-polyfill';
import { WebView } from 'react-native-webview';
import { useTailwind } from 'tailwind-rn';

import { DEV_LOCAL } from '../constants';
import { DEFAULT_SHIP_LOGIN_URL, DEFAULT_TLON_LOGIN_EMAIL } from '../constants';
import { useShip } from '../contexts/ship';
import { useWebViewContext } from '../contexts/webview/webview';
import { useWebView } from '../hooks/useWebView';
Expand Down Expand Up @@ -212,7 +212,8 @@ export const SingletonWebview = () => {
window.colorscheme="${nativeOptions.colorScheme}";
window.safeAreaInsets=${JSON.stringify(nativeOptions.safeAreaInsets)};
${
DEV_LOCAL
// in development, explicitly set Urbit runtime configured window vars
DEFAULT_SHIP_LOGIN_URL || DEFAULT_TLON_LOGIN_EMAIL
? ` window.our="${ship}"; window.ship="${ship?.slice(1)}"; `
: ''
}
Expand Down
3 changes: 0 additions & 3 deletions apps/tlon-mobile/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ export const DEFAULT_TLON_LOGIN_PASSWORD = extra.defaultTlonLoginPassword ?? '';
export const DEFAULT_SHIP_LOGIN_URL = extra.defaultShipLoginUrl ?? '';
export const DEFAULT_SHIP_LOGIN_ACCESS_CODE =
extra.defaultShipLoginAccessCode ?? '';

export const DEV_LOCAL = extra.devLocal ? Boolean(extra.devLocal) : false;
export const DEV_LOCAL_CODE = extra.devLocalCode ?? '';
44 changes: 0 additions & 44 deletions apps/tlon-mobile/src/lib/useDevTools.ts

This file was deleted.

0 comments on commit 7bdbf80

Please sign in to comment.