Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbt-sri-platform should generate folders "android" and "ios" #8

Open
1 of 3 tasks
frgomes opened this issue Nov 5, 2017 · 4 comments
Open
1 of 3 tasks

sbt-sri-platform should generate folders "android" and "ios" #8

frgomes opened this issue Nov 5, 2017 · 4 comments
Assignees

Comments

@frgomes
Copy link

frgomes commented Nov 5, 2017

At the moment, the developer has to generate folders for androi and ios like below:

$ project=myAwesomeProject
$ react-native init $project
$ mv $project/android $project/ios .
$ rm -r -f $project

This should be automated by our SBT plugin
https://github.com/scalajs-react-interface/sbt-sri-platform

Tasks:

  • investigate requirements and limitations;
  • implement generation of folder for Android;
  • implement generation of folder for iOS;
@frgomes
Copy link
Author

frgomes commented Nov 5, 2017

Investigation

Android

Apparently easy: g8 should be able to generate the entire folder.

However, my tests demonstrated that the folder is generated empty. The root cause is unknown.

iOS

There are several hashes that need to be calculated, which cannot be done in g8.

Also, it seems like XCode is a moving target. Certain developers report that Apple keeps moving things around and breaking developer's code. So, from this perspective, we should not join the group of users affected by modifications in XCode.

I recommend that we keep the manual procedure in the case of iOS:

$ project=myAwesomeProject
$ react-native init $project
$ mv $project/ios .
$ rm -r -f $project

@frgomes
Copy link
Author

frgomes commented Jun 3, 2018

@virtualirfan
I think that sbt-sri-platform should provide comands for automating this sort of mundane tasks.

  • Apparently, it's just a handful of bash commands in the case of Android; and I would say that these commands should ideally be fired automagically by SBT when necessary.
  • The case of IOS seems more complicated and I'd say that it only makes sense to support IOS after we gain experience with such procedure for Android.

@frgomes frgomes changed the title g8 should generate folders "android" and "ios" sbt-sri-platform should generate folders "android" and "ios" Jun 3, 2018
@frgomes frgomes self-assigned this Jun 3, 2018
@virtualirfan
Copy link

Not sure why things are harder for ios versus android.

$ react-native init $project creates both ios and android projects and all that has to happen is to mv and rm, right? So, why not just have the sbt plugin just run the bash commands to generate files and then mv/rm?

I'm probably missing something.

I'm not in favor of two different process for ios and android :-(

@frgomes
Copy link
Author

frgomes commented Jun 3, 2018

@virtualirfan : You are correct. The evaluation above was done long time ago and I was considering a different strategy. If we consider that SBT can run arbitrary commands (and it can!) we can automate the entire process which is now done by hand. From this perspective... yes: both Android and IOS are conceptually the same: just a handful of commands which prepare the environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants