docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep add keep keep keep keep keep keep
<mask> YG_NODE_STYLE_PROPERTY(YGPositionType, PositionType, positionType); <mask> YG_NODE_STYLE_PROPERTY(YGWrap, FlexWrap, flexWrap); <mask> YG_NODE_STYLE_PROPERTY(YGOverflow, Overflow, overflow); <mask> <mask> YG_NODE_STYLE_PROPERTY(float, Flex, flex); <mask> YG_NODE_STYLE_PROPERTY(float, FlexGrow, flexGrow); <mask> YG_NODE_STYLE_PROPERTY(float, FlexShrink, flexShrink); <mask> YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); <mask> </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> remove WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); </s> add YG_NODE_STYLE_PROPERTY(float, Flex, flex); </s> add YG_NODE_STYLE_PROPERTY_IMPL(YGDisplay, Display, display, display); </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_IMPL(float, Flex, flex, flex); </s> remove YG_NODE_STYLE_PROPERTY_SETTER_UNIT_IMPL(float, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, FlexBasis, flexBasis, flexBasis); </s> remove YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position, YGValueUndefined); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border, YGValueZero); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace keep keep keep keep keep
<mask> YG_NODE_STYLE_PROPERTY(YGPositionType, PositionType, positionType); <mask> YG_NODE_STYLE_PROPERTY(YGWrap, FlexWrap, flexWrap); <mask> YG_NODE_STYLE_PROPERTY(YGOverflow, Overflow, overflow); <mask> <mask> WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); <mask> YG_NODE_STYLE_PROPERTY(float, FlexGrow, flexGrow); <mask> YG_NODE_STYLE_PROPERTY(float, FlexShrink, flexShrink); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); <mask> <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Position, position); </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> add YG_NODE_STYLE_PROPERTY(YGDisplay, Display, display); </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_IMPL(YGDisplay, Display, display, display); </s> add YG_NODE_STYLE_PROPERTY_IMPL(float, Flex, flex, flex); </s> remove YG_NODE_STYLE_PROPERTY_SETTER_UNIT_IMPL(float, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO(YGValue, Margin);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); <mask> YG_NODE_STYLE_PROPERTY(float, FlexGrow, flexGrow); <mask> YG_NODE_STYLE_PROPERTY(float, FlexShrink, flexShrink); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); <mask> <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Position, position); <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Margin, margin); <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Padding, padding); <mask> YG_NODE_STYLE_EDGE_PROPERTY(float, Border, border); </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> remove WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); </s> add YG_NODE_STYLE_PROPERTY(float, Flex, flex); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO(YGValue, Margin); </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Width, width); YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Height, height); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Width, width); YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Height, height); </s> remove YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position, YGValueUndefined); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border, YGValueZero); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border); </s> add YG_NODE_STYLE_PROPERTY(YGDisplay, Display, display); </s> remove YG_NODE_STYLE_PROPERTY_SETTER_UNIT_IMPL(float, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, FlexBasis, flexBasis, flexBasis);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep add keep keep keep keep keep
<mask> YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); <mask> <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Position, position); <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Margin, margin); <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Padding, padding); <mask> YG_NODE_STYLE_EDGE_PROPERTY(float, Border, border); <mask> <mask> YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Width, width); <mask> YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Height, height); </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Width, width); YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Height, height); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Width, width); YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, Height, height); </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); </s> remove YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position, YGValueUndefined); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border, YGValueZero); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border); </s> remove WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); </s> add YG_NODE_STYLE_PROPERTY(float, Flex, flex); </s> remove YG_NODE_STYLE_PROPERTY_SETTER_UNIT_IMPL(float, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY(YGDisplay, Display, display);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Margin, margin); <mask> YG_NODE_STYLE_EDGE_PROPERTY_UNIT(YGValue, Padding, padding); <mask> YG_NODE_STYLE_EDGE_PROPERTY(float, Border, border); <mask> <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Width, width); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, Height, height); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, MinWidth, minWidth); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, MinHeight, minHeight); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, MaxWidth, maxWidth); <mask> YG_NODE_STYLE_PROPERTY_UNIT(YGValue, MaxHeight, maxHeight); <mask> </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO(YGValue, Margin); </s> remove YG_NODE_STYLE_PROPERTY_UNIT_IMPL(YGValue, Width, width, dimensions[YGDimensionWidth]); YG_NODE_STYLE_PROPERTY_UNIT_IMPL(YGValue, Height, height, dimensions[YGDimensionHeight]); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Width, width, dimensions[YGDimensionWidth]); YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Height, height, dimensions[YGDimensionHeight]); </s> remove YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position, YGValueUndefined); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding, YGValueZero); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border, YGValueZero); </s> add YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Position, position, position); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Margin, margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO_IMPL(YGValue, Margin, margin); YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL(YGValue, Padding, padding, padding); YG_NODE_STYLE_EDGE_PROPERTY_IMPL(float, Border, border, border); </s> remove WIN_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex); </s> add YG_NODE_STYLE_PROPERTY(float, Flex, flex); </s> remove YG_NODE_STYLE_PROPERTY_SETTER_UNIT_IMPL(float, FlexBasis, flexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO_IMPL(YGValue, FlexBasis, flexBasis, flexBasis);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace keep keep keep keep keep
<mask> YG_NODE_LAYOUT_PROPERTY(float, Height); <mask> YG_NODE_LAYOUT_PROPERTY(YGDirection, Direction); <mask> <mask> // Get the computed values for these nodes after performing layout. If they were set using <mask> // pixel values then the returned value will be the same as YGNodeStyleGetXXX. However if <mask> // they were set using a percentage value then the returned value is the computed value used <mask> // during layout. <mask> YG_NODE_LAYOUT_EDGE_PROPERTY(float, Margin); <mask> YG_NODE_LAYOUT_EDGE_PROPERTY(float, Border); <mask> YG_NODE_LAYOUT_EDGE_PROPERTY(float, Padding); </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> remove </s> add if (child->style.display == YGDisplayNone) { continue; } </s> add // If this getRunLoop is used, current() will not work. std::function<void()> getUnregisteredRunLoop(); </s> remove // * The 'wrap' property supports only 'nowrap' (which is the default) or // 'wrap'. The // rarely-used 'wrap-reverse' is not supported. // * Rather than allowing arbitrary combinations of flexGrow, flexShrink and // flexBasis, this algorithm supports only the three most common // combinations: // flex: 0 is equiavlent to flex: 0 0 auto // flex: n (where n is a positive value) is equivalent to flex: n 1 auto // If POSITIVE_FLEX_IS_AUTO is 0, then it is equivalent to flex: n 0 0 // This is faster because the content doesn't need to be measured, but // it's // less flexible because the basis is always 0 and can't be overriden // with // the width/height attributes. // flex: -1 (or any negative value) is equivalent to flex: 0 1 auto // * Margins cannot be specified as 'auto'. They must be specified in terms of // pixel // values, and the default value is 0. // * Values of width, maxWidth, minWidth, height, maxHeight and minHeight must // be // specified as pixel values, not as percentages. // * There is no support for calculation of dimensions based on intrinsic // aspect ratios // (e.g. images). </s> add </s> add if (YGMarginTrailingValue(child, mainAxis)->unit == YGUnitAuto) { mainDim += remainingFreeSpace / numberOfAutoMarginsOnCurrentLine; } </s> add #include <folly/Conv.h> #include <folly/dynamic.h> </s> remove // We resolve main dimension to fit minimum and maximum values if (YGFloatIsUndefined(availableInnerMainDim)) { </s> add // If we don't measure with exact main dimension we want to ensure we don't violate min and max if (measureModeMainDim != YGMeasureModeExactly) {
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> WIN_EXPORT void YGSetLogger(YGLogger logger); <mask> WIN_EXPORT void YGLog(YGLogLevel level, const char *message, ...); <mask> <mask> WIN_EXPORT void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature, bool enabled); <mask> WIN_EXPORT bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature); <mask> <mask> WIN_EXPORT void <mask> YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree); <mask> <mask> YG_EXTERN_C_END </s> Update RN for Android Ran kernel, can load React Conf experience fbshipit-source-id: 2977793 </s> add WIN_EXPORT YGNodeRef YGNodeNewWithConfig(const YGConfigRef config); </s> remove inline bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature) { return experimentalFeatures[feature]; </s> add inline bool YGConfigIsExperimentalFeatureEnabled(const YGConfigRef config, const YGExperimentalFeature feature) { return config->experimentalFeatures[feature]; </s> add #define YG_NODE_STYLE_PROPERTY_UNIT_AUTO(type, name, paramName) \ YG_NODE_STYLE_PROPERTY_UNIT(type, name, paramName) \ WIN_EXPORT void YGNodeStyleSet##name##Auto(const YGNodeRef node); </s> add #define YG_NODE_STYLE_EDGE_PROPERTY_UNIT_AUTO(type, name) \ WIN_EXPORT void YGNodeStyleSet##name##Auto(const YGNodeRef node, const YGEdge edge); </s> remove static bool experimentalFeatures[YGExperimentalFeatureCount + 1]; void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature, bool enabled) { experimentalFeatures[feature] = enabled; </s> add void YGConfigSetExperimentalFeatureEnabled(const YGConfigRef config, const YGExperimentalFeature feature, const bool enabled) { config->experimentalFeatures[feature] = enabled; </s> remove YG_NODE_STYLE_PROPERTY_UNIT(YGValue, FlexBasis, flexBasis); </s> add YG_NODE_STYLE_PROPERTY_UNIT_AUTO(YGValue, FlexBasis, flexBasis);
https://github.com/expo/expo/commit/1d8f03248acb1f02dbe390e691ec4a15c039124a
android/ReactCommon/yoga/yoga/Yoga.h
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> exports[`renders Q 1`] = ` <mask> <div <mask> className="css-text-901oao" <mask> dir="auto" <mask> style={ <mask> Object { <mask> "fontStyle": "italic", <mask> } <mask> } <mask> > <mask> " <mask> demo <mask> " <mask> </div> </s> [packages] fix ci errors (#18028) </s> remove className="css-text-901oao" </s> add className="css-text-1rynq56 r-textDecorationLine-142tt33 r-textDecorationStyle-1a2p6p6" </s> remove style={ Object { "WebkitTextDecorationStyle": "solid", "textDecoration": "line-through", "textDecorationStyle": "solid", } } </s> add
https://github.com/expo/expo/commit/1ee4236c756e5df8493e697ce89943c903179d25
packages/html-elements/src/elements/__tests__/__snapshots__/Text-test.tsx.snap.web
keep keep keep replace keep replace replace replace replace replace replace replace keep
<mask> <mask> exports[`renders S 1`] = ` <mask> <div <mask> className="css-text-901oao" <mask> dir="auto" <mask> style={ <mask> Object { <mask> "WebkitTextDecorationStyle": "solid", <mask> "textDecoration": "line-through", <mask> "textDecorationStyle": "solid", <mask> } <mask> } <mask> > </s> [packages] fix ci errors (#18028) </s> remove style={ Object { "fontStyle": "italic", } } </s> add
https://github.com/expo/expo/commit/1ee4236c756e5df8493e697ce89943c903179d25
packages/html-elements/src/elements/__tests__/__snapshots__/Text-test.tsx.snap.web
keep keep add keep keep keep keep
<mask> 78D825312051226200CBD9D9 /* EXApiV2Client+EXRemoteNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 78D825302051226200CBD9D9 /* EXApiV2Client+EXRemoteNotifications.m */; }; <mask> 78F55D34D7E441D7B334C01E /* RNCMaskedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35005E2F0ED24BB98E4DC990 /* RNCMaskedView.m */; settings = {COMPILER_FLAGS = "-w"; }; }; <mask> 827A699919CED163689E655D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79E446843BA3BF044F621CBE /* ExpoModulesProvider.swift */; }; <mask> 8746D75E24D04B2300BFAD22 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8746D75C24D04B2300BFAD22 /* LaunchScreen.storyboard */; }; <mask> 8764788D270F1AF30076CA5F /* EXAppLoadingProgressWindowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8764788C270F1AF30076CA5F /* EXAppLoadingProgressWindowViewController.swift */; }; <mask> 8764788E270F1AF30076CA5F /* EXAppLoadingProgressWindowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8764788C270F1AF30076CA5F /* EXAppLoadingProgressWindowViewController.swift */; }; <mask> 8767F5B824D177AD009F9372 /* EXManagedAppSplashScreenConfigurationBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 8767F5B724D177AD009F9372 /* EXManagedAppSplashScreenConfigurationBuilder.m */; }; </s> [ios] Fix orientation lock not working on standalone apps (#15715) # Why regression of #14649, the new mechanism relies on rootViewController to pass `shouldAutorotate` and `supportedInterfaceOrientations`. however, in standalone apps, the rootViewController - `EXViewController` doesn't pass the receiver to `EXAppViewController`. fix #15666 # How create a dedicated `EXStandaloneViewController` to pass `shouldAutorotate` and `supportedInterfaceOrientations` to content view controller (`EXAppViewController`) # Test Plan ```sh $ et ios-shell-app --action build --type simulator --configuration Release $ et ios-shell-app --url https://exp.host/@kudochien/expo-mcve --action configure --type simulator -s 44.0.0 --archivePath shellAppBase-simulator/Build/Products/Release-iphonesimulator/ExpoKitApp.app --output app.tar.gz ``` verify the screen orientation is locked to portrait or not. </s> add 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXStandaloneViewController.m; sourceTree = "<group>"; }; 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXStandaloneViewController.h; sourceTree = "<group>"; }; </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */, 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */,
https://github.com/expo/expo/commit/2579285d6da14b67385ebe014abd812d74b2fb97
ios/Exponent.xcodeproj/project.pbxproj
keep add keep keep keep keep keep
<mask> 7F6CB974983B435DB3C2F7BE /* RNSVGForeignObject.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; path = RNSVGForeignObject.h; sourceTree = "<group>"; }; <mask> 80598B49D2DB4720B1935D89 /* RNSharedElementNodeManager.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; path = RNSharedElementNodeManager.m; sourceTree = "<group>"; }; <mask> 8746D75D24D04B2300BFAD22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; <mask> 8764788C270F1AF30076CA5F /* EXAppLoadingProgressWindowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EXAppLoadingProgressWindowViewController.swift; sourceTree = "<group>"; }; <mask> 8767F5B624D177AD009F9372 /* EXManagedAppSplashScreenConfigurationBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXManagedAppSplashScreenConfigurationBuilder.h; sourceTree = "<group>"; }; <mask> 8767F5B724D177AD009F9372 /* EXManagedAppSplashScreenConfigurationBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EXManagedAppSplashScreenConfigurationBuilder.m; sourceTree = "<group>"; }; <mask> 8767F97124D17CB2009F9372 /* EXManagedAppSplashScreenViewProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXManagedAppSplashScreenViewProvider.h; sourceTree = "<group>"; }; </s> [ios] Fix orientation lock not working on standalone apps (#15715) # Why regression of #14649, the new mechanism relies on rootViewController to pass `shouldAutorotate` and `supportedInterfaceOrientations`. however, in standalone apps, the rootViewController - `EXViewController` doesn't pass the receiver to `EXAppViewController`. fix #15666 # How create a dedicated `EXStandaloneViewController` to pass `shouldAutorotate` and `supportedInterfaceOrientations` to content view controller (`EXAppViewController`) # Test Plan ```sh $ et ios-shell-app --action build --type simulator --configuration Release $ et ios-shell-app --url https://exp.host/@kudochien/expo-mcve --action configure --type simulator -s 44.0.0 --archivePath shellAppBase-simulator/Build/Products/Release-iphonesimulator/ExpoKitApp.app --output app.tar.gz ``` verify the screen orientation is locked to portrait or not. </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; </s> add 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */, 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */, </s> add 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */,
https://github.com/expo/expo/commit/2579285d6da14b67385ebe014abd812d74b2fb97
ios/Exponent.xcodeproj/project.pbxproj
keep keep add keep keep keep keep
<mask> B526B5051E6A543500606CAB /* ExpoKit.m */, <mask> 0CC6F95C225F5B1B00322635 /* EXStandaloneAppDelegate.h */, <mask> 0CC6F95D225F5B1B00322635 /* EXStandaloneAppDelegate.m */, <mask> 0CC6F95F225F5C7700322635 /* ExpoKitAppDelegate.h */, <mask> 0CC6F960225F5C7700322635 /* ExpoKitAppDelegate.m */, <mask> B5D0D65A204F152D00DDFC99 /* EXViewController.h */, <mask> B5D0D65B204F152D00DDFC99 /* EXViewController.m */, </s> [ios] Fix orientation lock not working on standalone apps (#15715) # Why regression of #14649, the new mechanism relies on rootViewController to pass `shouldAutorotate` and `supportedInterfaceOrientations`. however, in standalone apps, the rootViewController - `EXViewController` doesn't pass the receiver to `EXAppViewController`. fix #15666 # How create a dedicated `EXStandaloneViewController` to pass `shouldAutorotate` and `supportedInterfaceOrientations` to content view controller (`EXAppViewController`) # Test Plan ```sh $ et ios-shell-app --action build --type simulator --configuration Release $ et ios-shell-app --url https://exp.host/@kudochien/expo-mcve --action configure --type simulator -s 44.0.0 --archivePath shellAppBase-simulator/Build/Products/Release-iphonesimulator/ExpoKitApp.app --output app.tar.gz ``` verify the screen orientation is locked to portrait or not. </s> add 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; </s> add 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXStandaloneViewController.m; sourceTree = "<group>"; }; 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXStandaloneViewController.h; sourceTree = "<group>"; };
https://github.com/expo/expo/commit/2579285d6da14b67385ebe014abd812d74b2fb97
ios/Exponent.xcodeproj/project.pbxproj
keep add keep keep keep keep
<mask> 8B1448C54DEB4CFDB79D7E45 /* RNCSafeAreaViewMode.m in Sources */, <mask> 6782D340A0024AF58B3805D0 /* RNSVGTopAlignedLabel.ios.m in Sources */, <mask> 827A699919CED163689E655D /* ExpoModulesProvider.swift in Sources */, <mask> 2E2E55ADAE3243799CC2CDFE /* RNCPicker.m in Sources */, <mask> C3C2D83067C44A679721209C /* RNCPickerLabel.m in Sources */, <mask> FBCC5A97F536402C98688A94 /* RNCPickerManager.m in Sources */, </s> [ios] Fix orientation lock not working on standalone apps (#15715) # Why regression of #14649, the new mechanism relies on rootViewController to pass `shouldAutorotate` and `supportedInterfaceOrientations`. however, in standalone apps, the rootViewController - `EXViewController` doesn't pass the receiver to `EXAppViewController`. fix #15666 # How create a dedicated `EXStandaloneViewController` to pass `shouldAutorotate` and `supportedInterfaceOrientations` to content view controller (`EXAppViewController`) # Test Plan ```sh $ et ios-shell-app --action build --type simulator --configuration Release $ et ios-shell-app --url https://exp.host/@kudochien/expo-mcve --action configure --type simulator -s 44.0.0 --archivePath shellAppBase-simulator/Build/Products/Release-iphonesimulator/ExpoKitApp.app --output app.tar.gz ``` verify the screen orientation is locked to portrait or not. </s> add 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; </s> add 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */, 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */, </s> add 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXStandaloneViewController.m; sourceTree = "<group>"; }; 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXStandaloneViewController.h; sourceTree = "<group>"; };
https://github.com/expo/expo/commit/2579285d6da14b67385ebe014abd812d74b2fb97
ios/Exponent.xcodeproj/project.pbxproj
keep keep add keep keep keep keep
<mask> F142184A262CB68600BB97E6 /* EXFileDownloader.m in Sources */, <mask> F142184B262CB68600BB97E6 /* RNSVGPath.m in Sources */, <mask> F142184C262CB68600BB97E6 /* EXScopedPermissions.m in Sources */, <mask> F142184D262CB68600BB97E6 /* RNSharedElementContent.m in Sources */, <mask> F1421850262CB68600BB97E6 /* EXConstantsBinding.m in Sources */, <mask> F1421851262CB68600BB97E6 /* ExpoKit.m in Sources */, <mask> F1421852262CB68600BB97E6 /* AIRGoogleMapOverlay.m in Sources */, </s> [ios] Fix orientation lock not working on standalone apps (#15715) # Why regression of #14649, the new mechanism relies on rootViewController to pass `shouldAutorotate` and `supportedInterfaceOrientations`. however, in standalone apps, the rootViewController - `EXViewController` doesn't pass the receiver to `EXAppViewController`. fix #15666 # How create a dedicated `EXStandaloneViewController` to pass `shouldAutorotate` and `supportedInterfaceOrientations` to content view controller (`EXAppViewController`) # Test Plan ```sh $ et ios-shell-app --action build --type simulator --configuration Release $ et ios-shell-app --url https://exp.host/@kudochien/expo-mcve --action configure --type simulator -s 44.0.0 --archivePath shellAppBase-simulator/Build/Products/Release-iphonesimulator/ExpoKitApp.app --output app.tar.gz ``` verify the screen orientation is locked to portrait or not. </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */, </s> add 8353B820277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; 8353B821277A17FC00AFCBDA /* EXStandaloneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */; }; </s> add 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */, 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */, </s> add 8353B81E277A17FB00AFCBDA /* EXStandaloneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXStandaloneViewController.m; sourceTree = "<group>"; }; 8353B81F277A17FC00AFCBDA /* EXStandaloneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXStandaloneViewController.h; sourceTree = "<group>"; };
https://github.com/expo/expo/commit/2579285d6da14b67385ebe014abd812d74b2fb97
ios/Exponent.xcodeproj/project.pbxproj
keep keep keep keep replace keep keep keep keep keep
<mask> export { FacebookAds }; <mask> export { default as AppLoading } from './launch/AppLoading'; <mask> export { SplashScreen }; <mask> export { default as registerRootComponent } from './launch/registerRootComponent'; <mask> export { default as Logs } from './logs/Logs'; <mask> export { default as Pedometer } from './Pedometer'; <mask> export { WebView } from './WebView'; <mask> <mask> declare var module: any; <mask> </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs'; </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs'));
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/Expo.ts
keep keep replace keep keep keep keep keep
<mask> import Constants from 'expo-constants'; <mask> <mask> import Logs from '../logs/Logs'; <mask> import RemoteLogging from '../logs/RemoteLogging'; <mask> <mask> if (Constants.manifest && Constants.manifest.logUrl) { <mask> // Enable logging to the Expo dev tools only if this JS is not running in a web browser (ex: the <mask> // remote debugger) </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs')); </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/environment/logging.fx.ts
keep keep keep replace keep keep keep keep keep
<mask> import Constants from 'expo-constants'; <mask> import prettyFormat from 'pretty-format'; <mask> import parseErrorStack, { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack'; <mask> import symbolicateStackTrace from './symbolicateStackTrace'; <mask> <mask> import { LogData, LogLevel } from './RemoteLogging'; <mask> import ReactNodeFormatter from './format/ReactNodeFormatter'; <mask> <mask> type SerializedData = { </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs'; </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs')); </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/logs/LogSerialization.ts
keep keep keep keep replace keep keep keep keep keep
<mask> import RemoteConsole from './RemoteConsole'; <mask> <mask> let _originalConsole: typeof console | null; <mask> <mask> function enableExpoCliLogging(): void { <mask> if (_originalConsole) { <mask> return; <mask> } <mask> <mask> _originalConsole = global.console; </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs')); </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs';
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/logs/Logs.ts
keep keep keep keep replace keep keep keep keep keep
<mask> _originalConsole = global.console; <mask> global.console = RemoteConsole.createRemoteConsole(global.console); <mask> } <mask> <mask> function disableExpoCliLogging(): void { <mask> if (!_originalConsole) { <mask> return; <mask> } <mask> <mask> global.console = _originalConsole; </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs')); </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs';
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/logs/Logs.ts
keep keep keep keep replace replace replace replace replace
<mask> <mask> global.console = _originalConsole; <mask> _originalConsole = null; <mask> } <mask> <mask> export default { <mask> enableExpoCliLogging, <mask> disableExpoCliLogging, <mask> }; </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); </s> add ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs')); </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs';
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/logs/Logs.ts
keep keep keep keep replace keep keep keep keep keep
<mask> let _originalConsole; <mask> <mask> beforeEach(() => { <mask> _originalConsole = global.console; <mask> ({ enableExpoCliLogging, disableExpoCliLogging } = require('../Logs').default); <mask> }); <mask> <mask> afterEach(() => { <mask> global.console = _originalConsole; <mask> jest.resetModules(); </s> Remove Logs on web (#4111) * Removed symbolicateStackTrace shim on web * Chagned export style for Logs * Added web shim for Logs </s> remove export default { enableExpoCliLogging, disableExpoCliLogging, }; </s> add </s> remove function disableExpoCliLogging(): void { </s> add export function disableExpoCliLogging(): void { </s> remove function enableExpoCliLogging(): void { </s> add export function enableExpoCliLogging(): void { </s> remove import symbolicateStackTrace from './symbolicateStackTrace'; </s> add import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace'; </s> remove export { default as Logs } from './logs/Logs'; </s> add import * as Logs from './logs/Logs'; export { Logs }; </s> remove import Logs from '../logs/Logs'; </s> add import * as Logs from '../logs/Logs';
https://github.com/expo/expo/commit/26f703292c8cec7d0c8bad4dcf34c61eaea782b5
packages/expo/src/logs/__tests__/Logs-test.ts
keep add keep keep keep keep
<mask> 78CEE2D41ACD07D70095B124 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 78CEE2D21ACD07D70095B124 /* LaunchScreen.xib */; }; <mask> 78CEE2ED1ACD22D90095B124 /* EXAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 78CEE2EC1ACD22D90095B124 /* EXAppDelegate.m */; }; <mask> 8454E6DA1D4E95B800B9E8EF /* EXBlurView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8454E6D91D4E95B800B9E8EF /* EXBlurView.m */; }; <mask> 8454E6DC1D4E960F00B9E8EF /* EXBlurViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8454E6DB1D4E960F00B9E8EF /* EXBlurViewManager.m */; }; <mask> 84EC97571D728A24009EEB4E /* AIRMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 84EC973A1D728A24009EEB4E /* AIRMap.m */; }; <mask> 84EC97581D728A24009EEB4E /* AIRMapCallout.m in Sources */ = {isa = PBXBuildFile; fileRef = 84EC973C1D728A24009EEB4E /* AIRMapCallout.m */; }; </s> Add NativeModules.ExponentUtil.reload() and backport to SDK10 fbshipit-source-id: a89c69f </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXUtil.h; sourceTree = "<group>"; }; 840D8EE11D8CB91E00CD88DE /* EXUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXUtil.m; sourceTree = "<group>"; }; </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */, 840D8EE11D8CB91E00CD88DE /* EXUtil.m */, </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */, </s> remove <string>1.8.1.103691</string> </s> add <string>1.9.0.103846</string>
https://github.com/expo/expo/commit/28029effe1508759468b54770ddb176212db4f71
ios/Exponent.xcodeproj/project.pbxproj
keep add keep keep keep keep
<mask> 78CEE2EB1ACD22D90095B124 /* EXAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXAppDelegate.h; sourceTree = "<group>"; }; <mask> 78CEE2EC1ACD22D90095B124 /* EXAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXAppDelegate.m; sourceTree = "<group>"; }; <mask> 8454E6D81D4E95A300B9E8EF /* EXBlurView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXBlurView.h; sourceTree = "<group>"; }; <mask> 8454E6D91D4E95B800B9E8EF /* EXBlurView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXBlurView.m; sourceTree = "<group>"; }; <mask> 8454E6DB1D4E960F00B9E8EF /* EXBlurViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXBlurViewManager.m; sourceTree = "<group>"; }; <mask> 8454E6DD1D4E963A00B9E8EF /* EXBlurViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EXBlurViewManager.h; sourceTree = "<group>"; }; </s> Add NativeModules.ExponentUtil.reload() and backport to SDK10 fbshipit-source-id: a89c69f </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 840D8EE11D8CB91E00CD88DE /* EXUtil.m */; }; </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */, 840D8EE11D8CB91E00CD88DE /* EXUtil.m */, </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */, </s> remove <string>1.8.1.103691</string> </s> add <string>1.9.0.103846</string>
https://github.com/expo/expo/commit/28029effe1508759468b54770ddb176212db4f71
ios/Exponent.xcodeproj/project.pbxproj
keep keep add keep keep keep keep keep keep
<mask> 88E089A31D6BC02200562FA1 /* EXAmplitude.m */, <mask> 88E089A81D6BCF4300562FA1 /* EXSegment.h */, <mask> 88E089AA1D6BCF5800562FA1 /* EXSegment.m */, <mask> ); <mask> path = Api; <mask> sourceTree = "<group>"; <mask> }; <mask> A1F37F631CEFD6B2001E9EFC /* Internal */ = { <mask> isa = PBXGroup; </s> Add NativeModules.ExponentUtil.reload() and backport to SDK10 fbshipit-source-id: a89c69f </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXUtil.h; sourceTree = "<group>"; }; 840D8EE11D8CB91E00CD88DE /* EXUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXUtil.m; sourceTree = "<group>"; }; </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 840D8EE11D8CB91E00CD88DE /* EXUtil.m */; }; </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */, </s> remove <string>1.8.1.103691</string> </s> add <string>1.9.0.103846</string>
https://github.com/expo/expo/commit/28029effe1508759468b54770ddb176212db4f71
ios/Exponent.xcodeproj/project.pbxproj
keep keep add keep keep keep keep
<mask> 1936012D1D67ABCF007C0EE0 /* RNSVGUse.m in Sources */, <mask> B5844C3F1D482EA40015C683 /* EXLocationRequester.m in Sources */, <mask> 193601211D67ABCF007C0EE0 /* RNSVGPercentageConverter.m in Sources */, <mask> 1936011C1D67ABCF007C0EE0 /* RNSVGNode.m in Sources */, <mask> 193601151D67ABCF007C0EE0 /* RNSVGGroupManager.m in Sources */, <mask> 1936010A1D67ABCF007C0EE0 /* RNSVGBrush.m in Sources */, <mask> 1936012F1D67ABCF007C0EE0 /* RNSVGViewBox.m in Sources */, </s> Add NativeModules.ExponentUtil.reload() and backport to SDK10 fbshipit-source-id: a89c69f </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 840D8EE11D8CB91E00CD88DE /* EXUtil.m */; }; </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */, 840D8EE11D8CB91E00CD88DE /* EXUtil.m */, </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXUtil.h; sourceTree = "<group>"; }; 840D8EE11D8CB91E00CD88DE /* EXUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXUtil.m; sourceTree = "<group>"; }; </s> remove <string>1.8.1.103691</string> </s> add <string>1.9.0.103846</string>
https://github.com/expo/expo/commit/28029effe1508759468b54770ddb176212db4f71
ios/Exponent.xcodeproj/project.pbxproj
keep keep keep keep replace keep keep keep keep keep
<mask> </array> <mask> </dict> <mask> </array> <mask> <key>EXClientVersion</key> <mask> <string>1.8.1.103691</string> <mask> <key>Fabric</key> <mask> <dict> <mask> <key>APIKey</key> <mask> <string>a25fafe9f9edee11a9882b32e0cd7a26df6e2c42</string> <mask> <key>Kits</key> </s> Add NativeModules.ExponentUtil.reload() and backport to SDK10 fbshipit-source-id: a89c69f </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */, </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */, 840D8EE11D8CB91E00CD88DE /* EXUtil.m */, </s> add 840D8EE01D8CB91E00CD88DE /* EXUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXUtil.h; sourceTree = "<group>"; }; 840D8EE11D8CB91E00CD88DE /* EXUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXUtil.m; sourceTree = "<group>"; }; </s> add 840D8EE21D8CB91E00CD88DE /* EXUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 840D8EE11D8CB91E00CD88DE /* EXUtil.m */; };
https://github.com/expo/expo/commit/28029effe1508759468b54770ddb176212db4f71
ios/Exponent/Supporting/Info.plist
keep replace keep replace keep
<mask> /** <mask> * **Standalone Apps Only**. URL scheme to link into your app. For example, if we set this to `'demo'`, then demo:// URLs would open your app when tapped. <mask> */ <mask> scheme?: string; <mask> /** </s> update scheme property to use array (#22324) # Why ENG-8466 <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove scheme?: string; </s> add scheme?: string | string[]; </s> remove * **Standalone Apps Only**. URL scheme to link into your app. For example, if we set this to `'demo'`, then demo:// URLs would open your app when tapped. </s> add * **Custom Builds Only**. URL scheme(s) to link into your app. For example, if we set this to `'demo'`, then demo:// URLs would open your app when tapped.
https://github.com/expo/expo/commit/2881437e71a97957467fe6cc0f978d0221794976
packages/@expo/config-types/build/ExpoConfig.d.ts
keep keep keep keep replace keep replace
<mask> */ <mask> silentLaunch?: boolean; <mask> }; <mask> /** <mask> * **Standalone Apps Only**. URL scheme to link into your app. For example, if we set this to `'demo'`, then demo:// URLs would open your app when tapped. <mask> */ <mask> scheme?: string; </s> update scheme property to use array (#22324) # Why ENG-8466 <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
https://github.com/expo/expo/commit/2881437e71a97957467fe6cc0f978d0221794976
packages/@expo/config-types/src/ExpoConfig.ts
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> - (NSDictionary<NSString *, NSString *> *)constantsToExport <mask> { <mask> NSDictionary *constants = @{ <mask> @"isSupported": [ARSession class] ? @(YES) : @(NO), <mask> @"frameDidUpdate": @"FRAME_DID_UPDATE", <mask> @"anchorsDidUpdate": @"ANCHORS_DID_UPDATE", <mask> @"cameraDidChangeTrackingState": @"CAMERA_DID_CHANGE_TRACKING_STATE", <mask> @"didFailWithError": @"DID_FAIL_WITH_ERROR", <mask> @"sessionWasInterrupted": @"SESSION_WAS_INTERRUPTED", </s> removed face stuff fbshipit-source-id: 742d835 </s> add @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> remove RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> add </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; }
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep add keep keep keep keep keep
<mask> if (@available(iOS 11.0, *)) { <mask> [output addEntriesFromDictionary:@{ <mask> @"ARKitVersion": @"1.0", <mask> @"ARFaceTrackingConfiguration": @(NO), <mask> //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), <mask> @"AROrientationTrackingConfiguration": [AROrientationTrackingConfiguration isSupported] ? @(YES) : @(NO), <mask> @"ARWorldTrackingConfiguration": [ARWorldTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> removed face stuff fbshipit-source-id: 742d835 </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> remove @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add @"isSupported": @(NO), </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> if (@available(iOS 11.0, *)) { <mask> [output addEntriesFromDictionary:@{ <mask> @"ARKitVersion": @"1.0", <mask> @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), <mask> @"AROrientationTrackingConfiguration": [AROrientationTrackingConfiguration isSupported] ? @(YES) : @(NO), <mask> @"ARWorldTrackingConfiguration": [ARWorldTrackingConfiguration isSupported] ? @(YES) : @(NO), <mask> }]; <mask> } <mask> </s> removed face stuff fbshipit-source-id: 742d835 </s> add @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> remove @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add @"isSupported": @(NO), </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> if (@available(iOS 11.3, *)) { <mask> [output addEntriesFromDictionary:@{ <mask> @"ARKitVersion": @"1.5", <mask> @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], <mask> @"WorldTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARWorldTrackingConfiguration supportedVideoFormats]], <mask> @"OrientationTrackingVideoFormats": [EXAR serializeARVideoFormats:[AROrientationTrackingConfiguration supportedVideoFormats]], <mask> }]; <mask> } <mask> </s> removed face stuff fbshipit-source-id: 742d835 </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> remove RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> add
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
<mask> { <mask> return @([_arSessionManager autoFocusEnabled]); <mask> } <mask> <mask> RCT_REMAP_METHOD(setPlaneDetection, <mask> planeDetection:(ARPlaneDetection)planeDetection) <mask> { <mask> [_arSessionManager setPlaneDetection:planeDetection]; <mask> } <mask> <mask> RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(getPlaneDetection, NSString *, getPlaneDetection) <mask> { <mask> NSArray *items = @[@"none", @"horizontal", @"vertical"]; <mask> return [items objectAtIndex:[_arSessionManager planeDetection]]; <mask> } </s> removed face stuff fbshipit-source-id: 742d835 </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> remove @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add @"isSupported": @(NO), </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO),
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep add keep keep keep keep
<mask> } <mask> <mask> RCT_REMAP_METHOD(setWorldAlignment, <mask> worldAlignment:(ARWorldAlignment)worldAlignment) <mask> { <mask> if (!_arSessionManager) { </s> removed face stuff fbshipit-source-id: 742d835 </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> remove RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> add </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"isSupported": [ARSession class] ? @(YES) : @(NO),
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> [_arSessionManager setWorldAlignment:worldAlignment]; <mask> } <mask> <mask> #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil <mask> RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(getWorldAlignment, NSString *, getWorldAlignment) <mask> { <mask> NSArray *items = @[@"gravity", @"gravityAndHeading", @"alignmentCamera"]; <mask> return [items objectAtIndex:[_arSessionManager worldAlignment]]; <mask> } </s> removed face stuff fbshipit-source-id: 742d835 </s> remove RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> add </s> remove RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } </s> add </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> remove @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add @"isSupported": @(NO), </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO),
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep
<mask> reject(@"E_INVALID_VERSION", @"Detection images are only available on iOS 11.3+ devices", nil); <mask> } <mask> } <mask> <mask> RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, <mask> nullable NSDictionary *, <mask> performHitTestWithPoint:(CGPoint)point <mask> types:(ARHitTestResultType)types) <mask> { <mask> if (!_arSessionManager) { <mask> return nil; <mask> } <mask> return [_arSessionManager performHitTest:point types:types]; <mask> } <mask> <mask> <mask> <mask> <mask> @end </s> removed face stuff fbshipit-source-id: 742d835 </s> remove #define kWorldAlignmentArray @"gravity", @"gravityAndHeading", @"alignmentCamera", nil </s> add RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(ARHitTestResultType)types) { if (!_arSessionManager) { return nil; } return [_arSessionManager performHitTest:point types:types]; } #else RCT_REMAP_BLOCKING_SYNCHRONOUS_METHOD(performHitTest, nullable NSDictionary *, performHitTestWithPoint:(CGPoint)point types:(NSString *)types) { return nil; } RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(NSString *)planeDetection) { } RCT_REMAP_METHOD(setWorldAlignment, worldAlignment:(NSString *)worldAlignment) { } #endif </s> remove RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> add </s> add #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 RCT_REMAP_METHOD(setPlaneDetection, planeDetection:(ARPlaneDetection)planeDetection) { [_arSessionManager setPlaneDetection:planeDetection]; } </s> remove @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> add // @"FaceTrackingVideoFormats": [EXAR serializeARVideoFormats:[ARFaceTrackingConfiguration supportedVideoFormats]], </s> remove @"ARFaceTrackingConfiguration": [ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> add @"ARFaceTrackingConfiguration": @(NO), //[ARFaceTrackingConfiguration isSupported] ? @(YES) : @(NO), </s> remove @"isSupported": [ARSession class] ? @(YES) : @(NO), </s> add @"isSupported": @(NO),
https://github.com/expo/expo/commit/29fffc86ec7c6dfc7cb3b19390f78aa5da69c853
ios/Exponent/Versioned/Optional/ARKit/EXAR.m
keep keep keep keep replace keep keep keep keep keep
<mask> defaultConfig { <mask> minSdkVersion safeExtGet('minSdkVersion', 21) <mask> targetSdkVersion safeExtGet('targetSdkVersion', 30) <mask> versionCode 1 <mask> versionName "0.7.0" <mask> <mask> testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" <mask> } <mask> lintOptions { <mask> abortOnError false </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1", </s> remove version = '0.8.5' </s> add version = '0.8.6'
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-client/android/build.gradle
keep keep replace keep keep keep keep keep
<mask> { <mask> "name": "expo-dev-client", <mask> "version": "0.7.0", <mask> "description": "Expo Development Client", <mask> "main": "build/DevClient.js", <mask> "types": "build/DevClient.d.ts", <mask> "scripts": { <mask> "build": "expo-module build", </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove versionName "0.7.0" </s> add versionName "0.7.1" </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1", </s> remove version = '0.8.5' </s> add version = '0.8.6'
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-client/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "homepage": "https://docs.expo.dev/clients/introduction/", <mask> "dependencies": { <mask> "@expo/config-plugins": "^4.0.2", <mask> "expo-dev-launcher": "0.9.0", <mask> "expo-dev-menu": "0.8.5", <mask> "expo-dev-menu-interface": "0.4.2", <mask> "expo-manifests": "~0.2.2", <mask> "expo-updates-interface": "~0.4.0" <mask> }, <mask> "devDependencies": { </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove versionName "0.7.0" </s> add versionName "0.7.1" </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1", </s> remove version = '0.8.5' </s> add version = '0.8.6'
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-client/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> apply plugin: 'kotlin-android' <mask> apply plugin: 'maven' <mask> <mask> group = 'host.exp.exponent' <mask> version = '0.8.5' <mask> <mask> // reanimated v2 <mask> def reactNativeFilePath = ["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim() <mask> def inputFile = new File(reactNativeFilePath) <mask> def json = new JsonSlurper().parseText(inputFile.text) </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1", </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove versionName "0.7.0" </s> add versionName "0.7.1"
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-menu/android/build.gradle
keep keep keep keep replace keep keep keep keep keep
<mask> defaultConfig { <mask> minSdkVersion safeExtGet("minSdkVersion", 21) <mask> targetSdkVersion safeExtGet("targetSdkVersion", 30) <mask> versionCode 10 <mask> versionName '0.8.5' <mask> } <mask> lintOptions { <mask> abortOnError false <mask> } <mask> </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove versionName "0.7.0" </s> add versionName "0.7.1" </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove version = '0.8.5' </s> add version = '0.8.6' </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1",
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-menu/android/build.gradle
keep keep replace keep keep keep keep keep
<mask> { <mask> "name": "expo-dev-menu", <mask> "version": "0.8.5", <mask> "description": "Expo/React Native module with the developer menu.", <mask> "main": "build/DevMenu.js", <mask> "types": "build/DevMenu.d.ts", <mask> "sideEffects": false, <mask> "scripts": { </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove versionName "0.7.0" </s> add versionName "0.7.1" </s> remove "expo-dev-client": "~0.7.0", </s> add "expo-dev-client": "~0.7.1", </s> remove version = '0.8.5' </s> add version = '0.8.6'
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo-dev-menu/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> "expo-clipboard": "~2.0.3", <mask> "expo-constants": "~12.2.0", <mask> "expo-contacts": "~10.0.3", <mask> "expo-crypto": "~10.0.3", <mask> "expo-dev-client": "~0.7.0", <mask> "expo-device": "~4.0.3", <mask> "expo-document-picker": "~10.0.3", <mask> "expo-error-recovery": "~3.0.4", <mask> "expo-face-detector": "~11.0.3", <mask> "expo-facebook": "~12.0.3", </s> Publish expo-dev-menu, expo-dev-client [email protected] [email protected] </s> remove "version": "0.8.5", </s> add "version": "0.8.6", </s> remove versionName '0.8.5' </s> add versionName '0.8.6' </s> remove version = '0.8.5' </s> add version = '0.8.6' </s> remove "expo-dev-menu": "0.8.5", </s> add "expo-dev-menu": "0.8.6", </s> remove "version": "0.7.0", </s> add "version": "0.7.1", </s> remove versionName "0.7.0" </s> add versionName "0.7.1"
https://github.com/expo/expo/commit/2c955143261356321dc3fa6580b593e10c58ada0
packages/expo/bundledNativeModules.json
keep keep keep keep replace keep replace replace replace
<mask> export default { <mask> ...constants, <mask> // Ensure this is null in bare workflow <mask> appOwnership: appOwnership ?? null, <mask> manifest, <mask> // Legacy aliases <mask> deviceId: constants.installationId, <mask> linkingUrl: constants.linkingUri, <mask> } as Constants; </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add // mock console.warn const originalWarn = console.warn; beforeEach(() => { console.warn = jest.fn(); }); afterEach(() => (console.warn = originalWarn)); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> remove import Constants from '../Constants'; </s> add import Constants, { ExecutionEnvironment } from '../Constants'; </s> remove executionEnvironment: { type: 'string' }, </s> add executionEnvironment: { type: 'string', mock: 'standalone' }, </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare });
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/Constants.ts
replace keep keep keep keep keep
<mask> import Constants from '../Constants'; <mask> <mask> it(`defines a manifest`, () => { <mask> expect(Constants.manifest).toBeTruthy(); <mask> expect(typeof Constants.manifest).toBe('object'); <mask> }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add // mock console.warn const originalWarn = console.warn; beforeEach(() => { console.warn = jest.fn(); }); afterEach(() => (console.warn = originalWarn)); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare });
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep
<mask> }); <mask> <mask> function mockExponentConstants(mockValues: object) { <mask> jest.doMock('../ExponentConstants', () => { <mask> const ExponentConstants = jest.requireActual('../ExponentConstants'); <mask> return { <mask> ...ExponentConstants, </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> <mask> it(`exists if defined as a string in ExponentConstants`, () => { <mask> mockExponentConstants({ manifest: JSON.stringify(fakeManifest) }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare });
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> <mask> it(`exists if defined as an object by expo-updates`, () => { <mask> mockExponentConstants({ manifest: undefined }); <mask> mockExpoUpdates({ manifest: fakeManifest, manifestString: undefined }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> add expect(console.warn).toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> <mask> it(`exists if defined as a string by expo-updates`, () => { <mask> mockExponentConstants({ manifest: undefined }); <mask> mockExpoUpdates({ manifest: undefined, manifestString: JSON.stringify(fakeManifest) }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> <mask> it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { <mask> mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); <mask> mockExpoUpdates({ manifest: undefined, manifestString: undefined }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep keep keep replace replace keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> <mask> it(`is null if undefined in ExponentConstants and expo-updates`, () => { <mask> mockExponentConstants({ manifest: undefined }); <mask> mockExpoUpdates({ manifest: undefined, manifestString: undefined }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toBeNull(); <mask> }); <mask> </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep add keep keep keep keep
<mask> mockExpoUpdates({ manifest: undefined, manifestString: undefined }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toBeNull(); <mask> }); <mask> <mask> it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { <mask> mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep keep keep replace replace keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toBeNull(); <mask> }); <mask> <mask> it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { <mask> mockExponentConstants({ manifest: undefined }); <mask> mockNativeModulesProxy({ ExpoUpdates: undefined }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toBeNull(); <mask> }); <mask> </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep add keep keep keep keep
<mask> mockNativeModulesProxy({ ExpoUpdates: undefined }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toBeNull(); <mask> }); <mask> <mask> it(`is overridden by expo-updates if both are defined`, () => { <mask> mockExponentConstants({ manifest: fakeManifest }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep add keep keep keep keep keep keep
<mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest2); <mask> }); <mask> <mask> it(`is not overridden if expo-updates exports an empty manifest`, () => { <mask> mockExponentConstants({ manifest: fakeManifest }); <mask> mockExpoUpdates({ manifest: {} }); <mask> const ConstantsWithMock = require('../Constants').default; </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); }); </s> add expect(console.warn).toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants, and expo-updates does not exist`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants, and expo-updates does not exist with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep keep add keep keep
<mask> mockExponentConstants({ manifest: fakeManifest }); <mask> mockExpoUpdates({ manifest: {} }); <mask> const ConstantsWithMock = require('../Constants').default; <mask> expect(ConstantsWithMock.manifest).toEqual(fakeManifest); <mask> }); <mask> }); </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).toHaveBeenCalled(); </s> remove it(`is null if undefined in ExponentConstants and expo-updates`, () => { mockExponentConstants({ manifest: undefined }); </s> add it(`is null if undefined in ExponentConstants and expo-updates with bare execution environment`, () => { mockExponentConstants({ manifest: undefined, executionEnvironment: ExecutionEnvironment.Bare }); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled();
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo-constants/src/__tests__/Constants-test.ts
keep keep add keep keep keep keep
<mask> const MockConstants = Object.create(Constants); <mask> MockConstants.manifest = { <mask> ...Constants.manifest, <mask> developer: { <mask> projectRoot: '/home/test/project', <mask> }, <mask> logUrl: 'https://localhost:19001/logs', </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> remove executionEnvironment: { type: 'string' }, </s> add executionEnvironment: { type: 'string', mock: 'standalone' }, </s> add // mock console.warn const originalWarn = console.warn; beforeEach(() => { console.warn = jest.fn(); }); afterEach(() => (console.warn = originalWarn)); </s> remove deviceId: constants.installationId, linkingUrl: constants.linkingUri, } as Constants; </s> add deviceId: nativeConstants.installationId, linkingUrl: nativeConstants.linkingUri, }; Object.defineProperties(constants, { manifest: { enumerable: true, get() { if (!manifest) { const invalidManifestType = manifest === null ? 'null' : 'undefined'; if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare) { console.warn( `Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.` ); } else if ( nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone ) { // If we somehow get here, this is a truly exceptional state to be in. // Constants.manifest should *always* be defined in those contexts. throw new CodedError( 'E_CONSTANTS_MANIFEST_UNAVAILABLE', `Constants.manifest is ${invalidManifestType}, must be an object.` ); } } return manifest; }, // This setter is only useful to mock the value for tests set(value) { manifest = value; }, }, }); export default constants as Constants; </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); });
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/expo/src/__mocks__/Constants-development.ts
keep keep keep keep replace keep keep keep keep keep
<mask> appOwnership: { type: 'string' }, <mask> debugMode: { type: 'boolean', mock: true }, <mask> deviceName: { type: 'string' }, <mask> deviceYearClass: { type: 'number', mock: 2019 }, <mask> executionEnvironment: { type: 'string' }, <mask> experienceUrl: { type: 'string' }, <mask> expoRuntimeVersion: { type: 'string' }, <mask> expoVersion: { type: 'string' }, <mask> getWebViewUserAgentAsync: { type: 'function' }, <mask> installationId: { type: 'string' }, </s> [expo-constants] log warning to JS if Constants.manifest is accessed while null (#11028) Co-authored-by: Brent Vatne <[email protected]> </s> add executionEnvironment: 'standalone', </s> remove deviceId: constants.installationId, linkingUrl: constants.linkingUri, } as Constants; </s> add deviceId: nativeConstants.installationId, linkingUrl: nativeConstants.linkingUri, }; Object.defineProperties(constants, { manifest: { enumerable: true, get() { if (!manifest) { const invalidManifestType = manifest === null ? 'null' : 'undefined'; if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare) { console.warn( `Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.` ); } else if ( nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone ) { // If we somehow get here, this is a truly exceptional state to be in. // Constants.manifest should *always* be defined in those contexts. throw new CodedError( 'E_CONSTANTS_MANIFEST_UNAVAILABLE', `Constants.manifest is ${invalidManifestType}, must be an object.` ); } } return manifest; }, // This setter is only useful to mock the value for tests set(value) { manifest = value; }, }, }); export default constants as Constants; </s> add // mock console.warn const originalWarn = console.warn; beforeEach(() => { console.warn = jest.fn(); }); afterEach(() => (console.warn = originalWarn)); </s> remove import Constants from '../Constants'; </s> add import Constants, { ExecutionEnvironment } from '../Constants'; </s> remove manifest, </s> add </s> add expect(console.warn).not.toHaveBeenCalled(); }); [ExecutionEnvironment.Standalone, ExecutionEnvironment.StoreClient].forEach(env => { it(`throws an error if manifest is falsey when Constants.executionEnvironment is ${env}`, () => { mockExponentConstants({ manifest: null, executionEnvironment: env, }); const ConstantsWithMock = require('../Constants').default; expect(() => ConstantsWithMock.manifest).toThrowErrorMatchingSnapshot(); });
https://github.com/expo/expo/commit/2d977af1948e6e8bd55e4a8738b1dea8874caed6
packages/jest-expo/src/preset/expoModules.js
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> { <mask> "name": "expo-payments-stripe", <mask> "version": "7.0.0", <mask> "description": "Provides support for payments through Stripe and Apple Pay on iOS (in ExpoKit and bare apps), and Stripe on Android (plus Android Pay with ExpoKit and bare apps).", <mask> "main": "index.js", <mask> "files": [ <mask> "android/", <mask> "ios/", <mask> "src/", <mask> "index.js", <mask> "unimodule.json" <mask> ], <mask> "keywords": [ <mask> "react-native", <mask> "expo", <mask> "payments-stripe", <mask> "payments", </s> [payments-stripe] Convert package to TypeScript </s> add "dependencies": { "prop-types": "^15.6.0" }, </s> remove } </s> add
https://github.com/expo/expo/commit/2e3472bea9efeb8593df95bec8cdcf817c294cde
packages/expo-payments-stripe/package.json
keep add keep keep keep keep keep
<mask> "@unimodules/core": "*" <mask> }, <mask> "devDependencies": { <mask> "expo-module-scripts": "~1.1.1" <mask> }, <mask> "gitHead": "4e13b3cb88d9205f14bee7764038ab2dd9ef1fbd" <mask> } </s> [payments-stripe] Convert package to TypeScript </s> remove } </s> add </s> remove "main": "index.js", "files": [ "android/", "ios/", "src/", "index.js", "unimodule.json" ], </s> add "main": "build/index.js", "types": "build/index.d.ts", "sideEffects": false, "scripts": { "build": "expo-module build", "clean": "expo-module clean", "lint": "expo-module lint", "test": "expo-module test", "prepare": "expo-module prepare", "prepublishOnly": "expo-module prepublishOnly", "expo-module": "expo-module" },
https://github.com/expo/expo/commit/2e3472bea9efeb8593df95bec8cdcf817c294cde
packages/expo-payments-stripe/package.json
keep keep keep keep replace
<mask> "devDependencies": { <mask> "expo-module-scripts": "~1.1.1" <mask> }, <mask> "gitHead": "4e13b3cb88d9205f14bee7764038ab2dd9ef1fbd" <mask> } </s> [payments-stripe] Convert package to TypeScript </s> add "dependencies": { "prop-types": "^15.6.0" }, </s> remove "main": "index.js", "files": [ "android/", "ios/", "src/", "index.js", "unimodule.json" ], </s> add "main": "build/index.js", "types": "build/index.d.ts", "sideEffects": false, "scripts": { "build": "expo-module build", "clean": "expo-module clean", "lint": "expo-module lint", "test": "expo-module test", "prepare": "expo-module prepare", "prepublishOnly": "expo-module prepublishOnly", "expo-module": "expo-module" },
https://github.com/expo/expo/commit/2e3472bea9efeb8593df95bec8cdcf817c294cde
packages/expo-payments-stripe/package.json
keep add keep keep keep keep keep keep
<mask> diff --git a/apps/bare-update/android/app/src/main/AndroidManifest.xml b/apps/bare-update/android/app/src/main/AndroidManifest.xml <mask> index 4a74a05751..bac2b2f677 100644 <mask> <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" android:usesCleartextTraffic="true"> <mask> <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@my-expo-username/my-app"/> <mask> <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="43.0.0"/> <mask> + <meta-data android:name="expo.modules.updates.AUTO_SETUP" android:value="false"/> <mask> <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen"> <mask> <intent-filter> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove android:label="@string/app_name" </s> add </s> add import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); } </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + }
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep add keep keep keep keep keep
<mask> <intent-filter> <mask> <action android:name="android.intent.action.MAIN"/> <mask> diff --git a/apps/bare-update/android/app/src/main/java/com/bareupdate/MainApplication.java b/apps/bare-update/android/app/src/main/java/com/bareupdate/MainApplication.java <mask> index 4b0d17d89d..5d6f1bb620 100644 <mask> import android.app.Application; <mask> import android.content.Context; <mask> import android.content.res.Configuration; <mask> +import android.net.Uri; <mask> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import android.app.Application; import android.content.Context; import android.content.res.Configuration; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> remove import java.util.Arrays; </s> add </s> add import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.Log; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.ReactApplicationContext; </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread;
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep add keep keep keep keep keep
<mask> import android.content.res.Configuration; <mask> +import android.net.Uri; <mask> <mask> import com.facebook.react.PackageList; <mask> import expo.modules.ApplicationLifecycleDispatcher; <mask> import expo.modules.ReactNativeHostWrapper; <mask> +import expo.modules.updates.UpdatesController; <mask> <mask> import com.facebook.react.bridge.JSIModulePackage; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> add import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.Log; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.ReactApplicationContext; </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; </s> remove import java.util.Arrays; </s> add </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep keep replace keep keep keep keep keep
<mask> index 955757b..3fa4cb1 100644 <mask> --- a/android/app/src/main/AndroidManifest.xml <mask> +++ b/android/app/src/main/AndroidManifest.xml <mask> @@ -8,12 +8,15 @@ <mask> android:label="@string/app_name" <mask> android:icon="@mipmap/ic_launcher" <mask> android:roundIcon="@mipmap/ic_launcher_round" <mask> android:allowBackup="false" <mask> android:theme="@style/AppTheme"> <mask> + <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@my-expo-username/my-app" /> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import android.app.Application; import android.content.Context; import android.content.res.Configuration; </s> remove protected String getJSMainModuleName() { </s> add </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> add import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep add keep keep keep keep
<mask> + @Override <mask> + protected @Nullable String getJSBundleFile() { <mask> + if (BuildConfig.DEBUG) { <mask> + } <mask> + } <mask> + <mask> + @Override </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add </s> remove protected String getJSMainModuleName() { </s> add </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove android:label="@string/app_name" </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep replace replace replace replace replace replace replace replace keep keep replace keep
<mask> import org.unimodules.adapters.react.ModuleRegistryAdapter; <mask> import org.unimodules.adapters.react.ReactModuleRegistryProvider; <mask> import org.unimodules.core.interfaces.SingletonModule; <mask> <mask> +import android.net.Uri; <mask> +import expo.modules.updates.UpdatesController; <mask> +import javax.annotation.Nullable; <mask> + <mask> public class MainApplication extends Application implements ReactApplication { <mask> private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); <mask> <mask> private final ReactNativeHost mReactNativeHost = <mask> new ReactNativeHost(this) { <mask> @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { <mask> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove protected String getJSMainModuleName() { </s> add </s> add private static final String TAG = UpdatesPackage.class.getSimpleName(); </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep keep replace keep keep keep keep keep
<mask> new ReactNativeHost(this) { <mask> @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { <mask> <mask> @Override <mask> protected String getJSMainModuleName() { <mask> return "index"; <mask> } <mask> + <mask> + @Override <mask> + protected @Nullable String getJSBundleFile() { </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); } </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add </s> add private static final String TAG = UpdatesPackage.class.getSimpleName(); </s> add import expo.modules.core.interfaces.ReactNativeHostHandler;
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> + <mask> + @Override <mask> + protected @Nullable String getJSBundleFile() { <mask> + if (BuildConfig.DEBUG) { <mask> + return super.getJSBundleFile(); <mask> + } else { <mask> + return UpdatesController.getInstance().getLaunchAssetFile(); <mask> + } <mask> + } <mask> + <mask> + @Override <mask> + protected @Nullable String getBundleAssetName() { </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); } </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove protected String getJSMainModuleName() { </s> add </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove android:label="@string/app_name" </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
docs/public/static/diffs/expo-updates-android.diff
keep keep add keep keep keep keep keep keep
<mask> # Enables Swift modules in Expo Go <mask> use_swift_modules! <mask> <mask> abstract_target 'Expo Go' do <mask> # Expo Client dependencies <mask> pod 'Amplitude' <mask> pod 'CocoaLumberjack', '~> 3.5.3' <mask> pod 'GoogleMaps', '~> 3.6' <mask> pod 'Google-Maps-iOS-Utils', '~> 2.1.0' </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add if $expo_updates_create_manifest != false s.script_phase = { :name => 'Generate app.manifest for expo-updates', :script => 'bash -l -c "$PODS_TARGET_SRCROOT/../scripts/create-manifest-ios.sh"', :execution_position => :before_compile } # Generate EXUpdates.bundle without existing resources # `create-manifest-ios.sh` will generate app.manifest in EXUpdates.bundle s.resource_bundles = { 'EXUpdates' => [] } end </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> remove NSString *path = [[NSBundle mainBundle] pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]]; NSURL *bundleUrl = [frameworkBundle.resourceURL URLByAppendingPathComponent:@"EXUpdates.bundle"]; NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl]; NSString *path = [bundle pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) { </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
ios/Podfile
keep keep add keep keep keep keep keep keep
<mask> /** <mask> * Given chance for modules to customize {@link ReactInstanceManager} <mask> * <mask> * @return instance of {@link ReactInstanceManager}, or null if not to override <mask> */ <mask> fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { <mask> return null <mask> } <mask> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep keep replace keep keep keep keep keep
<mask> * Given chance for modules to customize {@link ReactInstanceManager} <mask> * <mask> * @return instance of {@link ReactInstanceManager}, or null if not to override <mask> */ <mask> fun createReactInstanceManager(): ReactInstanceManager? { <mask> return null <mask> } <mask> <mask> /** <mask> * Given chance for modules to override react bundle file. </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep add keep keep keep keep keep
<mask> /** <mask> * Given chance for modules to override react bundle file. <mask> * e.g. for expo-updates <mask> * <mask> * @return custom path to bundle file, or null if not to override <mask> */ <mask> fun getJSBundleFile(useDeveloperSupport: Boolean): String? { <mask> return null <mask> } </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep keep replace keep keep keep keep keep
<mask> * e.g. for expo-updates <mask> * <mask> * @return custom path to bundle file, or null if not to override <mask> */ <mask> fun getJSBundleFile(): String? { <mask> return null <mask> } <mask> <mask> /** <mask> * Given chance for modules to override react bundle asset name. </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep add keep keep keep keep keep
<mask> * e.g. for expo-updates <mask> * <mask> * @return custom bundle asset name, or null if not to override <mask> */ <mask> fun getBundleAssetName(useDeveloperSupport: Boolean): String? { <mask> return null <mask> } </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) {
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep keep replace keep keep keep keep keep
<mask> * e.g. for expo-updates <mask> * <mask> * @return custom bundle asset name, or null if not to override <mask> */ <mask> fun getBundleAssetName(): String? { <mask> return null <mask> } <mask> <mask> /** <mask> * Given chance for JSI modules to register, e.g. for react-native-reanimated </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) {
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep add keep keep keep keep keep
<mask> /** <mask> * Given chance for JSI modules to register, e.g. for react-native-reanimated <mask> */ <mask> fun onRegisterJSIModules( <mask> reactApplicationContext: ReactApplicationContext, <mask> jsContext: JavaScriptContextHolder, <mask> useDeveloperSupport: Boolean </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep keep replace keep keep
<mask> <mask> /** <mask> * Given chance for JSI modules to register, e.g. for react-native-reanimated <mask> */ <mask> fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { <mask> } <mask> } </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-modules-core/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.kt
keep keep keep add keep keep keep keep
<mask> <mask> group = 'host.exp.exponent' <mask> version = '0.8.4' <mask> <mask> buildscript { <mask> // Simple helper that allows the root project to override versions declared by this library. <mask> ext.safeExtGet = { prop, fallback -> <mask> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove def projectRoot = file("../../") </s> add // From a library project role to reference app project settings such as `targetName.toLowerCase().contains("release")`, // we extract the `appProject` from all projects here. // things like `config`, `buildDir`, and `applicationVariants`, we will reference from appProject. def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } def config = appProject.hasProperty("react") ? appProject.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" def projectRoot = file("${rootProject.projectDir}") </s> add consumerProguardFiles("proguard-rules.pro") </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove return reactNativeHostHandlers.asSequence() .map(ReactNativeHostHandler::createReactInstanceManager) </s> add // map() without asSequence() gives a chance for handlers // to get noticed before createReactInstanceManager() return reactNativeHostHandlers .map { it.createReactInstanceManager(useDeveloperSupport) } </s> remove void runBefore(String dependentTaskName, Task task) { Task dependentTask = tasks.findByPath(dependentTaskName); if (dependentTask != null) { dependentTask.dependsOn task } } </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/build.gradle
keep add keep keep keep keep
<mask> versionCode 31 <mask> versionName '0.8.4' <mask> testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" <mask> // uncomment below to export the database schema when making changes <mask> /* javaCompileOptions { <mask> annotationProcessorOptions { </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add apply from: "../scripts/create-manifest-android.gradle" </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove return reactNativeHostHandlers.asSequence() .map(ReactNativeHostHandler::createReactInstanceManager) </s> add // map() without asSequence() gives a chance for handlers // to get noticed before createReactInstanceManager() return reactNativeHostHandlers .map { it.createReactInstanceManager(useDeveloperSupport) } </s> remove def projectRoot = file("../../") </s> add // From a library project role to reference app project settings such as `targetName.toLowerCase().contains("release")`, // we extract the `appProject` from all projects here. // things like `config`, `buildDir`, and `applicationVariants`, we will reference from appProject. def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } def config = appProject.hasProperty("react") ? appProject.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" def projectRoot = file("${rootProject.projectDir}") </s> remove into ("$buildDir/intermediates") </s> add into ("${appProject.buildDir}/intermediates") </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? {
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/build.gradle
keep keep add keep keep keep keep keep keep
<mask> package expo.modules.updates; <mask> <mask> import android.content.Context; <mask> <mask> import java.util.Collections; <mask> import java.util.List; <mask> <mask> import androidx.annotation.NonNull; <mask> import androidx.annotation.Nullable; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove import java.util.Arrays; </s> add </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> add import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add </s> add import android.app.Application; import android.content.Context; import android.content.res.Configuration;
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.java
keep keep keep keep replace keep keep keep keep keep
<mask> package expo.modules.updates; <mask> <mask> import android.content.Context; <mask> <mask> import java.util.Arrays; <mask> import java.util.Collections; <mask> import java.util.List; <mask> <mask> import expo.modules.core.BasePackage; <mask> import expo.modules.core.ExportedModule; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.Log; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.ReactApplicationContext; </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> add import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.java
keep add keep keep keep keep
<mask> import java.util.List; <mask> <mask> import expo.modules.core.BasePackage; <mask> import expo.modules.core.ExportedModule; <mask> import expo.modules.core.interfaces.InternalModule; <mask> import expo.modules.core.interfaces.ReactNativeHostHandler; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> remove import java.util.Arrays; </s> add </s> add import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.Log; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.ReactApplicationContext; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> add private static final String TAG = UpdatesPackage.class.getSimpleName(); </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.java
keep keep add keep keep keep keep
<mask> import expo.modules.core.BasePackage; <mask> import expo.modules.core.ExportedModule; <mask> import expo.modules.core.interfaces.InternalModule; <mask> <mask> public class UpdatesPackage extends BasePackage { <mask> private static final String TAG = UpdatesPackage.class.getSimpleName(); <mask> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add private static final String TAG = UpdatesPackage.class.getSimpleName(); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; </s> remove import java.util.Arrays; </s> add </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove import expo.modules.core.interfaces.ReactNativeHostHandler </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.java
keep keep keep add keep keep keep keep keep keep
<mask> import expo.modules.core.interfaces.InternalModule; <mask> import expo.modules.core.interfaces.ReactNativeHostHandler; <mask> <mask> public class UpdatesPackage extends BasePackage { <mask> @Override <mask> public List<InternalModule> createInternalModules(Context context) { <mask> return Collections.singletonList((InternalModule) new UpdatesService(context)); <mask> } <mask> <mask> @Override </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove protected String getJSMainModuleName() { </s> add </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); } </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread;
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.java
keep keep keep add keep keep keep keep
<mask> else <mask> s.source_files = "#{s.name}/**/*.{h,m}" <mask> end <mask> <mask> s.test_spec 'Tests' do |test_spec| <mask> test_spec.source_files = 'Tests/*.{h,m,swift}' <mask> end <mask> end </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add # Disable expo-updates auto create manifest in podspec script_phase $expo_updates_create_manifest = false </s> add process.chdir(projectRoot); </s> remove NSString *path = [[NSBundle mainBundle] pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]]; NSURL *bundleUrl = [frameworkBundle.resourceURL URLByAppendingPathComponent:@"EXUpdates.bundle"]; NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl]; NSString *path = [bundle pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/ios/EXUpdates.podspec
keep keep keep keep replace keep keep keep keep keep
<mask> dispatch_once(&once, ^{ <mask> if (!config.hasEmbeddedUpdate) { <mask> embeddedManifest = nil; <mask> } else if (!embeddedManifest) { <mask> NSString *path = [[NSBundle mainBundle] pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; <mask> NSData *manifestData = [NSData dataWithContentsOfFile:path]; <mask> if (!manifestData) { <mask> @throw [NSException exceptionWithName:NSInternalInconsistencyException <mask> reason:@"The embedded manifest is invalid or could not be read. Make sure you have configured expo-updates correctly in your Xcode Build Phases." <mask> userInfo:@{}]; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> add process.chdir(projectRoot); </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> add if $expo_updates_create_manifest != false s.script_phase = { :name => 'Generate app.manifest for expo-updates', :script => 'bash -l -c "$PODS_TARGET_SRCROOT/../scripts/create-manifest-ios.sh"', :execution_position => :before_compile } # Generate EXUpdates.bundle without existing resources # `create-manifest-ios.sh` will generate app.manifest in EXUpdates.bundle s.resource_bundles = { 'EXUpdates' => [] } end
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/ios/EXUpdates/AppLoader/EXUpdatesEmbeddedAppLoader.m
keep add keep keep keep keep keep
<mask> }; <mask> <mask> @interface EXUpdatesConfig : NSObject <mask> <mask> @property (nonatomic, readonly) BOOL isEnabled; <mask> @property (nonatomic, readonly) BOOL expectsSignedManifest; <mask> @property (nonatomic, readonly) NSString *scopeKey; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove static NSString * const EXUpdatesConfigPlistName = @"Expo"; </s> add NSString * const EXUpdatesConfigPlistName = @"Expo"; NSString * const EXUpdatesConfigEnableAutoSetupKey = @"EXUpdatesAutoSetup"; </s> remove NSString *path = [[NSBundle mainBundle] pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]]; NSURL *bundleUrl = [frameworkBundle.resourceURL URLByAppendingPathComponent:@"EXUpdates.bundle"]; NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl]; NSString *path = [bundle pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add apply from: "../scripts/create-manifest-android.gradle" </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove void runBefore(String dependentTaskName, Task task) { Task dependentTask = tasks.findByPath(dependentTaskName); if (dependentTask != null) { dependentTask.dependsOn task } } </s> add </s> remove def projectRoot = file("../../") </s> add // From a library project role to reference app project settings such as `targetName.toLowerCase().contains("release")`, // we extract the `appProject` from all projects here. // things like `config`, `buildDir`, and `applicationVariants`, we will reference from appProject. def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } def config = appProject.hasProperty("react") ? appProject.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" def projectRoot = file("${rootProject.projectDir}")
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.h
keep keep keep keep replace keep keep keep keep keep
<mask> @property (nullable, nonatomic, readwrite, strong) NSString *runtimeVersion; <mask> <mask> @end <mask> <mask> static NSString * const EXUpdatesConfigPlistName = @"Expo"; <mask> <mask> static NSString * const EXUpdatesDefaultReleaseChannelName = @"default"; <mask> <mask> static NSString * const EXUpdatesConfigEnabledKey = @"EXUpdatesEnabled"; <mask> static NSString * const EXUpdatesConfigScopeKeyKey = @"EXUpdatesScopeKey"; </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add FOUNDATION_EXPORT NSString * const EXUpdatesConfigPlistName; FOUNDATION_EXPORT NSString * const EXUpdatesConfigEnableAutoSetupKey; </s> remove NSString *path = [[NSBundle mainBundle] pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]]; NSURL *bundleUrl = [frameworkBundle.resourceURL URLByAppendingPathComponent:@"EXUpdates.bundle"]; NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl]; NSString *path = [bundle pathForResource:EXUpdatesEmbeddedManifestName ofType:EXUpdatesEmbeddedManifestType]; </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> add private static final String TAG = UpdatesPackage.class.getSimpleName(); </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.m
keep keep keep keep replace replace replace replace replace replace replace keep keep replace replace replace replace replace keep keep keep
<mask> <mask> import org.apache.tools.ant.taskdefs.condition.Os <mask> import org.gradle.util.GradleVersion <mask> <mask> void runBefore(String dependentTaskName, Task task) { <mask> Task dependentTask = tasks.findByPath(dependentTaskName); <mask> if (dependentTask != null) { <mask> dependentTask.dependsOn task <mask> } <mask> } <mask> <mask> def expoUpdatesDir = ["node", "-e", "console.log(require('path').dirname(require.resolve('expo-updates/package.json')));"].execute([], projectDir).text.trim() <mask> <mask> def config = project.hasProperty("react") ? project.react : []; <mask> def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] <mask> def entryFile = config.entryFile ?: "index.js" <mask> def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" <mask> <mask> afterEvaluate { <mask> def projectRoot = file("../../") <mask> def inputExcludes = ["android/**", "ios/**"] </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove def projectRoot = file("../../") </s> add // From a library project role to reference app project settings such as `targetName.toLowerCase().contains("release")`, // we extract the `appProject` from all projects here. // things like `config`, `buildDir`, and `applicationVariants`, we will reference from appProject. def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } def config = appProject.hasProperty("react") ? appProject.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" def projectRoot = file("${rootProject.projectDir}") </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove runBefore("process${targetName}Resources", currentAssetsCopyTask) </s> add Task dependentTask = appProject.tasks.findByPath("process${targetName}Resources"); if (dependentTask != null) { dependentTask.dependsOn currentAssetsCopyTask } </s> remove def assetsDir = file("$buildDir/generated/assets/expo-updates/${targetPath}") </s> add def assetsDir = file("${appProject.buildDir}/generated/assets/expo-updates/${targetPath}") </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + }
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/create-manifest-android.gradle
keep replace keep keep replace keep keep keep
<mask> afterEvaluate { <mask> def projectRoot = file("../../") <mask> def inputExcludes = ["android/**", "ios/**"] <mask> <mask> android.applicationVariants.each { variant -> <mask> def targetName = variant.name.capitalize() <mask> def targetPath = variant.dirName <mask> </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove def assetsDir = file("$buildDir/generated/assets/expo-updates/${targetPath}") </s> add def assetsDir = file("${appProject.buildDir}/generated/assets/expo-updates/${targetPath}") </s> remove void runBefore(String dependentTaskName, Task task) { Task dependentTask = tasks.findByPath(dependentTaskName); if (dependentTask != null) { dependentTask.dependsOn task } } </s> add </s> add process.chdir(projectRoot); </s> add apply from: "../scripts/create-manifest-android.gradle"
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/create-manifest-android.gradle
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> android.applicationVariants.each { variant -> <mask> def targetName = variant.name.capitalize() <mask> def targetPath = variant.dirName <mask> <mask> def assetsDir = file("$buildDir/generated/assets/expo-updates/${targetPath}") <mask> <mask> def currentBundleTask = tasks.create( <mask> name: "create${targetName}ExpoManifest", <mask> type: Exec) { <mask> description = "expo-updates: Create manifest for ${targetName}." </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove def projectRoot = file("../../") </s> add // From a library project role to reference app project settings such as `targetName.toLowerCase().contains("release")`, // we extract the `appProject` from all projects here. // things like `config`, `buildDir`, and `applicationVariants`, we will reference from appProject. def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') } def config = appProject.hasProperty("react") ? appProject.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" def projectRoot = file("${rootProject.projectDir}") </s> remove def config = project.hasProperty("react") ? project.react : []; def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"] def entryFile = config.entryFile ?: "index.js" def assetsFile = entryFile.take(entryFile.lastIndexOf('.')) + ".assets" </s> add </s> remove into ("$buildDir/intermediates") </s> add into ("${appProject.buildDir}/intermediates") </s> remove void runBefore(String dependentTaskName, Task task) { Task dependentTask = tasks.findByPath(dependentTaskName); if (dependentTask != null) { dependentTask.dependsOn task } } </s> add </s> add apply from: "../scripts/create-manifest-android.gradle"
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/create-manifest-android.gradle
keep keep keep keep replace keep keep keep keep keep
<mask> name: "copy${targetName}ExpoManifest", <mask> type: Copy) { <mask> description = "expo-updates: Copy manifest into ${targetName}." <mask> <mask> into ("$buildDir/intermediates") <mask> into ("assets/${targetPath}") { <mask> from(assetsDir) <mask> } <mask> <mask> // Workaround for Android Gradle Plugin 3.2+ new asset directory </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove def assetsDir = file("$buildDir/generated/assets/expo-updates/${targetPath}") </s> add def assetsDir = file("${appProject.buildDir}/generated/assets/expo-updates/${targetPath}") </s> remove return reactNativeHostHandlers.asSequence() .map(ReactNativeHostHandler::createReactInstanceManager) </s> add // map() without asSequence() gives a chance for handlers // to get noticed before createReactInstanceManager() return reactNativeHostHandlers .map { it.createReactInstanceManager(useDeveloperSupport) } </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? {
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/create-manifest-android.gradle
keep keep keep keep replace keep keep
<mask> <mask> enabled(currentBundleTask.enabled) <mask> } <mask> <mask> runBefore("process${targetName}Resources", currentAssetsCopyTask) <mask> } <mask> } </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove handler.onRegisterJSIModules(reactApplicationContext, jsContext) </s> add handler.onRegisterJSIModules(reactApplicationContext, jsContext, useDeveloperSupport) </s> remove .map(ReactNativeHostHandler::getBundleAssetName) </s> add .map { it.getBundleAssetName(useDeveloperSupport) } </s> remove .map(ReactNativeHostHandler::getJSBundleFile) </s> add .map { it.getJSBundleFile(useDeveloperSupport) } </s> add process.chdir(projectRoot); </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); } </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/create-manifest-android.gradle
keep keep keep add keep keep keep keep
<mask> } else if (fs.existsSync(path.join(possibleProjectRoot, '..', entryFile))) { <mask> projectRoot = path.resolve(possibleProjectRoot, '..'); <mask> } <mask> <mask> let metroConfig; <mask> try { <mask> metroConfig = await loadAsync(projectRoot); <mask> } catch (e) { </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); </s> add </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } }); </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove runBefore("process${targetName}Resources", currentAssetsCopyTask) </s> add Task dependentTask = appProject.tasks.findByPath("process${targetName}Resources"); if (dependentTask != null) { dependentTask.dependsOn currentAssetsCopyTask } </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); }
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo-updates/scripts/createManifest.js
keep keep keep keep replace keep keep keep keep keep
<mask> import com.facebook.react.bridge.JavaScriptExecutorFactory <mask> import com.facebook.react.bridge.ReactApplicationContext <mask> import com.facebook.react.devsupport.RedBoxHandler <mask> import com.facebook.react.uimanager.UIImplementationProvider <mask> import expo.modules.core.interfaces.ReactNativeHostHandler <mask> import java.lang.reflect.Method <mask> <mask> class ReactNativeHostWrapper( <mask> application: Application, <mask> private val host: ReactNativeHost </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> add import expo.modules.core.interfaces.ReactNativeHostHandler; </s> add import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.util.Log; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.ReactApplicationContext; </s> add import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; </s> add import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; </s> remove +import android.net.Uri; +import expo.modules.updates.UpdatesController; +import javax.annotation.Nullable; + public class MainApplication extends Application implements ReactApplication { private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null); </s> add + @Override + protected @Nullable String getJSBundleFile() { + if (BuildConfig.DEBUG) { + return super.getJSBundleFile(); + } else { + return UpdatesController.getInstance().getLaunchAssetFile(); + } + } </s> remove import java.util.Arrays; </s> add
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt
keep keep keep keep replace replace keep keep keep keep keep
<mask> .flatMap { it.createReactNativeHostHandlers(application) } <mask> private val methodMap: ArrayMap<String, Method> = ArrayMap() <mask> <mask> override fun createReactInstanceManager(): ReactInstanceManager { <mask> return reactNativeHostHandlers.asSequence() <mask> .map(ReactNativeHostHandler::createReactInstanceManager) <mask> .firstOrNull() ?: super.createReactInstanceManager() <mask> } <mask> <mask> override fun getRedBoxHandler(): RedBoxHandler? { <mask> return invokeDelegateMethod("getRedBoxHandler") </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove .map(ReactNativeHostHandler::getJSBundleFile) </s> add .map { it.getJSBundleFile(useDeveloperSupport) } </s> remove .map(ReactNativeHostHandler::getBundleAssetName) </s> add .map { it.getBundleAssetName(useDeveloperSupport) } </s> remove fun createReactInstanceManager(): ReactInstanceManager? { </s> add fun createReactInstanceManager(useDeveloperSupport: Boolean): ReactInstanceManager? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove @@ -46,10 +50,28 @@ public class MainApplication extends Application implements ReactApplication { </s> add + @Override + protected @Nullable String getBundleAssetName() { + if (BuildConfig.DEBUG) { + return super.getBundleAssetName(); + } else { + return UpdatesController.getInstance().getBundleAssetName(); + } + } });
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> override fun getJSBundleFile(): String? { <mask> return reactNativeHostHandlers.asSequence() <mask> .map(ReactNativeHostHandler::getJSBundleFile) <mask> .firstOrNull() ?: invokeDelegateMethod<String?>("getJSBundleFile") <mask> } <mask> <mask> override fun getBundleAssetName(): String? { <mask> return reactNativeHostHandlers.asSequence() </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove .map(ReactNativeHostHandler::getBundleAssetName) </s> add .map { it.getBundleAssetName(useDeveloperSupport) } </s> remove return reactNativeHostHandlers.asSequence() .map(ReactNativeHostHandler::createReactInstanceManager) </s> add // map() without asSequence() gives a chance for handlers // to get noticed before createReactInstanceManager() return reactNativeHostHandlers .map { it.createReactInstanceManager(useDeveloperSupport) } </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> override fun getBundleAssetName(): String? { <mask> return reactNativeHostHandlers.asSequence() <mask> .map(ReactNativeHostHandler::getBundleAssetName) <mask> .firstOrNull() ?: invokeDelegateMethod<String?>("getBundleAssetName") <mask> } <mask> <mask> override fun getUseDeveloperSupport(): Boolean { <mask> return host.useDeveloperSupport </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove .map(ReactNativeHostHandler::getJSBundleFile) </s> add .map { it.getJSBundleFile(useDeveloperSupport) } </s> remove return reactNativeHostHandlers.asSequence() .map(ReactNativeHostHandler::createReactInstanceManager) </s> add // map() without asSequence() gives a chance for handlers // to get noticed before createReactInstanceManager() return reactNativeHostHandlers .map { it.createReactInstanceManager(useDeveloperSupport) } </s> remove fun getBundleAssetName(): String? { </s> add fun getBundleAssetName(useDeveloperSupport: Boolean): String? { </s> remove fun getJSBundleFile(): String? { </s> add fun getJSBundleFile(useDeveloperSupport: Boolean): String? { </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) { </s> add * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt
keep keep keep keep replace keep keep keep keep keep
<mask> reactApplicationContext: ReactApplicationContext, <mask> jsContext: JavaScriptContextHolder <mask> ): List<JSIModuleSpec<JSIModule>> { <mask> reactNativeHostHandlers.forEach { handler -> <mask> handler.onRegisterJSIModules(reactApplicationContext, jsContext) <mask> } <mask> userJSIModulePackage?.getJSIModules(reactApplicationContext, jsContext) <mask> return emptyList() <mask> } <mask> } </s> [updates] modularize expo-updates without further app setup (#14198) # Why modularize expo-update without app project setup # How - [ios] introduce `EXUpdatesAppDelegate` to replace AppDelegate setup - [ios] move create-manifest-ios.sh into podspec - [android] leverage `ReactNativeHostWrapper` and put into UpdatePackages to replace classic MainApplication setup - [android] move create-manifest-android.gradle into library build.gradle # Test Plan these changes relies on expo-modules-core. however, our `expo-template-bare-minimum` template does not migrate to expo-modules-core yet. so i initiated a project from `expo-template-bare-minimum` with expo-modules-core migration to test the functionalities. please check [bare-update project in this branch](https://github.com/expo/expo/commits/%40kudo/modularize-expo-update-test/apps/bare-update). test steps (based on bare-update project, the update url is `https://exp.host/@kudochien/bare-update`): 1. test release build (both ios and android) 2. modify App.js and `expo publish` 3. relaunch apps twice and see if the app has the updated content. to test backward compatible, revert the `replace expo-updates integration by in-module setup` commit and go through the steps above again. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md). - [x] This diff will work correctly for `expo build` (eg: updated `@expo/xdl`). - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). </s> remove fun onRegisterJSIModules(reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder) { </s> add fun onRegisterJSIModules( reactApplicationContext: ReactApplicationContext, jsContext: JavaScriptContextHolder, useDeveloperSupport: Boolean ) { </s> add * * @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support </s> remove android.applicationVariants.each { variant -> </s> add if (!android.hasProperty('libraryVariants')) { // For traditional application level integration, will be no-op to prevent duplicated app.config creation. return; } if (!appProject) { // For instrumented test, the appProject will be null. return; } if (findProperty('expo.updates.createManifest') == 'false') { return; } appProject.android.applicationVariants.each { variant -> </s> remove .map(ReactNativeHostHandler::getJSBundleFile) </s> add .map { it.getJSBundleFile(useDeveloperSupport) } </s> remove .map(ReactNativeHostHandler::getBundleAssetName) </s> add .map { it.getBundleAssetName(useDeveloperSupport) } </s> add protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); }
https://github.com/expo/expo/commit/2f6287e11c85681eae0c4a48cdfc94edf3101445
packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt