Converting Storyboard from iPhone to iPad: A Practical Guide

Converting Storyboard from iPhone to iPad: A Practical Guide

28 February 2025 Stephan Petzl Leave a comment Xcode

Transitioning an iPhone application to support iPad can be a daunting task, especially when working with storyboards in Xcode. If you’re looking to convert your iPhone storyboard for iPad use, this guide offers a step-by-step approach to simplify the process.

Step-by-Step Conversion Process

  1. Duplicate Your Storyboard: Start by duplicating your existing iPhone storyboard. Rename the copy to something like MainStoryboard_iPad.storyboard.
  2. Edit the Source Code: Close Xcode and open the duplicated storyboard file in a text editor. Look for the following line:
    targetRuntime="iOS.CocoaTouch" and change it to targetRuntime="iOS.CocoaTouch.iPad".
  3. Adjust Screen Metrics: Locate the line <simulatedScreenMetrics key="destination" type="retina4"/> and change it to <simulatedScreenMetrics key="destination"/>.
  4. Reopen in Xcode: Save your changes and reopen Xcode. Your new storyboard will now reflect an iPad layout, although elements may need rearranging.

Additional Tips

  • Constraints Adjustment: After conversion, you may need to adjust constraints to fit the new layout.
  • Utilize Size Classes: For a more dynamic approach, consider using Xcode’s size classes feature to create a storyboard that adapts to different device sizes. This is especially useful for universal applications.

Leveraging Repeato for Testing

Once you’ve converted your storyboard, ensuring that your application functions correctly across different devices is crucial. This is where automated testing tools like Repeato come into play. Repeato offers a no-code test automation solution that can significantly speed up the testing process for both iOS and Android apps.

With Repeato, you can easily record tests using its test recorder, and its computer vision and AI capabilities ensure that your tests are robust and reliable. The platform supports data-driven and keyword-driven testing, making it a versatile choice for developers. Additionally, Repeato’s ability to save test data in text and JSON formats makes version control straightforward.

For more information on how Repeato can enhance your testing workflow, visit our documentation or explore our advanced testing techniques.

Like this article? there’s more where that came from!