forked from expo/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-create with-dev-client template (expo#269)
* Re-create with-dev-client template Make with-dev-client template use SDK 41 and the expo-dev-client package. Steps used to create the template: 1. `expo init -t blank --name HelloWorld with-dev-client` 2. `cd with-dev-client` 3. Set `name`, `slug`, `scheme`, `android.package` and `ios.bundleIdentifier` in app.json. 4. `expo prebuild` 5. `cd ..` 6. `git checkout with-dev-client/README.md with-dev-client/App.js` * Opened project in Xcode IDEWorkspaceChecks.plist created automatically * Update username in Expo.plist * Remove "Start Packager" build phase * Update package.json: update scripts and remove `name` * Remove scheme matching package/bundleIdentifier (added by prebuild) * Remove .expo-shared/assets.json * Add eas.json From https://docs.expo.io/clients/eas-build/#modifying-your-easjson
- Loading branch information
Showing
78 changed files
with
637 additions
and
652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
node_modules/ | ||
.expo/ | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# @generated expo-cli sync-2138f1e3e130677ea10ea873f6d498e3890e677b | ||
# The following patterns were generated by expo-cli | ||
|
||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
*.hprof | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# Bundle artifacts | ||
*.jsbundle | ||
|
||
# CocoaPods | ||
/ios/Pods/ | ||
|
||
# Expo | ||
.expo/ | ||
web-build/ | ||
|
||
# @end expo-cli |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed
BIN
-17 Bytes
with-dev-client/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 0 additions & 2 deletions
2
with-dev-client/android/.gradle/buildOutputCleanup/cache.properties
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 43 additions & 32 deletions
75
with-dev-client/android/app/src/main/java/com/helloworld/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,65 @@ | ||
package com.helloworld; | ||
|
||
import expo.modules.devmenu.react.DevMenuAwareReactActivity; | ||
import expo.modules.devlauncher.DevLauncherController; | ||
import android.content.res.Configuration; | ||
import android.content.Intent; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.facebook.react.ReactActivity; | ||
import com.facebook.react.ReactActivityDelegate; | ||
import com.facebook.react.ReactRootView; | ||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; | ||
|
||
import expo.modules.devlauncher.DevLauncherController; | ||
import expo.modules.devmenu.react.DevMenuAwareReactActivity; | ||
import expo.modules.splashscreen.SplashScreenImageResizeMode; | ||
import expo.modules.splashscreen.singletons.SplashScreen; | ||
import expo.modules.splashscreen.SplashScreenImageResizeMode; | ||
|
||
|
||
public class MainActivity extends DevMenuAwareReactActivity { | ||
|
||
@Override | ||
public void onNewIntent(Intent intent) { | ||
if (DevLauncherController.tryToHandleIntent(this, intent)) { | ||
return; | ||
} | ||
super.onNewIntent(intent); | ||
} | ||
|
||
|
||
// Added automatically by Expo Config | ||
@Override | ||
public void onConfigurationChanged(Configuration newConfig) { | ||
super.onConfigurationChanged(newConfig); | ||
Intent intent = new Intent("onConfigurationChanged"); | ||
intent.putExtra("newConfig", newConfig); | ||
sendBroadcast(intent); | ||
} | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
super.onCreate(null); | ||
// SplashScreen.show(...) has to be called after super.onCreate(...) | ||
// Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually | ||
SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false); | ||
} | ||
|
||
|
||
/** | ||
* Returns the name of the main component registered from JavaScript. | ||
* This is used to schedule rendering of the component. | ||
*/ | ||
@Override | ||
protected String getMainComponentName() { | ||
return "main"; | ||
} | ||
|
||
@Override | ||
protected ReactActivityDelegate createReactActivityDelegate() { | ||
return DevLauncherController.wrapReactActivityDelegate( | ||
this, | ||
() -> new ReactActivityDelegate(this, getMainComponentName()) { | ||
@Override | ||
protected ReactRootView createRootView() { | ||
return new RNGestureHandlerEnabledRootView(MainActivity.this); | ||
} | ||
} | ||
); | ||
} | ||
/** | ||
* Returns the name of the main component registered from JavaScript. | ||
* This is used to schedule rendering of the component. | ||
*/ | ||
@Override | ||
protected String getMainComponentName() { | ||
return "main"; | ||
} | ||
|
||
@Override | ||
public void onNewIntent(Intent intent) { | ||
if (DevLauncherController.tryToHandleIntent(this, intent)) { | ||
return; | ||
@Override | ||
protected ReactActivityDelegate createReactActivityDelegate() { | ||
return DevLauncherController.wrapReactActivityDelegate(this, () -> new ReactActivityDelegate(this, getMainComponentName()) { | ||
@Override | ||
protected ReactRootView createRootView() { | ||
return new RNGestureHandlerEnabledRootView(MainActivity.this); | ||
} | ||
}); | ||
} | ||
super.onNewIntent(intent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
with-dev-client/android/app/src/main/java/com/helloworld/generated/BasePackageList.java
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
+38.3 KB
(520%)
with-dev-client/android/app/src/main/res/drawable/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
with-dev-client/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/iconBackground"/> | ||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
</adaptive-icon> |
5 changes: 5 additions & 0 deletions
5
with-dev-client/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/iconBackground"/> | ||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
</adaptive-icon> |
Binary file modified
BIN
+244 Bytes
(110%)
with-dev-client/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.22 KB
with-dev-client/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-921 Bytes
(82%)
with-dev-client/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-48 Bytes
(98%)
with-dev-client/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.25 KB
with-dev-client/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-245 Bytes
(91%)
with-dev-client/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(99%)
with-dev-client/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.41 KB
with-dev-client/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.39 KB
(80%)
with-dev-client/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+881 Bytes
(110%)
with-dev-client/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.01 KB
with-dev-client/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.55 KB
(85%)
with-dev-client/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+858 Bytes
(110%)
with-dev-client/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.48 KB
with-dev-client/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.98 KB
(80%)
with-dev-client/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<resources> | ||
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually --> | ||
<color name="iconBackground">#FFFFFF</color> | ||
<color name="splashscreen_background">#FFFFFF</color> | ||
</resources> | ||
<color name="colorPrimary">#023c69</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<resources> | ||
<string name="app_name">Hello App Display Name</string> | ||
</resources> | ||
<string name="app_name">HelloWorld</string> | ||
</resources> |
Oops, something went wrong.