Giter Club home page Giter Club logo

generator-rn-toolbox's Introduction

React Native Toolbox Build Status NPM downloads license

Yeoman generators to kickstart your react-native v0.48+ projects.

⚠️ Deprecation notice ⚠️

Dear user, we are working on a complete rewrite of generator-rn-toolbox

We are be deprecating this repo and migrating its features to react-native-make

Already available:

Features

In an existing React Native project, our generator contains sub-generators that will help you with:

Requirements

  • You need node > 6 installed
  • Ruby > 2.2.3
  • Bundler installed (gem install bundler)
  • Yeoman installed (npm i -g yo)
  • Yarn installed (brew install yarn)

Usage

Install the main yeoman generator:

npm install -g yo generator-rn-toolbox

Then follow the docs for any sub-generator listed above in the features.

If starting from scratch, use the react-native init <ProjectName> && cd <ProjectName> command to instantiate your React Native Project (for more go see the official React Native getting started).

It is recommended to initiate the git repository right after instantiating the app and to do you first commit.

It is also recommended to do a separate commit after running each of these steps.

Contributing

See our contributing guidelines

Local development

To run the generator with your local version:

git clone https://github.com/bamlab/generator-rn-toolbox.git
cd generator-rn-toolbox
npm link

When you're done, you can run npm unlink to stop using your local version.

Disclaimer

To better understand your usage of this tool, basic analytics have been enabled. It only records generators usage as anonymous page views and does not track any user information

generator-rn-toolbox's People

Contributors

4ian avatar almouro avatar amauryliet avatar amsul avatar antoinedoubovetzky avatar arlevoy avatar danilvalov avatar deecewan avatar designorant avatar felixmeziere avatar gianpaj avatar guilhermebruzzi avatar juliennassar avatar justeleblanc avatar kraynel avatar lechinoix avatar marekkalnik avatar minishlink avatar nhacsam avatar obetomuniz avatar philolo1 avatar pleportz avatar samox avatar tcheymol avatar thibc avatar tychota avatar wrousseau avatar xavierlefevre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-rn-toolbox's Issues

XCode Project Duplicate Entry Causes Linking Failure

If you run the generators in the following order, the react-native link command will fail at some point due to the following duplicate entry in your xcode project file.

ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

Ran the generators in the following order (based on your Readme instructions):

  1. yo rn-toolbox:assets --icon icon.png
  2. yo rn-toolbox:assets --splash splash.psd --ios
  3. yo rn-toolbox:assets --splash splash.psd --android
  4. yo rn-toolbox:assets --icon icon.png --splash splash.psd --store

After running the 4th command, the following error is observed when you run react-native link:
napkin 01-01-18 4 30 33 pm

when generating android splash screen, files with -0, -1, -2, -3 suffixes are being created.

This is the command I'm running - yo rn-toolbox:assets --splash ~/Downloads/chrome/Splash\ Screen --android and it finishes successfully and does generate the splash screens. However, looks like in each folder, it's creating 4 files -
launch_screen-0.png
launch_screen-1.png
launch_screen-2.png
launch_screen-3.png
even though the output says -
Wrote android/app/src/main/res/drawable-land-ldpi/launch_screen.png

It would still be okay but looks like android does not allow the character - in the resource filenames so when trying to run my app, I'm getting the following error message -
Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore

I have looked into the code and it looks like the number suffixed files are supposed to be generated for ios icons so I'm guessing it's somehow leaking from there and making it's way into splash screen generation? I would love to make a PR if you could point me to the right direction about fixing it.

[ESLint] Lint command failed after install

The eslint --quiet command fails with the following output:

/path/to/my/project/homefriend/node_modules/eslint-config-airbnb/rules/react-a11y.js:
	Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
	Value "[object Object]" no (or more than one) schemas match.

Referenced from: airbnb
Referenced from: /path/to/my/project/homefriend/.eslintrc
Error: /path/to/my/project/homefriend/node_modules/eslint-config-airbnb/rules/react-a11y.js:
	Configuration for rule "jsx-a11y/anchor-has-content" is invalid:
	Value "[object Object]" no (or more than one) schemas match.

Something to do with airbnb's "jsx-a11y/anchor-has-content" rule but I don't really know what's causing it.
Any idea ?

Thanks

Launch Screen for iPad Multitasking

