Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iOS simulator instructions #458

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Add iOS simulator instructions #458

merged 2 commits into from
Jan 3, 2025

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Jan 2, 2025

I ran through the tutorial from scratch on macOS with no Xcode installed. After I installed Xcode, I launched it and accepted the license agreement, but I didn't install an iOS simulator. I tried to run briefcase create iOS. I got the following error in the build log:

           [helloworld] Updating app metadata...                                                                                                                        xcode.py:393
           Setting main module... started                                                                                                                               xcode.py:374
           Setting main module... done                                                                                                                                  xcode.py:374
                                                                                                                                                                        xcode.py:396
           [helloworld] Building Xcode project...                                                                                                                       xcode.py:396
           Building... started                                                                                                                                          xcode.py:397
                                                                                                                                                                   subprocess.py:827
           >>> Running Command:                                                                                                                                    subprocess.py:827
           >>>     xcodebuild build -project '/Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/Hello World.xcodeproj' -destination              subprocess.py:827
           'platform="iOS Simulator"' -configuration Debug -arch arm64 -sdk iphonesimulator -quiet                                                                                  
           >>> Working Directory:                                                                                                                                  subprocess.py:827
           >>>     /Users/dyeaw/beeware-tutorial/helloworld                                                                                                        subprocess.py:827
[09:55:33] --- xcodebuild: WARNING: Ignoring provided run destination because no scheme was passed.                                                                subprocess.py:195
[09:55:36] /* com.apple.actool.errors */                                                                                                                           subprocess.py:195
           /Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/HelloWorld/Images.xcassets: error: No available simulator runtimes for platform     subprocess.py:195
           iphonesimulator. SimServiceContext supportedRuntimes=[]                                                                                                                  
           /* com.apple.actool.document.notices */                                                                                                                 subprocess.py:195
           /Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/HelloWorld/Images.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][][][]:    subprocess.py:195
           notice: 76x76@1x app icons only apply to iPad apps targeting releases of iOS prior to 10.0.                                                                              
           /* com.apple.actool.compilation-results */                                                                                                              subprocess.py:195
           /Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/build/Debug-iphonesimulator/Hello World.app/[email protected]                     subprocess.py:195
           /Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/build/Debug-iphonesimulator/Hello World.app/AppIcon76x76@2x~ipad.png                subprocess.py:195
           /Users/dyeaw/beeware-tutorial/helloworld/build/helloworld/ios/xcode/build/Hello World.build/Debug-iphonesimulator/Hello                                 subprocess.py:195
           World.build/assetcatalog_generated_info.plist                                                                                                                            
                                                                                                                                                                   subprocess.py:195
           note: Run script build phase 'Install target specific Python modules' will be run during every build because the option to run the script phase "Based  subprocess.py:195
           on dependency analysis" is unchecked. (in target 'Hello World' from project 'Hello World')                                                                               
           note: Run script build phase 'Sign Python Binary Modules' will be run during every build because the option to run the script phase "Based on           subprocess.py:195
           dependency analysis" is unchecked. (in target 'Hello World' from project 'Hello World')                                                                                  
           ** BUILD FAILED **       

I went back and installed the iOS simulator, and then everything worked great. This PR updates the tutorial to give more guidance on steps to take after installing Xcode.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16
Copy link
Member

I'm not especially familiar with the intended workflows for Apple's toolchains but linking beeware/briefcase#1616; it seems likely that Briefcase should be able to take on this bootstrapping for the user.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this is something that we should be able to automate (or at the very least detect). I've opened beeware/briefcase#2099 to track this bug/feature. However, in the meantime, documenting the limitation is the least we can do.

@freakboy3742 freakboy3742 merged commit 9cda92b into main Jan 3, 2025
13 checks passed
@freakboy3742 freakboy3742 deleted the ios-simulator branch January 3, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants