<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.5+ (master)</li>
<li>Operating System / Platform =&gt; Mac Catalina (10.15.6)</li>
<li>Compiler =&gt; Cmake 3.19, build_framework.py</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">OpenCV iOS framework built with Xcode12.1 <strong>(swift5.3)</strong> is not working on Xcode12.2 <strong>(swift5.3.1)</strong><br>
Error message is below.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to build module 'OpenCV' from its module interface; the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)'"><pre class="notranslate"><code class="notranslate">Failed to build module 'OpenCV' from its module interface; the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)'
</code></pre></div>
<p dir="auto">I think this <a href="https://github.com/opencv/opencv/pull/18637" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv/pull/18637/hovercard">PR</a> was supposed to deal with this problem.</p>
<h5 dir="auto">Steps to reproduce</h5>
<ol dir="auto">
<li>Build opencv framework with Xcode12.1</li>
<li>Use the built framework in with Xcode12.2</li>
</ol>

<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
answers.opencv.org, Stack Overflow, etc and have not found solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>
<p dir="auto">The binary release for iOS is not built for distribution, this causes the new Swift compile (5.3) from XCode 12 unable to import the released binary (which was compiled with Swift 5.1.2)</p>
<p dir="auto">To fix it please refer to the following StackOverflow question.</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/58654714/module-compiled-with-swift-5-1-cannot-be-imported-by-the-swift-5-1-2-compiler/58656323#58656323" rel="nofollow">https://stackoverflow.com/questions/58654714/module-compiled-with-swift-5-1-cannot-be-imported-by-the-swift-5-1-2-compiler/58656323#58656323</a></p>