I'm trying to use the yo rn-toolbox:assets --splash ./img/Launch_2208x2208.png --ios command but I get an error for iPad Multitasking:

ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch story board in bundle 'com.abc'."

I know I can disable iPad Multitasking by requiring full screen, but would it be nice that generator-rn-toolbox supports to make it as easy as a command line?

[Android] splash screen drawables is in android/app/src/undefined folder

For some reason, the png files are placed in the undefined folder.

Output:


yo rn-toolbox:assets --splash splash.png --android
? Name of your react-native project MeinBau
identical android/app/src/main/res/values/colors.xml
identical android/app/src/main/res/drawable/launch_screen_bitmap.xml
identical android/app/src/main/res/values/styles.xml
Wrote ./android/app/src/undefined/res/drawable-port-ldpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-port-mdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-port-hdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-mdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-hdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-ldpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-xhdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-port-xhdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-xxhdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-port-xxhdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-land-xxxhdpi/launch_screen.png
Wrote ./android/app/src/undefined/res/drawable-port-xxxhdpi/launch_screen.png

Make fastlane generator works with cordova

AssertionError: /Users/nicolasd/Projects/project/android/app/build.gradle doesn't exist
    at EditionInterface.module.exports [as read] (/Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/node_modules/mem-fs-editor/lib/actions/read.js:18:3)
    at FastlaneGenerator._extendGradle (/Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/generators/fastlane/index.js:125:26)
    at FastlaneGenerator.writing (/Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/generators/fastlane/index.js:111:10)
    at Object.<anonymous> (/Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/node_modules/yeoman-generator/lib/base.js:439:23)
    at /Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/node_modules/run-async/index.js:26:25
    at /Users/nicolasd/.nvm/versions/node/v6.2.0/lib/node_modules/generator-rn-toolbox/node_modules/run-async/index.js:25:19

Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "chang1.png" this most likely mean s the gm/convert binaries can't be found

Why is this happening? I have installed ImageMagick for windows.

Error: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "chang1.png" this most likely mean
s the gm/convert binaries can't be found
at ChildProcess. (C:\Users\admin\AppData\Roaming\npm\node_modules\generator-rn-toolbox\node_modules\gm\lib
command.js:232:12)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:188:7)
at ChildProcess.cp.emit (C:\Users\admin\AppData\Roaming\npm\node_modules\generator-rn-toolbox\node_modules\cross-spawn
\lib\enoent.js:36:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

I also try convert --version . It displays like this......

PS F:\ReactNativeProject\MyApp> convert --version
Invalid drive specification.

[App CRASH] [SplashScreen generator] due to color.xml declaration

On Investo Project, we encountered an issue after using the splashscreen generator :

06-30 08:01:32.714  6645  6645 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Drawable com.investo.debug:drawable/launch_screen_bitmap with resource ID #0x7f02003f
06-30 08:01:32.714  6645  6645 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/drawable/launch_screen_bitmap.xml from drawable resource ID #0x7f02003f
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:725)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.Resources.getDrawable(Resources.java:771)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.Context.getDrawable(Context.java:525)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2577)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2627)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:433)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:424)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.Activity.setContentView(Activity.java:2434)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:114)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:100)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6679)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Drawable com.investo.debug:color/splashBackground with resource ID #0x7f0c0037
06-30 08:01:32.714  6645  6645 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File rgb(60,147,239) from drawable resource ID #0x7f0c0037
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:725)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.Resources.loadDrawable(Resources.java:858)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.content.res.TypedArray.getDrawable(TypedArray.java:928)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.LayerDrawable.updateLayerFromTypedArray(LayerDrawable.java:388)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:267)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:196)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.DrawableInflater.inflateFromXml(DrawableInflater.java:130)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1227)
06-30 08:01:32.714  6645  6645 E AndroidRuntime: 	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1200)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:715)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.content.res.Resources.getDrawable(Resources.java:771)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.content.Context.getDrawable(Context.java:525)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2577)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2627)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:433)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:424)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.Activity.setContentView(Activity.java:2434)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:114)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:100)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6679)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
06-30 08:01:32.717  6645  6645 E AndroidRuntime: Caused by: java.io.FileNotFoundException: rgba(0,0,0,0)

Our .psd file was at the recommended size and with a fixed background color.

In the file android/app/src/main/res/values/colors.xml there was a rgba color created by the generator :

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="splashBackground" type="color">rgba(0,0,0,0)</item>
</resources>

I fixed the app by editing it like this :

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="splashBackground" type="color">#3c93ef</item>
</resources>

[Assets] Add play store default assets

Hello @Almouro !

Great job on this plugin, I use it almost everyday !
Is is possible to add the images with the sizes required by the Play Store and the iTunes Store ?
The sizes are :

  • 500wx500h logo for iTunes
  • 512wx512h logo for Play Store
  • 1024wx500h image (could look like splash screen) for Play Store

Thanks a lot

Thibaut

Generating splash screen on Android causes crash due to launch_screen_bitmap.xml syntax

My apologies for not having the stack trace, I was doing this on my other computer which isn't available at the moment.

Generating splash screens for Android resulted in the app crashing on launch, I was able to fix it by changing the second line in android/app/src/main/res/drawable/launch_screen_bitmap.xml from:

<item android:drawable="@color/splashBackground"/>

to the following:

<item android:drawable="@android:color/darker_gray"/>

I'm incredibly new to Android development so not sure why or how that fixed things :)

prompt().then is not a function with node 7.9.0

Hello ,

I have an issue running the generator. I am running an ubuntu machine and have installed imagemagick (6) and node (7), when I run :

yo rn-toolbox:assets --icon  ~/Downloads/200_200.png

I get TypeError: this.env.adapter.prompt(...).then is not a function
Is this related to the fact that node should be run with the --harmony-async-await ?

[CircleCI] No generator named circle installed

Hi everyone,

When running the yo rn-toolbox:circle as described in the doc I get the following error:

You don’t seem to have a generator with the name “rn-toolbox:circle” installed.

My first guess is that it is linked to this commit.
I don't have time to investigate more right now

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

yo rn-toolbox:assets --icon icon.png

class ResourcesGenerator extends Base {
^^^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)

Support for multiple build configurations?

We use different icons for our development / staging builds and the production build to allow people to have both on their phone simultaneously. Is there a way to add multiple icon sets so we can configure the correct one for each build configuration?

Error running yo rn-toolbox:assets --icon

When I run yo rn-toolbox:assets --icon I get this error:

class ResourcesGenerator extends Base {
^^^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.defineProperty.get [as rn-toolbox:assets] (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:40:23)
    at Store.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:64:35)
    at Environment.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:261:21)

Splashscreen too small for Nexus 6

Hey,

