Repository: opencv
Issue: ios 4.8 Compilation error on Mac M1
Labels: bug,category: build/install,platform: ios/osx,incomplete

### System Information

 python 版本：4.5.0
操作系统/平台：Mac (m1pro芯片)
Python 版本：3.11.4
macos: 13.4.1 (22F82)
xcode: 14.3.1 (14E300c)
cmake:3.26.4


### Detailed description
```
按照文档写的会报错：执行python3 opencv-4.5.0/platforms/ios/build_framework.py ios 报错
 -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          -framework UIKit -framework AssetsLibrary -framework Accelerate -framework CoreGraphics -framework QuartzCore ade
--     3rdparty dependencies:       libprotobuf libjpeg-turbo libwebp libpng zlib quirc
-- 
--   OpenCV modules:
--     To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching video videoio world
--     Disabled:                    -
--     Disabled by dependency:      -
--     Unavailable:                 java js python2 python3 ts
--     Applications:                -
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
-- 
--   Media I/O: 
--     ZLib:                        build (ver 1.2.11)
--     JPEG:                        build-libjpeg-turbo (ver 2.0.5-62)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         build (ver 1.6.37)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     AVFoundation:                YES
--     iOS capture:                 YES
-- 
--   Parallel framework:            GCD
-- 
--   Trace:                         YES (built-in)
-- 
--   Other third-party libraries:
--     Custom HAL:                  NO
--     Protobuf:                    build (3.5.1)
-- 
--   Python (for build):            NO
-- 
--   Objective-C wrappers:          YES
-- 
--   Install to:                    /Users/zhangteng/Desktop/one/ios/build/build-arm64-iphoneos/install
-- -----------------------------------------------------------------
-- 
-- Configuring incomplete, errors occurred!
============================================================
ERROR: Command '['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DOPENCV_INCLUDE_INSTALL_PATH=include', '-DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty', '-DFRAMEWORK_NAME=opencv2', '-DIOS_ARCH=arm64', '-DCMAKE_TOOLCHAIN_FILE=/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/zhangteng/Desktop/one/opencv-4.5.0', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.
============================================================
Traceback (most recent call last):
  File "/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/build_framework.py", line 151, in build
    self._build(outdir)
  File "/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/build_framework.py", line 125, in _build
    self.buildOne(target[0], target[1], main_build_dir, cmake_flags)
  File "/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/build_framework.py", line 251, in buildOne
    execute(cmakecmd, cwd = builddir)
  File "/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/build_framework.py", line 44, in execute
    retcode = check_call(cmd, cwd = cwd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DOPENCV_INCLUDE_INSTALL_PATH=include', '-DOPENCV_3P_LIB_INSTALL_PATH=lib/3rdparty', '-DFRAMEWORK_NAME=opencv2', '-DIOS_ARCH=arm64', '-DCMAKE_TOOLCHAIN_FILE=/Users/zhangteng/Desktop/one/opencv-4.5.0/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCPU_BASELINE=DETECT', '/Users/zt/Desktop/one/opencv-4.5.0', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode']' returned non-zero exit status 1.
```

### Steps to reproduce

python3 opencv-4.5.0/platforms/ios/build_framework.py ios
[build_framework.py.zip](https://github.com/opencv/opencv/files/11981357/build_framework.py.zip)


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)