beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.48k stars 353 forks source link

Failed to build ios with Sonoma on M1 and Python 3.9.6 #1767

Closed spyke555 closed 2 months ago

spyke555 commented 2 months ago

Describe the bug

Setting up a Mac Mini development environment and I've been able to get the macos and andoird builds working using a new helloworld app, however ios build are failing.

Looks like the build is failing at the code signing step. I've followed suggestions provided here without success:

Code Sign Error in macOS Monterey, Xcode - resource fork, Finder information, or similar detritus not allowed

I did also try building in xcode which seemed to work but helloworld app would not run in simulator.

I have seen others mention issues with Sonoma but they were using Python 3.12, should I consider upgradeing to that? Any other suggestions / guidance would be appreciated.

Steps to reproduce

On an M1 Mac Mini:

1) Update OS to Sonoma 14.4.1 2) Update Xcode to 15.3 3) Follow MacOS tutorials 0 and 1 to confirm development environment setup 4) Create IOS app with: briefcase create ios 5) Build IOS app with: briefcase build ios

Expected behavior

Per tutorial 5, would expect build to complete. Would expect some form of error message indicating what needs to be corrected to move forward.

Screenshots

Screenshot 2024-05-02 at 6 15 09 AM

Environment

Logs

briefcase.2024_05_02-06_06_19.build.log

Additional context

No response

rmartin16 commented 2 months ago

FWIW, I cannot reproduce this after upgrading to 14.4.1 and Xcode 15.3. Notably, though, I'm running Sonoma in a VM on Intel hardware.

Adding error text for seo.

           [helloworld] Building Xcode project...                                                                                                                       xcode.py:393
                                                                                                                                                                   subprocess.py:711
           >>> Running Command:                                                                                                                                    subprocess.py:711
           >>>     xcodebuild build -project '/Users/sandy/Documents/Programming/BeeWare/helloworld/build/helloworld/ios/xcode/Hello World.xcodeproj' -destination subprocess.py:711
           'platform="iOS Simulator"' -configuration Debug -arch arm64 -sdk iphonesimulator -quiet                                                                                  
           >>> Working Directory:                                                                                                                                  subprocess.py:711
           >>>     /Users/sandy/Documents/Programming/BeeWare/helloworld                                                                                           subprocess.py:711
[06:06:19] /Users/sandy/Documents/Programming/BeeWare/helloworld/build/helloworld/ios/xcode/build/Debug-iphonesimulator/Hello World.app: resource fork, Finder     subprocess.py:681
           information, or similar detritus not allowed                                                                                                                             
           Command CodeSign failed with a nonzero exit code                                                                                                        subprocess.py:681
           note: Run script build phase 'Purge Python Binary Modules for Non-Target Platforms' will be run during every build because the option to run the script subprocess.py:681
           phase "Based 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:681
           dependency analysis" is unchecked. (in target 'Hello World' from project 'Hello World')                                                                                  
           ** BUILD FAILED **                                                                                                                                      subprocess.py:681
                                                                                                                                                                   subprocess.py:681
           >>> Return code: 65                                                                                                                                     subprocess.py:711
           Building...                                                                                                                                                  xcode.py:418
                                                                                                                                                                      __main__.py:44
           Unable to build app helloworld.                                                                                                                            __main__.py:45
spyke555 commented 2 months ago

Thanks martin16,

This machine is used for development only, so will try a full wipe and reinstall and report back if that helped. At least it's possible with this OS version. Appreciate the feedback.

freakboy3742 commented 2 months ago

Sorry to hear you're having problems; unfortunately, I'm in the same boat as rmartin16 - I can't reproduce what you're seeing.

A couple of avenues for exploration:

spyke555 commented 2 months ago

Thank you for the feedback guys!

I've gone nuclear and erased the Mac mini and did an OS re-install to start fresh. Installed Xcode only and then briefcase. From there did a new > dev which worked. Then did create iOS > build iOS > run iOS and after the command line tools downloaded at the build step Simulator came up and started the hello world app.

So it was definitely an issue with my config / downloads but not sure which.