The cause of
The latest product to make a Widget Widget, product requirements must be arranged. So I created a new OC project and then created a Widget Extension. Assertion failed ld: Assertion failed (reconstituted == (accumulator – _options.machHeaderVmAddr())), function setFixup64, file OutputFile.cpp, line 2864.
ld: Assertion failed: (reconstituted == (accumulator - _options.machHeaderVmAddr())), function setFixup64, file OutputFile.cpp, line 2864.
Copy the code
To solve the process
Find information inThe official BBSThe same error was found, but no solution was given. After the modification of the projectProjet
The lowest version supported byiOS 15
Instead of iOS14
It compiles.After fixing this error, it turns out that there are still other compilation errors. Compilation error message: 1, Type ‘Provider’ does not conform to protocol ‘IntentTimelineProvider’ 2, Cannot find ‘ConfigurationIntent’ in scope
Type 'Provider' does not conform to protocol 'IntentTimelineProvider'
Copy the code
Cannot find 'ConfigurationIntent' in scope
Copy the code
I searched for information and found that the reason was: we set it in the projectClass Prefix
My project is set toCN
.
Cause the Xcode automatically generated is CNConfigurationIntent. Swift, the file path is:
/ Users/username/Library/Developer/Xcode/DerivedData/project name/Build/Intermediates. Noindex/project name. The Build/Debug - iphonesimulator/widget Name Extension. The build/DerivedSources/IntentDefinitionGenerated/widget/CNConfigurationIntent. The name of the swiftCopy the code
But the auto-generated code isConfigurationIntent
, just put the code inConfigurationIntent
All is changed toProject prefix +ConfigurationIntent
(CNConfigurationIntent
) will run normally.