Can not get UserProfile.getUserActivityHistory info on Forerunner 965

I'm a newcomer of garmin device devopler, and is tring my first watchface.

I would like to develop a watch face which is compatible with Forerunner 245 and later. So I could not use complication.

I tried UserProfile.getUserActivityHistory to get today's and weekly running distance.

It works well on simulator, however I couldn't get information on my 965. 

        var userActivityIterator = UserProfile.getUserActivityHistory();
        var activity = userActivityIterator.next();                        // get the user activity data
        var distance = 0;
        while (activity != null) {
            if(activity.type == null) {
                activity = userActivityIterator.next();   
                continue;
            }
            var duration = new Time.Duration((days-1) * Gregorian.SECONDS_PER_DAY);
            // var tomorrow = Time.today().add(new Time.Duration(Gregorian.SECONDS_PER_DAY));
            if(activity.startTime.lessThan(Time.today().subtract(duration))){
               break;     
            } 
            // only running
            if(Activity.SPORT_RUNNING == activity.type){
                // transfer to km
                var temp = activity.distance / 100;
                distance +=  temp.toFloat() / 10;  
            }
            activity = userActivityIterator.next();          
        }