ios - React Native 和 RNFirebase iOS 版本构建失败
<p><p>我在 React Native 中通过 RNFirebase 使用 Firebase。我已经完成了这里的步骤:<a href="https://rnfirebase.io/docs/v5.x.x/installation/ios" rel="noreferrer noopener nofollow">https://rnfirebase.io/docs/v5.x.x/installation/ios</a> .</p>
<p>在模拟器和我的设备上调试构建工作正常,但是当我尝试归档发布构建时,它会失败并出现此错误。</p>
<pre><code>ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/FirebaseAuth'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/GoogleUtilities'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/nanopb'
ld: library not found for -lFirebaseAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>
<p>此外,在构建日志中,我可以看到调试配置构建了这些目标,但它们不在发布配置构建的输出中。我觉得它与构建所有架构有关,但不知道如何开始解决这个问题。我只是觉得我在四处闲逛,没有真正的策略来解决它。有什么想法吗?</p>
<p>我尝试过的一些事情......</p>
<ul>
<li>使用旧版构建系统</li>
<li>删除 <code>node_modules</code> 并重新运行 <code>npm install</code></li>
<li>删除/添加相关的 pod</li>
<li>分解和读取 Cocoapods</li>
<li>清除 DerivedData</li>
<li>重新启动我的计算机</li>
</ul></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我已经看到在关闭和打开 <code>use_frameworks!</code> 时会发生这种情况。 </p>
<p>解决方案是从 Build Setting - Other Linker Flags(OTHER_LDFLAGS) 中删除 FirebaseAuth 和其他库</p></p>
<p style="font-size: 20px;">关于ios - React Native 和 RNFirebase iOS 版本构建失败,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/52728848/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/52728848/
</a>
</p>
页:
[1]