0

I am developing an iOS app using React Native with Expo, and the app is primarily designed for iPhone and iPad. However, when running the app on macOS with an M chip, users can resize the window, which causes UI issues since the app is not designed to adapt to arbitrary window sizes.

My question is how can I restrict the window resizing when my app is running on macOS under iOS emulation?

I want to ensure that the app maintains a consistent size, similar to how it would appear on an iPad, without allowing the user to resize the window arbitrarily on macOS.

Any suggestions or best practices would be greatly appreciated!

I have tried using Platform.OS === 'macos' to adjust the views accordingly, but it doesn't seem to work as expected since the app recognizes the OS as running on an iPad not macOS.

2
  • I don't have an answer for you, but a caution: have you tested on an iPhone/iPad while using split-view and other forms of multitasking? These will change the "consistent" size and may also cause UI issues. Commented Aug 16, 2024 at 16:35
  • 1
    @StephenP , yes I already checked and tested it and since iPadOS only allows two sizes for the split-view mode, it was very easy to adjust the views for this case, but the problem for macOS is that the user has the freedom to adjust the window in any size they like, thank you for the caution btw Commented Aug 16, 2024 at 16:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.