菜鸟教程小白 发表于 2022-12-12 13:18:06

ios - 如何修复 xcode 中的 Apple Mach-O 链接器错误组问题?


                                            <p><p><strong>我尝试实现推送通知:</strong></p>

<p> <a href="https://medium.com/@martco/triggering-ios-actionable-push-notifications-via-react-native-7990a6a3c3f4" rel="noreferrer noopener nofollow">Source</a> </p>

<p>但我遇到了这个问题:</p>

<p> <a href="/image/xRrPR.jpg" rel="noreferrer noopener nofollow"><img src="/image/xRrPR.jpg" alt="enter image description here"/></a> </p>

<pre><code>Apple Mach-O Linker Error Group
no such file or directory:
&#39;/Users/arunkumar/Library/Developer/Xcode/DerivedData/sample-bskvypzxnjnnszbjeelvenubespf/Build/Products/Debug-iphonesimulator/libRCTPushNotification-tvOS.a
</code></pre>

<p>如何解决这个问题?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>运行 <strong>react-native link</strong> 这一切都会为您服务。
或者使用这些步骤</p>

<p><strong>第 1 步</strong></p>

<p><strong>.xcodeproj</strong> 文件在它的文件夹中。将此文件拖到您在 Xcode 上的项目中(通常在 Xcode 上的 Libraries 组下)</p>

<p><strong>第 2 步</strong> </p>

<p>单击您的主项目文件(代表 .xcodeproj 的那个)选择 Build Phases 并将静态库从您要导入的库内的 Products 文件夹中拖到 Link Binary With Libraries</p>

<p><strong>第三步</strong> </p>

<p>项目的文件,选择<strong>Build Settings</strong>并搜索<strong>Header Search Paths</strong>。在那里你应该包含你的库的路径(如果它在子目录中有相关文件,记得让它递归,比如 React。</p>

<p>引用这个
<a href="https://facebook.github.io/react-native/docs/linking-libraries-ios.html" rel="noreferrer noopener nofollow">link</a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何修复 xcode 中的 Apple Mach-O 链接器错误组问题?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/43270385/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/43270385/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何修复 xcode 中的 Apple Mach-O 链接器错误组问题?