Xcode 8 build crash on iOS 9.2 and below

前端 未结 8 1561
南方客
南方客 2020-11-27 10:53

When I build my app with Xcode 8 GM Seed and run it on an iOS 9.2 below device OR simulator, I get strange EXC_BAD_ACCESS crashes during app startup or a few seconds after

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 11:13

    Although question has been already answered, accepeted solution doesn't work for me, as I didn't have any 16b/ch assets.

    I found that issue appeared for assets which were compressed using lzfse algorithm (you can find information about compression extracting info from Assets.car using assetutil). Unfortunately Xcode IDE doesn't allow developers to change compression algorithm, however you can do that by compiling assets manually and lowering deployment target in actool command.

    tl;dr;

    1. Archive
    2. Unzip ipa
    3. Compile assets - You can find asset compiler command for your project generated by xcode by checking archive logs in Xcode report navigator

    Example command:

    xcrun actool --output-format human-readable-text --notices --warnings --minimum-deployment-target 8.0 --output-partial-info-plist info_partial.plist --app-icon AppIcon --launch-image LaunchImage --enable-on-demand-resources YES --sticker-pack-identifier-prefix {bundle_id}.sticker-pack --target-device iphone --target-device ipad --platform iphoneos --product-type com.apple.product-type.application --compile #{path_to_directory_containing_Assets_car} Assets/Assets.xcassets

    1. Zip it.
    2. Resign

提交回复
热议问题