菜鸟教程小白 发表于 2022-12-13 09:51:54

ios - 在Swift 2和XCode 7 Beta 4中设置Google Analytics(分析)时出错


                                            <p>我设置了cocoapods的xcode项目,将Google Analytics(分析)添加为pod。之后,我将GoogleService-info.plist导入到我的项目文件的正下方。还创建了桥头,并在AppdDelegate中添加了代码。在编译过程中,一切运行正常,但是当我启动调试器时,收到以下错误:<br><pre><code>2015-08-14 16:45:25.866 GetOut Client ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut Client ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut GCM Sender ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut Attempted to configure .
2015-08-14 16:45:25.867 GetOut Successfully configured .
2015-08-14 16:45:25.867 GetOut Failed to configure .
2015-08-14 16:45:25.867 GetOut Subspecs not present, so not configured .
assertion failed: Error configuring Google services: Optional(Error Domain=com.google.greenhouse Code=-200 &#34;Unable to configure GGL.&#34; UserInfo=0x170661400 {NSLocalizedRecoverySuggestion=Check formatting and location of GoogleService-Info.plist., NSLocalizedDescription=Unable to configure GGL., NSLocalizedFailureReason=Unable to parse supplied GoogleService-Info.plist. See log for details.}): file /Users/xxx/Documents/Eigene Dateien/Appdesign/GetOut/GetOut/GetOut/AppDelegate.swift, line 30
</code></pre><br>调试器在此屏幕上停止:<br><pre><code>0x1006bdeec &lt;+144&gt;: bl   0x1006fc228               ; function signature   specialization &lt;Arg = Exploded, Arg = Exploded, Arg = Exploded&gt; of Swift.(_assertionFailed (Swift.StaticString, Swift.String, Swift.StaticString, Swift.UInt) -&gt; ()).(closure #1).(closure #1)
0x1006bdef0 &lt;+148&gt;: mov    x0, x24
0x1006bdef4 &lt;+152&gt;: bl   0x100749c50               ; swift_release
0x1006bdef8 &lt;+156&gt;: mov    x0, x19
0x1006bdefc &lt;+160&gt;: bl   0x100756cc8               ; swift_unknownRelease
</code></pre><br>在我看来,.plist在处理期间找不到-但我不知道为什么?我仔细检查了<a href="https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift" rel="noreferrer noopener nofollow">https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift</a>指南,但仍然无法找出问题所在。</p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p>我现在解决了这个问题。我将cocoapods文件从/ Google更改为/ GoogleAnalytics-并成功了。 –</p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在Swift 2和XCode 7 Beta 4中设置Google Analytics(分析)时出错,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/32013023/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/32013023/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在Swift 2和XCode 7 Beta 4中设置Google Analytics(分析)时出错