How to run apps faster on ios and android in detach expo?

In detach apps we can only run throught xcode and android studio. Depending of computers it takes too long to run on devices. How can we run them faster? (expo, exp, command line, etc)

It doesn’t necessarily make things go faster, but Fastlane can be a great help with building from the terminal.

I take that back a little bit, because I actually did manage to get our Android builds to run a lot faster by tweaking our Fastlane config a bit. I found out the standard Expokit production build was building many different APK’s- different ones for debug, etc. I changed our Fastfile to only build the release/ prod/ minSdk task and now building for Android only takes a few minutes. That part of our config looks like:

platform :android do
  lane :beta do
    gradle(task: "clean", project_dir: 'android')
    gradle(
      task: 'assembleProdMinSdkProdKernelRelease',
      project_dir: 'android'
    )
  end
end

Our iOS Fastfile config is pretty standard:

lane :beta do
    cert(
      team_id: ENV['TEAM_ID'],
      team_name: ENV['TEAM_NAME']
    )
    sigh(
      team_id: ENV['TEAM_ID'],
      team_name: ENV['TEAM_NAME'],
    )
    automatic_code_signing(
      use_automatic_signing: true,
      team_id: ENV['TEAM_ID'],
      path: 'ios/expo-project-name.xcodeproj'
    )
    gym(
      scheme: 'expo-project-name',
      workspace: 'ios/expo-project-name.xcworkspace',
      export_method: 'app-store',
    )
    pilot(
      team_id: ENV['ITC_TEAM_ID'],
      team_name: ENV['ITC_TEAM_NAME'],
      skip_waiting_for_build_processing: true
    )
  end

Note that this also automatically uploads to testflight once the build is complete.

@llamaluvr Thanks for replying me. I’d try Fastlane. So how can I run faster on device ? For now I have to open xcode/android and click run. It takes so much time.

Not sure how you make this faster. In my experience, it hasn’t been too bad- just a few minutes the first time, then maybe 30 seconds after that. Keep in mind that, when you’re building directly to the device in debug mode, you’re also running the Expo server in the background, and it’s live reloading your JavaScript changes without you rebuilding the app. You do not need to rebuild from Android Studio every time you make a code change. This is way faster than native iOS and Android, where you do have to rebuild every time.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.