简体   繁体   中英

Build extremely slow after upgrade to Xcode 12

After upgraded to Xcode 12, the build progress will last for about 10 minutes when the target is a real device. But it's only need less then 1 minutes in Xcode 11 with the same project and the same device.

When i check the build log, i found the signing progress cost a lot of time

Showing All Messages sent 187539 bytes received 70 bytes 375218.00 bytes/sec

total size is 188006 speedup is 1.00

Code Signing /Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/LCNetwork.framework with Identity -

/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/LCNetwork.framework'

/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/LCNetwork.framework: replacing existing signature

rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MBProgressHUD/MBProgressHUD.framework" "/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks"

building file list ... done

MBProgressHUD.framework/

MBProgressHUD.framework/MBProgressHUD

MBProgressHUD.framework/_CodeSignature/CodeResources

sent 173429 bytes received 70 bytes 346998.00 bytes/sec

total size is 173884 speedup is 1.00

Code Signing /Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/MBProgressHUD.framework with Identity -

/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/MBProgressHUD.framework'

/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks/MBProgressHUD.framework: replacing existing signature

rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MJRefresh/MJRefresh.framework" "/Users/cc/Library/Developer/Xcode/DerivedData/MarkDaily-abnizdojrgeyrjayljkajexbcxcn/Build/Products/Debug-iphonesimulator/MarkDaily.app/Frameworks"

building file list ... done

MJRefresh.framework/

MJRefresh.framework/MJRefresh

MJRefresh.framework/_CodeSignature/CodeResources

I found there is 'replacing sign' in the log. So it can be caused by duplicated sign.

And then remove Pods directory and reinstall all pods via pod install . Then build speed is normal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM