Skip to content

Commit

Permalink
Public release 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pariecemckinney-apple authored May 8, 2024
1 parent 6c24a7e commit c71d1a5
Show file tree
Hide file tree
Showing 182 changed files with 1,677 additions and 446 deletions.
13 changes: 13 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# ResearchKit Release Notes

## ResearchKit 3.0.1 Release Notes
In addition to general stability and performance improvements, ResearchKit 3.0.1 includes the following updates:

- **ORKFormStep**
The `ORKFormStep` has an additional property named `autoScrollEnabled` that allows developers to disable autoscrolling.

- **ORKBodyItem**
The `ORKBodyItem` has an additional property named `alignImageToTop` that will align a body item's image and text to the top of each other.

- **ORK3DModelStep**
An example of the `ORK3DModelStep` has been added to the ORKCatalog app.


## ResearchKit 3.0 Release Notes

*ResearchKit 3.0* is a beta release
Expand Down
147 changes: 108 additions & 39 deletions ResearchKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B183A4731A8535D100C76870"
BuildableName = ".framework"
BuildableName = "ResearchKit.framework"
BlueprintName = "ResearchKit"
ReferencedContainer = "container:ResearchKit.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/


@import CoreMotion;
#import <CoreMotion/CoreMotion.h>


NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
*/


@import HealthKit;

#import <HealthKit/HealthKit.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKAnswerFormat_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/


@import HealthKit;
#import <HealthKit/HealthKit.h>
#if TARGET_OS_IOS
#import <ResearchKit/ORKAnswerFormat_Private.h>
#import <ResearchKit/ORKChoiceAnswerFormatHelper.h>
Expand Down
4 changes: 4 additions & 0 deletions ResearchKit/Common/ORKBodyItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ ORK_CLASS_AVAILABLE

- (instancetype)initWithText:(nullable NSString *)text detailText:(nullable NSString *)detailText image:(nullable UIImage *)image learnMoreItem:(nullable ORKLearnMoreItem *)learnMoreItem bodyItemStyle:(ORKBodyItemStyle)bodyItemStyle useCardStyle:(BOOL)useCardStyle;

- (instancetype)initWithText:(nullable NSString *)text detailText:(nullable NSString *)detailText image:(nullable UIImage *)image learnMoreItem:(nullable ORKLearnMoreItem *)learnMoreItem bodyItemStyle:(ORKBodyItemStyle)bodyItemStyle useCardStyle:(BOOL)useCardStyle alignImageToTop:(BOOL)alignImageToTop;

- (instancetype)initWithHorizontalRule;

@property (nonatomic, nullable) NSString *text;
Expand All @@ -95,6 +97,8 @@ ORK_CLASS_AVAILABLE

@property (nonatomic) BOOL useSecondaryColor;

@property (nonatomic) BOOL alignImageToTop;

@end

NS_ASSUME_NONNULL_END
9 changes: 8 additions & 1 deletion ResearchKit/Common/ORKBodyItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ - (instancetype)initWithText:(NSString *)text detailText:(NSString *)detailText
}

- (instancetype)initWithText:(NSString *)text detailText:(NSString *)detailText image:(nullable UIImage *)image learnMoreItem:(nullable ORKLearnMoreItem *)learnMoreItem bodyItemStyle:(ORKBodyItemStyle)bodyItemStyle useCardStyle:(BOOL)useCardStyle {
return [self initWithText:text detailText:detailText image:image learnMoreItem:learnMoreItem bodyItemStyle:bodyItemStyle useCardStyle:NO alignImageToTop:false];
}

- (instancetype)initWithText:(NSString *)text detailText:(NSString *)detailText image:(nullable UIImage *)image learnMoreItem:(nullable ORKLearnMoreItem *)learnMoreItem bodyItemStyle:(ORKBodyItemStyle)bodyItemStyle useCardStyle:(BOOL)useCardStyle alignImageToTop:(BOOL)alignImageToTop {
self = [super init];
if (self) {
self.text = text;
Expand All @@ -70,6 +74,7 @@ - (instancetype)initWithText:(NSString *)text detailText:(NSString *)detailText
self.image = image;
self.useCardStyle = useCardStyle;
self.useSecondaryColor = NO;
self.alignImageToTop = alignImageToTop;
}
[self validateParameters];
return self;
Expand Down Expand Up @@ -127,6 +132,7 @@ - (nonnull id)copyWithZone:(nullable NSZone *)zone {
bodyItem->_image = [self.image copy];
bodyItem->_useCardStyle = self.useCardStyle;
bodyItem->_useSecondaryColor = self.useSecondaryColor;
bodyItem->_alignImageToTop = self.alignImageToTop;
return bodyItem;
}

Expand All @@ -146,7 +152,8 @@ - (BOOL)isEqual:(id)object {
&& (self.bodyItemStyle == castObject.bodyItemStyle)
&& ORKEqualObjects(self.image, castObject.image)
&& (self.useCardStyle == castObject.useCardStyle)
&& (self.useSecondaryColor == castObject.useSecondaryColor));
&& (self.useSecondaryColor == castObject.useSecondaryColor)
&& (self.alignImageToTop == castObject.alignImageToTop));
}

@end
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKChoiceAnswerFormatHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

@import Foundation;
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKDataLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/


@import Foundation;
#import <Foundation/Foundation.h>
#import <ResearchKit/ORKTypes.h>


Expand Down
3 changes: 0 additions & 3 deletions ResearchKit/Common/ORKDataLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#import "ORKDataLogger.h"

#import "ORKHelpers_Internal.h"
#import "CMMotionActivity+ORKJSONDictionary.h"
#import "HKSample+ORKJSONDictionary.h"

#include <sys/xattr.h>


Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKErrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/


@import Foundation;
#import <Foundation/Foundation.h>

#if TARGET_OS_IOS
#import <ResearchKit/ORKDefines.h>
Expand Down
8 changes: 8 additions & 0 deletions ResearchKit/Common/ORKFormStep.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ ORK_CLASS_AVAILABLE

@property (nonatomic) ORKCardViewStyle cardViewStyle;

/**
A boolean to determine if the form will auto scroll when a
answer is selected.
The default value is YES.
*/
@property (nonatomic) BOOL autoScrollEnabled;

@end


Expand Down
8 changes: 7 additions & 1 deletion ResearchKit/Common/ORKFormStep.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ - (instancetype)initWithIdentifier:(NSString *)identifier
self.optional = YES;
self.useSurveyMode = YES;
self.useCardView = YES;
self.autoScrollEnabled = YES;
self.cardViewStyle = ORKCardViewStyleDefault;
}
return self;
Expand All @@ -64,6 +65,7 @@ - (instancetype)initWithIdentifier:(NSString *)identifier {
self.optional = YES;
self.useSurveyMode = YES;
self.useCardView = YES;
self.autoScrollEnabled = YES;
self.cardViewStyle = ORKCardViewStyleDefault;
}
return self;
Expand Down Expand Up @@ -93,6 +95,7 @@ - (instancetype)copyWithZone:(NSZone *)zone {
ORKFormStep *step = [super copyWithZone:zone];
step.formItems = ORKArrayCopyObjects(_formItems);
step.cardViewStyle = self.cardViewStyle;
step.autoScrollEnabled = self.autoScrollEnabled;
return step;
}

Expand All @@ -102,7 +105,8 @@ - (BOOL)isEqual:(id)object {
__typeof(self) castObject = object;
return (isParentSame &&
(ORKEqualObjects(self.formItems, castObject.formItems)) &&
self.cardViewStyle == castObject.cardViewStyle);
self.cardViewStyle == castObject.cardViewStyle &&
self.autoScrollEnabled == castObject.autoScrollEnabled);
}

- (NSUInteger)hash {
Expand Down Expand Up @@ -145,6 +149,7 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {
if (self) {
ORK_DECODE_OBJ_ARRAY(aDecoder, formItems, ORKFormItem);
ORK_DECODE_BOOL(aDecoder, useCardView);
ORK_DECODE_BOOL(aDecoder, autoScrollEnabled);
ORK_DECODE_OBJ_CLASS(aDecoder, footerText, NSString);
ORK_DECODE_ENUM(aDecoder, cardViewStyle);
}
Expand All @@ -155,6 +160,7 @@ - (void)encodeWithCoder:(NSCoder *)aCoder {
[super encodeWithCoder:aCoder];
ORK_ENCODE_OBJ(aCoder, formItems);
ORK_ENCODE_BOOL(aCoder, useCardView);
ORK_ENCODE_BOOL(aCoder, autoScrollEnabled);
ORK_ENCODE_OBJ(aCoder, footerText);
ORK_ENCODE_ENUM(aCoder, cardViewStyle);
}
Expand Down
1 change: 1 addition & 0 deletions ResearchKit/Common/ORKHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -559,3 +559,4 @@ void ORKAdjustPageViewControllerNavigationDirectionForRTL(UIPageViewControllerNa
numberFormatter.usesGroupingSeparator = NO;
return numberFormatter;
}

3 changes: 2 additions & 1 deletion ResearchKit/Common/ORKHelpers_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/


@import UIKit;
#import <UIKit/UIKit.h>

#if TARGET_OS_IOS
#import <ResearchKit/ORKTypes.h>
Expand Down Expand Up @@ -211,6 +211,7 @@ UIFontDescriptor *ORKFontDescriptorForLightStylisticAlternative(UIFontDescriptor
CGFloat ORKFloorToViewScale(CGFloat value, UIView *view);
#endif


ORK_INLINE bool
ORKEqualObjects(id o1, id o2) {
return (o1 == o2) || (o1 && o2 && [o1 isEqual:o2]);
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKHelpers_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/


@import Foundation;
#import <Foundation/Foundation.h>
#if TARGET_OS_IOS
#import <ResearchKit/ORKDefines.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKQuestionResult_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#import <ResearchKit/ORKQuestionResult.h>
#endif

@import MapKit;
#import <MapKit/MapKit.h>


NS_ASSUME_NONNULL_BEGIN
Expand Down
92 changes: 0 additions & 92 deletions ResearchKit/Common/ORKRecorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,98 +335,6 @@ ORK_CLASS_AVAILABLE
@end


/**
A configuration object that records data from a HealthKit quantity type during an active step.
Before you can use this configuration, you must use Xcode to enable the appropriate HealthKit entitlement
for your app.
HealthKit quantity type data is serialized to JSON and returned as an `ORKFileResult` object.
For details on the format, see `HKSample+ORKJSONDictionary`.
To use a recorder, include its configuration in the `recorderConfigurations` property
of an `ORKActiveStep` object, include that step in a task, and present it with
a task view controller.
*/
ORK_CLASS_AVAILABLE
@interface ORKHealthQuantityTypeRecorderConfiguration : ORKRecorderConfiguration

/**
Returns an initialized health quantity type recorder configuration using the specified quantity type and unit designation.
This method is the designated initializer.
@param identifier The unique identifier of the recorder configuration.
@param quantityType The quantity type that should be collected during the active task.
@param unit The unit for the data that should be collected and serialized.
@return An initialized health quantity type recorder configuration.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier healthQuantityType:(HKQuantityType *)quantityType unit:(HKUnit *)unit NS_DESIGNATED_INITIALIZER;

/**
Returns a new health quantity type recorder configuration initialized from data in the given unarchiver.
@param aDecoder Coder from which to initialize the health quantity type recorder configuration.
@return A new health quantity type recorder configuration.
*/
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;

/**
The quantity type to be collected from HealthKit. (read-only)
*/
@property (nonatomic, readonly, copy) HKQuantityType *quantityType;

/**
The unit in which to serialize the data from HealthKit. (read-only)
*/
@property (nonatomic, readonly, copy) HKUnit *unit;

@end

ORK_CLASS_AVAILABLE
#if defined(__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0
API_AVAILABLE(ios(12.0))
@interface ORKHealthClinicalTypeRecorderConfiguration : ORKRecorderConfiguration

/**
Returns an initialized health clinical type recorder configuration using the specified clinical type.
This method is the designated initializer.
@param identifier The unique identifier of the recorder configuration.
@param healthClinicalType The HKClinicalType that should be collected during the active task.
@param healthFHIRResourceType The HKFHIRResourceType that should be used as predicate while querying for the healthClinicalType. Providing a HKFHIRResourceType that does not correspond to a HKClinicalType will NOT generate any result.
@return An initialized health clinical type recorder configuration.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier
healthClinicalType:(HKClinicalType *)healthClinicalType
healthFHIRResourceType:(nullable HKFHIRResourceType)healthFHIRResourceType NS_DESIGNATED_INITIALIZER API_AVAILABLE(ios(12.0));

/**
Returns a new health clinical type recorder configuration initialized from data in the given unarchiver.
@param aDecoder Coder from which to initialize the health clinical type recorder configuration.
@return A new health clinical type recorder configuration.
*/
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;

/**
The HKClinicalType to be collected from HealthKit. (read-only)
*/
@property (nonatomic, readonly, copy) HKClinicalType *healthClinicalType;

/**
The HKFHIRResourceType to used as predicate for HKQuery. (read-only)
*/
@property (nonatomic, readonly, copy) HKFHIRResourceType healthFHIRResourceType;

@end
#endif

/**
A configuration object that records streaming audio data during an active step.
Expand Down
32 changes: 0 additions & 32 deletions ResearchKit/Common/ORKRecorder_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,6 @@ NS_ASSUME_NONNULL_BEGIN

@class ORKStep;

/**
The `ORKTouchRecorderConfiguration` is a recorder configuration class for
generating an `ORKTouchRecorder`.
It is currently considered private, and is not used in any of the active tasks.
*/
ORK_CLASS_AVAILABLE
@interface ORKTouchRecorderConfiguration : ORKRecorderConfiguration

/**
Returns an initialized touch recorder configuration.
This method is the designated initializer.
@param identifier The unique identifier of the recorder configuration.
@return An initialized touch recorder configuration.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier NS_DESIGNATED_INITIALIZER;

/**
Returns a new touch recorder configuration initialized from data in the given unarchiver.
@param aDecoder Coder from which to initialize the touch recorder configuration.
@return A new touch recorder configuration.
*/
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;

@end


@interface ORKRecorder ()

/**
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Common/ORKSkin_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

@import UIKit;
#import <UIKit/UIKit.h>

#if TARGET_OS_IOS
#import <ResearchKit/ORKSkin.h>
Expand Down
Loading

0 comments on commit c71d1a5

Please sign in to comment.