storybookjs / native

📱 Storybook for Native: iOS, Android, Flutter
MIT License
184 stars 29 forks source link

Possiblity to use storybook with expo and ios device #64

Open PPillau opened 3 years ago

PPillau commented 3 years ago

As I understand the native storybook needs an emulator to work / display stories. Is there any possibility to use an actual ios device (like for example the expo->iOS functionality) to get the storybook to work?

amalik2 commented 3 years ago

Hey @PPillau , I'm not an expert with iOS or Expo so I can't provide a definitive answer here. However, this should be possible IF its possible to communicate with your real iOS device through terminal commands. Maybe simctl provides this functionality with real devices?

For reference, you can look at how storybook native communicates with an emulator open on your computer:

A controller class sends data to a local express server here: https://github.com/storybookjs/native/blob/master/packages/controllers/src/controllers/LocalEmulatorController.ts#L75

The express server runs terminal commands using simctl to open deep links: https://github.com/storybookjs/native/blob/master/packages/dev-middleware/src/handlers/deepLink.ts#L18