diff --git a/packages/expo-dev-launcher/android/src/debug/assets/expo_dev_launcher_android.bundle b/packages/expo-dev-launcher/android/src/debug/assets/expo_dev_launcher_android.bundle index a0080317c9813..cac198e2d083e 100644 --- a/packages/expo-dev-launcher/android/src/debug/assets/expo_dev_launcher_android.bundle +++ b/packages/expo-dev-launcher/android/src/debug/assets/expo_dev_launcher_android.bundle @@ -1052,7 +1052,7 @@ __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule" __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.View=e.StatusIndicator=e.Spacer=e.Row=e.Divider=void 0;var i=t(r(d[1])),o=r(d[2]),l=r(d[3]),s=r(d[4]),n=r(d[5]);function h(t,i){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);i&&(l=l.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),o.push.apply(o,l)}return o}function c(t){for(var o=1;o provider");return t}}),1002,[6,47,94,1003,188]); __d((function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0;var t=r(d[0]);Object.keys(t).forEach((function(u){"default"!==u&&"__esModule"!==u&&(e[u]=t[u])}));var u=r(d[1]);Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(e[t]=u[t])}))}),1003,[1004,1026]); @@ -1210,4 +1210,4 @@ __d((function(g,r,_i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule" __d((function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.UserProfileScreen=function(n){var h=n.navigation,P=(0,x.useUser)(),v=P.userData,S=P.selectedAccount,V=(0,p.useModalStack)(),L=(0,x.useUserActions)(),O=l.useState(!1),z=(0,o.default)(O,2),B=z[0],C=z[1],A=(M=(0,t.default)((function*(){C(!0),yield L.login('login'),C(!1)})),function(){return M.apply(this,arguments)}),k=(I=(0,t.default)((function*(){C(!0),yield L.login('signup'),C(!1)})),function(){return I.apply(this,arguments)}),D=null!=v;var I;var M;return(0,j.jsx)(u.SafeAreaView,{style:{flex:1},edges:['bottom'],children:(0,j.jsx)(c.ScrollView,{style:{flex:1},children:(0,j.jsxs)(s.View,{children:[(0,j.jsx)(y,{onClosePress:function(){h.goBack()}}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.View,{px:"medium",children:D?(0,j.jsx)(b,{userData:v,selectedAccount:S,onSelectAccount:function(n){L.setSelectedAccount(n.id)},onLogoutPress:function(){V.push((function(){return(0,j.jsx)(f.LogoutConfirmationModal,{onClosePress:function(){return V.pop()},onLogoutPress:(0,t.default)((function*(){yield L.logout(),V.pop()}))})}))}}):(0,j.jsx)(w,{isLoading:B,onLoginPress:A,onSignupPress:k})})]})})})};var t=n(r(d[1])),o=n(r(d[2])),s=r(d[3]),l=(function(n,t){if(!t&&n&&n.__esModule)return n;if(null===n||"object"!=typeof n&&"function"!=typeof n)return{default:n};var o=h(t);if(o&&o.has(n))return o.get(n);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in n)if("default"!==c&&Object.prototype.hasOwnProperty.call(n,c)){var u=l?Object.getOwnPropertyDescriptor(n,c):null;u&&(u.get||u.set)?Object.defineProperty(s,c,u):s[c]=n[c]}s.default=n,o&&o.set(n,s);return s})(r(d[4])),c=r(d[5]),u=r(d[6]),f=r(d[7]),p=r(d[8]),x=r(d[9]),j=r(d[10]);function h(n){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(h=function(n){return n?o:t})(n)}function y(n){var t=n.onClosePress;return(0,j.jsxs)(s.View,{children:[(0,j.jsx)(s.Spacer.Vertical,{size:"small"}),(0,j.jsxs)(s.Row,{align:"center",children:[(0,j.jsx)(s.View,{px:"medium",children:(0,j.jsx)(s.Heading,{size:"large",children:"Account"})}),(0,j.jsx)(s.Spacer.Horizontal,{}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{onPress:t,accessibilityLabel:"Go Back",rounded:"full",bg:"ghost",minScale:.9,children:(0,j.jsx)(s.View,{padding:"medium",rounded:"full",children:(0,j.jsx)(s.XIcon,{})})})]})]})}function w(n){var t=n.onLoginPress,o=n.onSignupPress,l=n.isLoading;return(0,j.jsxs)(s.View,{px:"small",py:"medium",bg:"default",rounded:"large",children:[(0,j.jsx)(s.Text,{color:"secondary",size:"small",leading:"large",children:"Log in or create an account to view local development servers and more."}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:t,disabled:l,accessibilityLabel:"Log in",children:(0,j.jsx)(s.View,{py:"small",children:(0,j.jsx)(s.Button.Text,{color:"tertiary",weight:"semibold",align:"center",children:"Log In"})})}),(0,j.jsx)(s.Spacer.Vertical,{size:"small"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"secondary",rounded:"medium",onPress:o,disabled:l,accessibilityLabel:"Sign Up",children:(0,j.jsx)(s.View,{py:"small",children:(0,j.jsx)(s.Button.Text,{color:"secondary",weight:"semibold",align:"center",children:"Sign Up"})})}),l&&(0,j.jsx)(s.View,{style:{position:'absolute',right:0,left:0,top:0,bottom:0,alignItems:'center',justifyContent:'center'},children:(0,j.jsx)(c.ActivityIndicator,{size:"small"})})]})}function b(n){var t=n.userData,o=n.selectedAccount,l=n.onSelectAccount,c=n.onLogoutPress,u=[],f=[];for(var p of t.accounts)null!=p&&(null!=p.owner?u.push(p):f.push(p));var x=[].concat(u,f);return(0,j.jsxs)(s.View,{children:[(0,j.jsx)(s.View,{children:x.map((function(n,t,c){var u,f,p,x=t===c.length-1,h=0===t,y=n.id===(null==o?void 0:o.id);return(0,j.jsxs)(s.Button.ScaleOnPressContainer,{onPress:function(){return l(n)},bg:"default",roundedBottom:x?'large':'none',roundedTop:h?'large':'none',children:[(0,j.jsxs)(s.Row,{align:"center",py:"small",px:"medium",bg:"default",children:[(0,j.jsx)(s.View,{rounded:"full",bg:"secondary",children:(0,j.jsx)(s.Image,{size:"large",rounded:"full",source:{uri:null==(u=n.owner)?void 0:u.profilePhoto}})}),(0,j.jsx)(s.Spacer.Horizontal,{size:"small"}),(0,j.jsx)(s.View,{children:(0,j.jsx)(s.Heading,{children:null!=(f=null==(p=n.owner)?void 0:p.username)?f:n.name})}),(0,j.jsx)(s.Spacer.Vertical,{}),y&&(0,j.jsx)(s.CheckIcon,{testID:"active-account-checkmark-"+n.id})]}),!x&&(0,j.jsx)(s.Divider,{})]},n.id)}))}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:c,children:(0,j.jsx)(s.View,{py:"small",rounded:"medium",children:(0,j.jsx)(s.Button.Text,{color:"tertiary",weight:"bold",align:"center",children:"Log Out"})})})]})}}),1155,[6,314,47,608,94,2,516,1156,1123,1115,188]); __d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.LogoutConfirmationModal=function(l){var s=l.onLogoutPress,u=l.onClosePress;return(0,o.jsxs)(n.BaseModal,{title:"Confirm logout",children:[(0,o.jsx)(t.Heading,{weight:"medium",children:"Are you sure you want to log out?"}),(0,o.jsx)(t.Spacer.Vertical,{size:"medium"}),(0,o.jsxs)(t.Row,{children:[(0,o.jsx)(t.View,{flex:"1",grow:"1",children:(0,o.jsx)(t.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:s,accessibilityLabel:"Log out",children:(0,o.jsx)(t.View,{padding:"small",rounded:"medium",children:(0,o.jsx)(t.Button.Text,{color:"tertiary",weight:"bold",align:"center",children:"Log Out"})})})}),(0,o.jsx)(t.Spacer.Horizontal,{size:"medium"}),(0,o.jsx)(t.View,{flex:"1",grow:"1",children:(0,o.jsx)(t.Button.ScaleOnPressContainer,{bg:"ghost",border:"ghost",rounded:"medium",onPress:u,children:(0,o.jsx)(t.View,{padding:"small",rounded:"medium",children:(0,o.jsx)(t.Button.Text,{color:"ghost",weight:"bold",align:"center",children:"Nevermind"})})})})]})]})};var t=r(d[0]),n=((function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=l(n);if(o&&o.has(t))return o.get(t);var s={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in t)if("default"!==c&&Object.prototype.hasOwnProperty.call(t,c)){var f=u?Object.getOwnPropertyDescriptor(t,c):null;f&&(f.get||f.set)?Object.defineProperty(s,c,f):s[c]=t[c]}s.default=t,o&&o.set(t,s)})(r(d[1])),r(d[2])),o=r(d[3]);function l(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(l=function(t){return t?o:n})(t)}}),1156,[608,94,1127,188]); __r(108); -__r(0); +__r(0); \ No newline at end of file diff --git a/packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts b/packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts index c63e82ad198a7..2de09212865ce 100644 --- a/packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts +++ b/packages/expo-dev-launcher/bundle/native-modules/DevLauncherInternal.ts @@ -1,5 +1,5 @@ -import { requireNativeModule } from 'expo-modules-core'; -import { NativeModules, NativeEventEmitter, EventSubscription, Platform } from 'react-native'; +import { requireNativeModule, EventEmitter } from 'expo-modules-core'; +import { NativeModules, NativeEventEmitter, Platform } from 'react-native'; import { RecentApp } from '../providers/RecentlyOpenedAppsProvider'; @@ -7,7 +7,8 @@ const DevLauncher = Platform.OS === 'ios' ? requireNativeModule('ExpoDevLauncherInternal') : NativeModules.EXDevLauncherInternal; -const EventEmitter = new NativeEventEmitter(DevLauncher); +const emitter = + Platform.OS === 'ios' ? new EventEmitter(DevLauncher) : new NativeEventEmitter(DevLauncher); const ON_NEW_DEEP_LINK_EVENT = 'expo.modules.devlauncher.onnewdeeplink'; @@ -71,8 +72,8 @@ export async function openCamera(): Promise { return await DevLauncher.openCamera(); } -export function addDeepLinkListener(callback: (string) => void): EventSubscription { - return EventEmitter.addListener(ON_NEW_DEEP_LINK_EVENT, callback); +export function addDeepLinkListener(callback: (string) => void) { + return emitter.addListener(ON_NEW_DEEP_LINK_EVENT, callback); } export type BuildInfo = { diff --git a/packages/expo-dev-launcher/ios/DevLauncherInternal.swift b/packages/expo-dev-launcher/ios/DevLauncherInternal.swift index dd4b798576637..ecc457bc31132 100644 --- a/packages/expo-dev-launcher/ios/DevLauncherInternal.swift +++ b/packages/expo-dev-launcher/ios/DevLauncherInternal.swift @@ -24,11 +24,11 @@ public class DevLauncherInternal: Module, EXDevLauncherPendingDeepLinkListener { ] } - OnCreate { + OnStartObserving { EXDevLauncherController.sharedInstance().pendingDeepLinkRegistry.subscribe(self) } - OnDestroy { + OnStopObserving { EXDevLauncherController.sharedInstance().pendingDeepLinkRegistry.unsubscribe(self) } diff --git a/packages/expo-dev-launcher/ios/main.jsbundle b/packages/expo-dev-launcher/ios/main.jsbundle index 7dc500b2924bd..361d3e133f8c5 100644 --- a/packages/expo-dev-launcher/ios/main.jsbundle +++ b/packages/expo-dev-launcher/ios/main.jsbundle @@ -1051,7 +1051,7 @@ __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule" __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.View=e.StatusIndicator=e.Spacer=e.Row=e.Divider=void 0;var i=t(r(d[1])),o=r(d[2]),l=r(d[3]),s=r(d[4]),n=r(d[5]);function h(t,i){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);i&&(l=l.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),o.push.apply(o,l)}return o}function c(t){for(var o=1;o provider");return t}}),1001,[6,47,94,1002,190]); __d((function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0;var t=r(d[0]);Object.keys(t).forEach((function(u){"default"!==u&&"__esModule"!==u&&(e[u]=t[u])}));var u=r(d[1]);Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(e[t]=u[t])}))}),1002,[1003,1025]); @@ -1209,4 +1209,4 @@ __d((function(g,r,_i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule" __d((function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.UserProfileScreen=function(n){var h=n.navigation,P=(0,x.useUser)(),v=P.userData,S=P.selectedAccount,V=(0,p.useModalStack)(),L=(0,x.useUserActions)(),O=l.useState(!1),z=(0,o.default)(O,2),B=z[0],C=z[1],A=(M=(0,t.default)((function*(){C(!0),yield L.login('login'),C(!1)})),function(){return M.apply(this,arguments)}),k=(I=(0,t.default)((function*(){C(!0),yield L.login('signup'),C(!1)})),function(){return I.apply(this,arguments)}),D=null!=v;var I;var M;return(0,j.jsx)(u.SafeAreaView,{style:{flex:1},edges:['bottom'],children:(0,j.jsx)(c.ScrollView,{style:{flex:1},children:(0,j.jsxs)(s.View,{children:[(0,j.jsx)(y,{onClosePress:function(){h.goBack()}}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.View,{px:"medium",children:D?(0,j.jsx)(b,{userData:v,selectedAccount:S,onSelectAccount:function(n){L.setSelectedAccount(n.id)},onLogoutPress:function(){V.push((function(){return(0,j.jsx)(f.LogoutConfirmationModal,{onClosePress:function(){return V.pop()},onLogoutPress:(0,t.default)((function*(){yield L.logout(),V.pop()}))})}))}}):(0,j.jsx)(w,{isLoading:B,onLoginPress:A,onSignupPress:k})})]})})})};var t=n(r(d[1])),o=n(r(d[2])),s=r(d[3]),l=(function(n,t){if(!t&&n&&n.__esModule)return n;if(null===n||"object"!=typeof n&&"function"!=typeof n)return{default:n};var o=h(t);if(o&&o.has(n))return o.get(n);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in n)if("default"!==c&&Object.prototype.hasOwnProperty.call(n,c)){var u=l?Object.getOwnPropertyDescriptor(n,c):null;u&&(u.get||u.set)?Object.defineProperty(s,c,u):s[c]=n[c]}s.default=n,o&&o.set(n,s);return s})(r(d[4])),c=r(d[5]),u=r(d[6]),f=r(d[7]),p=r(d[8]),x=r(d[9]),j=r(d[10]);function h(n){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(h=function(n){return n?o:t})(n)}function y(n){var t=n.onClosePress;return(0,j.jsxs)(s.View,{children:[(0,j.jsx)(s.Spacer.Vertical,{size:"small"}),(0,j.jsxs)(s.Row,{align:"center",children:[(0,j.jsx)(s.View,{px:"medium",children:(0,j.jsx)(s.Heading,{size:"large",children:"Account"})}),(0,j.jsx)(s.Spacer.Horizontal,{}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{onPress:t,accessibilityLabel:"Go Back",rounded:"full",bg:"ghost",minScale:.9,children:(0,j.jsx)(s.View,{padding:"medium",rounded:"full",children:(0,j.jsx)(s.XIcon,{})})})]})]})}function w(n){var t=n.onLoginPress,o=n.onSignupPress,l=n.isLoading;return(0,j.jsxs)(s.View,{px:"small",py:"medium",bg:"default",rounded:"large",children:[(0,j.jsx)(s.Text,{color:"secondary",size:"small",leading:"large",children:"Log in or create an account to view local development servers and more."}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:t,disabled:l,accessibilityLabel:"Log in",children:(0,j.jsx)(s.View,{py:"small",children:(0,j.jsx)(s.Button.Text,{color:"tertiary",weight:"semibold",align:"center",children:"Log In"})})}),(0,j.jsx)(s.Spacer.Vertical,{size:"small"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"secondary",rounded:"medium",onPress:o,disabled:l,accessibilityLabel:"Sign Up",children:(0,j.jsx)(s.View,{py:"small",children:(0,j.jsx)(s.Button.Text,{color:"secondary",weight:"semibold",align:"center",children:"Sign Up"})})}),l&&(0,j.jsx)(s.View,{style:{position:'absolute',right:0,left:0,top:0,bottom:0,alignItems:'center',justifyContent:'center'},children:(0,j.jsx)(c.ActivityIndicator,{size:"small"})})]})}function b(n){var t=n.userData,o=n.selectedAccount,l=n.onSelectAccount,c=n.onLogoutPress,u=[],f=[];for(var p of t.accounts)null!=p&&(null!=p.owner?u.push(p):f.push(p));var x=[].concat(u,f);return(0,j.jsxs)(s.View,{children:[(0,j.jsx)(s.View,{children:x.map((function(n,t,c){var u,f,p,x=t===c.length-1,h=0===t,y=n.id===(null==o?void 0:o.id);return(0,j.jsxs)(s.Button.ScaleOnPressContainer,{onPress:function(){return l(n)},bg:"default",roundedBottom:x?'large':'none',roundedTop:h?'large':'none',children:[(0,j.jsxs)(s.Row,{align:"center",py:"small",px:"medium",bg:"default",children:[(0,j.jsx)(s.View,{rounded:"full",bg:"secondary",children:(0,j.jsx)(s.Image,{size:"large",rounded:"full",source:{uri:null==(u=n.owner)?void 0:u.profilePhoto}})}),(0,j.jsx)(s.Spacer.Horizontal,{size:"small"}),(0,j.jsx)(s.View,{children:(0,j.jsx)(s.Heading,{children:null!=(f=null==(p=n.owner)?void 0:p.username)?f:n.name})}),(0,j.jsx)(s.Spacer.Vertical,{}),y&&(0,j.jsx)(s.CheckIcon,{testID:"active-account-checkmark-"+n.id})]}),!x&&(0,j.jsx)(s.Divider,{})]},n.id)}))}),(0,j.jsx)(s.Spacer.Vertical,{size:"medium"}),(0,j.jsx)(s.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:c,children:(0,j.jsx)(s.View,{py:"small",rounded:"medium",children:(0,j.jsx)(s.Button.Text,{color:"tertiary",weight:"bold",align:"center",children:"Log Out"})})})]})}}),1154,[6,314,47,607,94,2,515,1155,1122,1114,190]); __d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.LogoutConfirmationModal=function(l){var s=l.onLogoutPress,u=l.onClosePress;return(0,o.jsxs)(n.BaseModal,{title:"Confirm logout",children:[(0,o.jsx)(t.Heading,{weight:"medium",children:"Are you sure you want to log out?"}),(0,o.jsx)(t.Spacer.Vertical,{size:"medium"}),(0,o.jsxs)(t.Row,{children:[(0,o.jsx)(t.View,{flex:"1",grow:"1",children:(0,o.jsx)(t.Button.ScaleOnPressContainer,{bg:"tertiary",rounded:"medium",onPress:s,accessibilityLabel:"Log out",children:(0,o.jsx)(t.View,{padding:"small",rounded:"medium",children:(0,o.jsx)(t.Button.Text,{color:"tertiary",weight:"bold",align:"center",children:"Log Out"})})})}),(0,o.jsx)(t.Spacer.Horizontal,{size:"medium"}),(0,o.jsx)(t.View,{flex:"1",grow:"1",children:(0,o.jsx)(t.Button.ScaleOnPressContainer,{bg:"ghost",border:"ghost",rounded:"medium",onPress:u,children:(0,o.jsx)(t.View,{padding:"small",rounded:"medium",children:(0,o.jsx)(t.Button.Text,{color:"ghost",weight:"bold",align:"center",children:"Nevermind"})})})})]})]})};var t=r(d[0]),n=((function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=l(n);if(o&&o.has(t))return o.get(t);var s={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in t)if("default"!==c&&Object.prototype.hasOwnProperty.call(t,c)){var f=u?Object.getOwnPropertyDescriptor(t,c):null;f&&(f.get||f.set)?Object.defineProperty(s,c,f):s[c]=t[c]}s.default=t,o&&o.set(t,s)})(r(d[1])),r(d[2])),o=r(d[3]);function l(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(l=function(t){return t?o:n})(t)}}),1155,[607,94,1126,190]); __r(109); -__r(0); +__r(0); \ No newline at end of file