菜鸟教程小白 发表于 2022-12-11 18:20:27

ios - 错误域=com.apple.healthkit 代码=5


                                            <p><p><code>HKSampleType *stepType = ;</code></p>

<p>当我想要这些步骤时,它可以工作;
我想要 <code>DistanceWalkingRunning</code> 或 <code>ExerciseTime</code>,xcode 显示下一条消息。</p>

<pre><code>Error Domain=com.apple.healthkit Code=5 “Authorization not determined
UserInfo={NSLocalizedDescription=Authorization not determined}”

HKSampleType *walkingType = [HKQuantityType quantityTypeForIdentifier:
HKQuantityTypeIdentifierAppleExerciseTime];
</code></pre>

<p>请有人帮助我。
谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><pre><code>HKObjectType *stepType = ;
NSSet *healthSet = ;
</code></pre>

<p>太尴尬了!只需获得步数的授权,无需距离。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 错误域=com.apple.healthkit 代码=5,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/45235317/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/45235317/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 错误域=com.apple.healthkit 代码=5