Tag Archives: IOS stepped on the pit

[Solved] Mac homebrew error: Error: homebrew-core is a shallow clone.

Mac command line execution:

brew update 

The following error is reported:

Error: 
  homebrew-core is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!

The cause of this problem is usually the problem caused by the system update.

Solution: delete the homebrew core and then update it

cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade

[Solved] Xcode13.0 Package Error: Code signing “AipBase.framework“ failed.

There is no problem in direct operation, but the architecture/IPA/upload Appstore reports the error “unsupported architecture. Your executable contains unsupported architecture ‘[x86_64, i386]

Solution:
remove the supporting simulators i386 and x86_64 architecture in Baidu’s aipbase.framework and aipocrsdk.framework

# Use lipo -info to see what architecture is included
lipo -info AipBase.framework/AipBase  # Architectures in the fat file: AipBase are: i386 x86_64 armv7 armv7s arm64
# remove x86_64, i386
lipo -remove x86_64 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove i386 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove x86_64 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk
lipo -remove i386 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk
# re-check
lipo -info AipBase.framework/AipBase # Architectures in the fat file: AipBase are: armv7 armv7s arm64