App crashes on iOS 12 and below after building with Xcode 13 - TagMerge
4App crashes on iOS 12 and below after building with Xcode 13App crashes on iOS 12 and below after building with Xcode 13

App crashes on iOS 12 and below after building with Xcode 13

Asked 1 years ago
3
4 answers

At the bottom of the stack trace it says:

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UITabBarAppearance because no class named UITabBarAppearance was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' terminating with uncaught exception of type NSException

UITabBarAppearance was introduced in iOS 13, so it won't work with older iOS versions. Check your code for any occurrences of UITabBarAppearance and either remove them or wrap in an if #available. It could also be a problem with the storyboard using UITabBarAppearance internally.

Source: link

1

XCode had sneakily inserted these into my storyboard file without my knowledge!

<tabBarAppearance key="standardAppearance"/>

and

<navigationBarAppearance key="standardAppearance"/>

Deleting these fixed it! I set appearance for iOS13+ in my code within a version check.

Source: link

0

I resolved this by manually adding LinkPresentation.framework to "Link Binary with Libraries" in build phase, and setting its status to Optional.

Source: link

0

Here is the stack trace
#0	0x0000000101826418 in __abort_with_payload ()
#1	0x0000000101825a58 in abort_with_payload_wrapper_internal ()
#2	0x0000000101825a88 in abort_with_payload ()
#3	0x00000001017e88f8 in dyld::halt(char const*) ()
#4	0x00000001017e8a14 in dyld::fastBindLazySymbol(ImageLoader**, unsigned long) ()
#5	0x00000001cb038848 in dyld_stub_binder ()
#6	0x0000000100776d24 in type metadata accessor for Published<NotificationType?> ()
#7	0x0000000100787978 in type metadata completion function for CanvassViewModelCombine ()
#8	0x00000001f92d31c4 in swift::MetadataCacheEntryBase<(anonymous namespace)::SingletonMetadataCacheEntry, int>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) ()
#9	0x00000001f92c9820 in swift_getSingletonMetadata ()
#10	0x000000010077dd5c in type metadata accessor for CanvassViewModelCombine ()
#11	0x0000000100787928 in ObjC metadata update function for CanvassViewModelCombine ()
#12	0x00000001ca7d1404 in realizeClassMaybeSwiftMaybeRelock(objc_class*, mutex_tt<false>&, bool) ()
#13	0x00000001ca7c5958 in realizeAllClasses() ()
#14	0x00000001ca7c88d8 in objc_copyClassList ()
#15	0x000000010246d43c in ::+[RLMSchema sharedSchema]() at /Users/Main/Library/Developer/Xcode/DerivedData/Canvass-gshlshuaawkneueskiqugxbldjql/SourcePackages/checkouts/realm-cocoa/Realm/RLMSchema.mm:260
#16	0x0000000102443318 in ::+[RLMRealm realmWithConfiguration:error:](RLMRealmConfiguration *, NSError **) at /Users/Main/Library/Developer/Xcode/DerivedData/Canvass-gshlshuaawkneueskiqugxbldjql/SourcePackages/checkouts/realm-cocoa/Realm/RLMRealm.mm:492
#17	0x00000001024a4a54 in @nonobjc RLMRealm.__allocating_init(configuration:) ()
#18	0x00000001024a4914 in Realm.__allocating_init() at /Users/Main/Library/Developer/Xcode/DerivedData/Canvass-gshlshuaawkneueskiqugxbldjql/SourcePackages/checkouts/realm-cocoa/RealmSwift/Realm.swift:67
#19	0x0000000102e17010 in print(error:) at /Users/Main/MyPackage2/Errors.swift:44
#20	0x0000000102e17c84 in handle(_:) at /Users/Main/MyPackage2/Errors.swift:80
#21	0x0000000101ffdb54 in closure #1 in variable initialization expression of Global.currentAuthorization at /Users/Main/MyPackage/Global.swift:113
#22	0x0000000101ffd380 in Global.init() at /Users/Main/MyPackage/Global.swift:109
#23	0x0000000101ffd284 in Global.__allocating_init() ()
#24	0x0000000101ffcfb4 in globalinit_33_80EC9331ADFD421111D74ACB6D1168C2_func3 at /Users/Main/MyPackage/Global.swift:96
#25	0x0000000105824c78 in _dispatch_client_callout ()
#26	0x0000000105826c84 in _dispatch_once_callout ()
#27	0x00000001f92dee40 in swift_once ()
#28	0x0000000101ffc5b8 in Global.shared.unsafeMutableAddressor at /Users/Main/MyPackage/Global.swift:96
#29	0x0000000100934ff4 in AppDelegate.application(_:didFinishLaunchingWithOptions:) at /Users/Main/MyAppAppDelegate.swift:64
Here is a stack trace for the 10.3.3 crash, but all were similar. Happy to provide the other threads or other information (e.g. some source code) if that might help:
0 libsystem_kernel.dylib 0x1dea5acc 0x1de90000 + 88780
1 libsystem_pthread.dylib 0x1df5e086 0x1df59000 + 20614
2 libsystem_c.dylib 0x1de3a95a 0x1ddf0000 + 305498
3 libswiftCore.dylib 0x008b8b00 0x689000 + 2292480
4 libswiftCore.dylib 0x008c62b6 0x689000 + 2347702
5 libswiftCore.dylib 0x008c283c 0x689000 + 2332732
6 libswiftCore.dylib 0x008c2a38 0x689000 + 2333240
7 AcmeApp 0x00095f0a type metadata completion function for PuzzleState + 581386 (<compiler-generated>:0)
8 libswiftCore.dylib 0x008c802c 0x689000 + 2355244
9 libswiftCore.dylib 0x008c097e 0x689000 + 2324862
10 AcmeApp 0x0009599e PuzzleState.init() + 579998 (<compiler-generated>:0)
11 AcmeApp 0x000959c8 @objc PuzzleState.init() + 580040 (<compiler-generated>:0)
12 AcmeApp 0x00116b68 symbolic _____Sg 9AcmeApp18LibraryVolumeTableC6HeaderV + 1108840 ($ss20_ArrayBufferProtocolPsE22_arrayOutOfPlaceUpdateyys011_ContiguousaB0Vy7ElementQzGz_S2iySpyAGG_SitXEtFfA2_AEy9AcmeApp18LibraryVolumeTableC3RowVG_Tg5:190)
13 AcmeApp 0x00115be4 lazy cache variable for type metadata for LibraryVolumeTable + 1104868 ($ss20_ArrayBufferProtocolPsE22_arrayOutOfPlaceUpdateyys011_ContiguousaB0Vy7ElementQzGz_S2iySpyAGG_SitXEtFfA2_AEy9AcmeApp18LibraryVolumeTableC3RowVG_Tg5:0)
14 AcmeApp 0x001938dc outlined copy of (offset: Int, element: [String])? + 1620188 (_$sS2is17FixedWidthIntegersWL:84)
15 AcmeApp 0x001942b2 direct field offset for Puzzle.joinedClues + 1622706 (_$sS2is17FixedWidthIntegersWL:265)
16 CoreFoundation 0x1e5eceba 0x1e5dd000 + 65210
17 CoreFoundation 0x1e5ecdc6 0x1e5dd000 + 64966
18 AcmeApp 0x001940b2 direct field offset for Puzzle.solutionMap + 1622194 (_$sS2is17FixedWidthIntegersWL:0)
19 AcmeApp 0x001872e4 globalinit_33_A5843926A8A0C5292BCD8132A31EC432_func35 + 1569508 (_$s9AcmeApp7KeyAreaCMf:0)
20 AcmeApp 0x0031954e Realm.__allocating_init(configuration:) + 3216718 (_$sSo22NSStringDrawingOptionsVMf:0)
21 AcmeApp 0x00034e20 specialized WriteRealmController.init(inMemoryIdentifier:) + 183840 (WriteRealmController.swift:0)
22 AcmeApp 0x0003194e globalinit_33_3048FED25C8BA9F0BF05FDFD42028A65_func6 + 170318 (WriteRealmController.swift:20)
23 libdispatch.dylib 0x1dda5782 0x1dda4000 + 6018
24 libdispatch.dylib 0x1dda6252 0x1dda4000 + 8786
25 libswiftCore.dylib 0x008d04e6 0x689000 + 2389222
26 AcmeApp 0x000277f8 PlayTable.reloadData() + 129016 (PlayTable.swift:47)
27 AcmeApp 0x0003c840 specialized PlayTableViewController.init(coder:) + 215104 (PlayTableViewController.swift:12)
28 AcmeApp 0x0003b456 @objc PlayTableViewController.init(coder:) + 210006 (<compiler-generated>:10)
29 UIKit 0x23dd43ba 0x238f5000 + 5108666
30 UIKit 0x23f0e6ee 0x238f5000 + 6395630
31 UIKit 0x23f0e646 0x238f5000 + 6395462
32 UIKit 0x23f0e3a4 0x238f5000 + 6394788
33 UIKit 0x23c4fd86 0x238f5000 + 3517830
34 UIKit 0x23c67ac6 0x238f5000 + 3615430
35 UIKit 0x23f0e6ee 0x238f5000 + 6395630
36 UIKit 0x23f0e646 0x238f5000 + 6395462
37 UIKit 0x23f0e3a4 0x238f5000 + 6394788
38 UIKit 0x23c4fd86 0x238f5000 + 3517830
39 UIKit 0x23ed4bc0 0x238f5000 + 6159296
40 AcmeApp 0x00099ada @objc PlaySplitViewController.init(coder:) + 596698 (<compiler-generated>:0)
41 UIKit 0x23dd43ba 0x238f5000 + 5108666
42 UIKit 0x23f0e6ee 0x238f5000 + 6395630
43 UIKit 0x23f0e3a4 0x238f5000 + 6394788
44 UIKit 0x23dd40a4 0x238f5000 + 5107876
45 UIKit 0x23f0e6ee 0x238f5000 + 6395630
46 UIKit 0x23f0e646 0x238f5000 + 6395462
47 UIKit 0x23f0e3a4 0x238f5000 + 6394788
48 UIKit 0x23dd3632 0x238f5000 + 5105202
49 UIKit 0x24063b1e 0x238f5000 + 7793438
50 UIKit 0x23ed103e 0x238f5000 + 6144062
51 UIKit 0x23f0e6ee 0x238f5000 + 6395630
52 UIKit 0x23f0e646 0x238f5000 + 6395462
53 UIKit 0x23f0e3a4 0x238f5000 + 6394788
54 UIKit 0x23c4fd86 0x238f5000 + 3517830
55 UIKit 0x23c775e2 0x238f5000 + 3679714
56 AcmeApp 0x0003e2d8 specialized AppViewController.init(coder:) + 221912 (<compiler-generated>:0)
57 AcmeApp 0x0003dcd8 @objc AppViewController.init(coder:) + 220376 (<compiler-generated>:5)
58 UIKit 0x23dd43ba 0x238f5000 + 5108666
59 UIKit 0x23f0e6ee 0x238f5000 + 6395630
60 UIKit 0x23f0e3a4 0x238f5000 + 6394788
61 UIKit 0x23dd40a4 0x238f5000 + 5107876
62 UIKit 0x23f0e6ee 0x238f5000 + 6395630
63 UIKit 0x23f0e646 0x238f5000 + 6395462
64 UIKit 0x23f0e3a4 0x238f5000 + 6394788
65 UIKit 0x23dd3632 0x238f5000 + 5105202
66 UIKit 0x24063b1e 0x238f5000 + 7793438
67 UIKit 0x23b7ae40 0x238f5000 + 2645568
68 UIKit 0x239732a0 0x238f5000 + 516768
69 UIKit 0x23b79b10 0x238f5000 + 2640656
70 UIKit 0x23b8c7c4 0x238f5000 + 2717636
71 UIKit 0x23b7735a 0x238f5000 + 2630490
72 FrontBoardServices 0x1ffb8c12 0x1ff83000 + 220178
73 FrontBoardServices 0x1ffb8acc 0x1ff83000 + 219852
74 FrontBoardServices 0x1ffb8db6 0x1ff83000 + 220598
75 CoreFoundation 0x1e693fdc 0x1e5dd000 + 749532
76 CoreFoundation 0x1e693b04 0x1e5dd000 + 748292
77 CoreFoundation 0x1e691f50 0x1e5dd000 + 741200
78 CoreFoundation 0x1e5e51ae 0x1e5dd000 + 33198
79 CoreFoundation 0x1e5e4fd0 0x1e5dd000 + 32720
80 UIKit 0x2396ce2c 0x238f5000 + 491052
81 UIKit 0x23967a52 0x238f5000 + 469586
82 AcmeApp 0x0000d7e0 main + 22496 (AutosizingHeaderFooterTableView.swift:5)
83 libdyld.dylib 0x1ddd24ea 0x1ddcf000 + 13546

Source: link

Recent Questions on ios

    Programming Languages