I used this tool to generate my splashscreens on ios and android.
Works great on iOS but on a Android Nexus 6 (http://www.gsmarena.com/motorola_nexus_6-6604.php), the launchscreen is not taking all the screen. I have big grey borders around the image.

I see that the drawable-port-xxx-hdpi is only 1280x1920 or the phone has a screen size of 1440x2660. Is it possible to handle splashscreen for this device size?

Thanks!

"this most likely means the gm/convert binaries can't be found",attempting to change Icon

When I was using 'yo rn-toolbox:assets --icon ./images/mainIcon.png' to change the app's icon I encountered:

events.js:182 throw er; // Unhandled 'error' event ^ Error: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "images/mainIcon.png" this most likely means the gm/convert binaries can't be found at ChildProcess.<anonymous> (/usr/local/lib/node_modules/generator-rn-toolbox/node_modules/gm/lib/command.js:232:12) at emitOne (events.js:115:13) at ChildProcess.emit (events.js:210:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:195:12) at onErrorNT (internal/child_process.js:366:16) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9)

Getting the following error, seems to be an issue with image generator

Error 1: ITMS-90096 - Your binary is not optimized for iPhone 5
Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a launch image referenced in the Info.plist under UILaunchImages with a UILaunchImageSize value set to {320, 568}. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images. Learn more about iPhone 5 support and app launch images by reviewing the 'iOS Human Interface Guidelines' at https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen.

Error after start: events.js:182

Node version: 8

`? Name of your react-native project myproject

events.js:182
throw er; // Unhandled 'error' event
^
Error: Command failed: identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.

at ChildProcess.onExit (/usr/local/lib/node_modules/generator-rn-toolbox/node_modules/gm/lib/command.js:301:17)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:887:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:546:12)

`

generator is not accessible after installing

Your readme is a bit confusing. I haven't used Yo for a while but it's usually:

  1. Install generator
  2. call yo with generator name
  3. follow prompts

But the readme:

Retrieve all the generators with npm install -g yo generator-rn-toolbox

Retrieve all? What?

And then in a React Native project, use any above generator.

But... your generator is supposed to make a RN project, why would I use it from within a project?

Ok that's just language issues I guess. But I can't get your generator to show in the list:

$ yo 
? 'Allo CDK! What would you like to do? Install a generator
? Search npm for generators: rn-toolbox
? Here's what I found. Official generator → ෴
  Install one? rn-toolbox React-Native generators to kickstart your project
/Users/collumj/.nvm/versions/node/v6.9.1/lib
└── [email protected] 

I just installed a generator by running:

    npm install -g generator-rn-toolbox

? 'Allo CDK! What would you like to do? 
  Coffee Fullstack 
  Karma 
  Angular Gulp Coffee 
❯ Lean Mean 
  React Seed 
  Material React 

That's the end of the list. Is yours not called RN-Toolbox (or something similar) after it's installed? I don't get it.

App Icon not displaying

Hi,

I did the following steps to generate ICON.

  1. npm install -g yo generator-rn-toolbox
  2. myprjpath>yo rn-toolbox:assets --icon path\logo.png
    ? Name of your react-native project 'MyPrjName'.
    Entered Y. And it completed successfully.
    After that i started my project again but i did not see the icon.
    Could you please help me did i miss anything.

[Fastlane] Display error upon bundler failure to run

In a fresh react-native v0.43 project I get the following error when running fastlane-setup

? Please confirm the project name gen
? Commit keystore files? No
identical fastlane/Appfile
identical fastlane/Fastfile
identical environment/index.js
identical Gemfile
identical android/app/src/main/res/values/strings.xml
 conflict .gitignore
? Overwrite .gitignore? overwrite this and all others
    force .gitignore
    force android/app/build.gradle
    force ios/gen.xcodeproj/project.pbxproj
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: spawn bundle ENOENT
    at exports._errnoException (util.js:1033:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Error: Command failed: Invalid Parameter - -resize

yo rn-toolbox:assets --icon path/icon.png
When i run the above command in my project i am getting following error:
throw er; // Unhandled 'error' event
^

Error: Command failed: Invalid Parameter - -resize

I am running this on android and my icon size is 192*192.

App Store screenshots

Hi guys.
First of all, congratulations for this amazing generators.

Did you guys have any solution to generate app store screenshots for react native applications?
Fastlane has the native solutions for each OS
https://docs.fastlane.tools/getting-started/ios/screenshots/
https://docs.fastlane.tools/getting-started/android/screenshots/

But I am thinking some react native way, probably with jest?
How are you guys doing app store screenshots for react native applications at bam.tech?
Thanks

Could not read path 'C:\MyApp\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-az-rAZ'.

After generating the icons (which went well with ImageMagick legacy tools option), when running 'react-native run-android' I had the following error:

* What went wrong:
Could not read path 'C:\MyApp\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-az-rAZ'.
> C:\MyApp\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-az-rAZ

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED

Total time: 7.502 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

(node:3316) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined

Doc not clear for splashscreen

Thank you for this awesome repo. When you say You'll need an image for your splash with a size of more than 2208 px (psd is supported). size = width?

Generated Invalid SplashScreen Image Sizes

Hello guys,

I just launched yo rn-toolbox:assets --splash backgroundOnboarding.psd --ios
With a PSD with the right format, and it created a bunch of images that don't seem to have the proper size for x-code :

screen shot 2017-02-01 at 15 54 37

Would you know from where it comes ?

yarn flow failing on the Page component

I've got an issue while running flow on a base generated project.
Indeed, noNavBar and noMargin props of the Page component are typed as required, but I don't think they should be.

If you agreed, I can do a Pull Request !

Update processes

This is a batch of small enhancements

  • Fastlane
    • Use clone_branch_directly in setup
    • Use read_only in match in build phase
  • Jest
    • Ask yarn or npm
    • Use yarn test:unit instead of npm run test:unit

Missing App Store icon (1024pt)

This works great but it looks like (possibly due to iTunes/XCode updates) it misses generating the 1024pt App Store icon. It appears to be blank in Images.xcassets and iTunesConnect refuses to publish to TestFlight because of the lack of an icon. Maybe it was never this toolkit's intention to generate that specific icon but I think it would be good to do so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.