mobile-install support for iOS?

196 views
Skip to first unread message

Hochhaus, Andy

unread,
Mar 26, 2017, 5:11:39 PM3/26/17
to bazel-discuss
Hello,

I love using bazel to build, test and run my code directly from the command line. This works very well for almost all of my code (go, linux c++, android java, closure style JS/CSS, etc). However iOS apps still require that I use tulsi with Xcode to simulate or install the binaries on the device. This iOS workflow is sub-optimal from my perspective.

If the bazel team wanted to deploy to an iOS device directly from the command line a few options exist. For example, an official apple solution is to use `Apple Configurator 2`, then `Install Automation Tools...` and finally call `cfgutil install-app` from the command line. Unfortunately, `cfgutil` has no way to update the app so it needs to be removed first. A few other unofficial tools also exist (eg: ios-deploy, fastlane, libimobiledevice). I believe that the unofficial solutions depend on a private apple API. Basic usage of that API is relatively simple though (< 600 LOC).

Has the bazel team considered extending mobile-install to work on iOS?

Best,
Andy

Damien Martin-Guillerez

unread,
Mar 27, 2017, 2:47:35 AM3/27/17
to Hochhaus, Andy, bazel-discuss
Hi Andy,

mobile-install was needed at the time it was implemented and I believe we could do it simply as a run target now. Why not try to build a skylark extension that does just that?

So you would do something like `bazel run //my/ios/target:deploy-to-ios-device`?

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CALJWjC0r6ARdf7_fcpMnwD-q152xHRU-k7%3DstGpeO1o%2B%2BtJuhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hochhaus, Andy

unread,
Mar 27, 2017, 6:20:08 PM3/27/17
to bazel-discuss
On Sun, Mar 26, 2017 at 11:47 PM, Damien Martin-Guillerez
<dmar...@google.com> wrote:
> mobile-install was needed at the time it was implemented and I believe we could do it simply
> as a run target now. Why not try to build a skylark extension that does just that?

Thanks. This should work.

Is the long term plan to remove mobile-install for android as well?

-Andy

Damien Martin-Guillerez

unread,
Mar 27, 2017, 6:31:12 PM3/27/17
to Hochhaus, Andy, bazel-discuss

I think this is a good idea but we do not have any plan whatsoever right now. I just had to think of that (or rather make Lukacs think of that :p) to answer the question wether we need a special command for deployment or if `bazel run` was enough. So far I haven't found a deployment that cannot be done with a run target.


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.

Hochhaus, Andy

unread,
Mar 28, 2017, 12:18:45 AM3/28/17
to bazel-discuss
On Mon, Mar 27, 2017 at 3:31 PM, Damien Martin-Guillerez
<dmar...@google.com> wrote:
> I think this is a good idea but we do not have any plan whatsoever right
> now. I just had to think of that (or rather make Lukacs think of that :p) to
> answer the question wether we need a special command for deployment or if
> `bazel run` was enough. So far I haven't found a deployment that cannot be
> done with a run target.

This makes perfect sense. My needs are met for the time being.

In an ideal future world, it would be nice if installs were done in
the same manner on both iOS and android. That way bazel could hide all
of the complexity from the developer.

Best,
Andy
Reply all
Reply to author
Forward
0 new messages