Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
6459a4a
Merge pull request #1 from ResearchKit/master
bgannin Nov 21, 2018
336ab0e
Enable a swath of new compiler and analyzer flags and shallow analyze…
bgannin Nov 24, 2018
3736cf5
[code cleanup] Resolve missing super calls (issue #1214)
bgannin Nov 24, 2018
f3929e0
[code cleanup] Resolve generics type mismatch (issue #1214)
bgannin Nov 24, 2018
336096f
[code cleanup] Fix memory management/mutability mismatch (issue #1214)
bgannin Nov 24, 2018
fbb7892
[code cleanup] Add missing newlines (issue #1214)
bgannin Nov 24, 2018
a033e1c
[code cleanup] Remove extraneous semicolons (issue #1214)
bgannin Nov 24, 2018
5c3fe6e
[code cleanup] Fix unknown pragmas (issue #1214)
bgannin Nov 25, 2018
1a902ee
[code cleanup] Security fixes for random, loop counter (issue #1214)
bgannin Nov 25, 2018
db995e3
[code cleanup] Fix dead code stores (issue #1214)
bgannin Nov 25, 2018
ca81287
[code cleanup] Resolve shadow declarations (issue #1214)
bgannin Nov 25, 2018
fc61990
[code cleanup] Address missing prototypes for functions (issue #1214)
bgannin Nov 25, 2018
c2b664f
[code cleanup] Add missing localization comments (issue #1214)
bgannin Nov 25, 2018
6007603
[code cleanup] Use defined enum values (issue #1214)
bgannin Nov 26, 2018
9ef1876
[code cleanup] Review mismatched nil returns (issue #1214)
bgannin Nov 26, 2018
30a758e
Tweak build settings a bit (issue #1214)
bgannin Nov 27, 2018
421e906
[code cleanup] Resolve semantic issue with navigation buttons (issue …
bgannin Nov 28, 2018
547e1b5
[code cleanup] Use local variable across autorelease pools (issue #1214)
bgannin Nov 28, 2018
35e5d5a
[code cleanup] Review mismatched nil returns, part II (issue #1214)
bgannin Nov 28, 2018
610d30f
adding support for setting attributed string to the primary text labe…
srinathtm-apple Dec 13, 2018
cd216ab
setting attributed text to nil seems to override other UILabel proper…
srinathtm-apple Dec 14, 2018
612b411
adding support to provide attributed string for both primary text and…
srinathtm-apple Dec 14, 2018
3cd8cd7
display attributed strings in picker view
srinathtm-apple Dec 14, 2018
ab081e2
ensure that attributedText always overrides text
srinathtm-apple Jan 7, 2019
630a431
support attributedText in textScaleAnswerFormat
srinathtm-apple Jan 7, 2019
7f37428
support attributedText in ORKMultipleValuePickerAnswerFormat
srinathtm-apple Jan 7, 2019
599a723
call designated initializer using self
srinathtm-apple Jan 7, 2019
111b983
account for case where text is nil but primaryTextAttributedString is…
srinathtm-apple Jan 7, 2019
36b8a72
renaming an internal function
srinathtm-apple Jan 8, 2019
88b7c9a
Minor example project onboarding cleanup
Jan 10, 2019
3094ba6
Update ORKSpatialSpanMemoryStepViewController.m
aplummer-apple Jan 18, 2019
b803c3a
Merge pull request #1232 from aplummer-apple/tidy-onboarding
srinathtm-apple Jan 18, 2019
b7cf4bc
adding an assert if all the input params are nil
srinathtm-apple Jan 19, 2019
c87b189
moving the assert to the designated initializer
srinathtm-apple Jan 19, 2019
92fc374
Merge pull request #1224 from srinathtm-apple/AttributedTextForSurveys
srinathtm-apple Jan 19, 2019
f1fdddf
Fixed email regex to enforce start and end of string to eliminate the…
Feb 4, 2019
a4a1473
Merge pull request #1236 from jayway/email_fix
srinathtm-apple Feb 4, 2019
b0d7eff
logical-or the missing super calls
srinathtm-apple Feb 19, 2019
f07ae4b
logical-or the missing super calls in ORKLocationSelectionView
srinathtm-apple Feb 19, 2019
0a962c6
using NSInteger instead of NSUInteger
srinathtm-apple Feb 19, 2019
ca1a189
check if error is non-NULL before assignment
srinathtm-apple Feb 19, 2019
c7b2c33
Merge pull request #1216 from bgannin/projectHardening
srinathtm-apple Feb 21, 2019
877edca
[Project] Remove unsupported Swift 3.0 specifier from project
rsanchezsaez Feb 20, 2019
041d015
[Project] Run static analyzer, in deep mode, only when building in Debug
rsanchezsaez Feb 20, 2019
112bb1b
[ORKTest] Update to Swift 4
rsanchezsaez Feb 20, 2019
9cc6255
[ORKSample] Update to Swift 4
rsanchezsaez Feb 20, 2019
1e25391
Revert "[code cleanup] Add missing localization comments (issue #1214)"
rsanchezsaez Feb 20, 2019
a51b856
[Project] Update project languages appropriately
rsanchezsaez Feb 21, 2019
2539157
[Project] Disable “Missing Localization Context Comment” from static …
rsanchezsaez Feb 20, 2019
95e8250
Merge pull request #1243 from rsanchezsaez-apple/rss/project-hardening-a
srinathtm-apple Feb 21, 2019
d969d55
Merge pull request #1244 from rsanchezsaez-apple/rss/project-hardening-b
srinathtm-apple Feb 21, 2019
66dbac3
[Localization] Continue retuning ‘nil’ when the slider is not found
rsanchezsaez Feb 20, 2019
95d82db
[ORKAudioContentView] Do no set unneeded _timerLabel initial text
rsanchezsaez Feb 20, 2019
c0c512b
[ORKStroopStepViewController] Change NSMutableDictionaries to NSDicti…
rsanchezsaez Feb 20, 2019
4baa86d
[ORKGraphChartView] Remove unneeded change
rsanchezsaez Feb 20, 2019
d9cfb03
[ORkGraphChartView] Fix wrong accessibility fix
rsanchezsaez Feb 20, 2019
b412f47
Rename ORKLineGraphAccessibilityElement to ORKGraphChartAccessibility…
rsanchezsaez Feb 20, 2019
1c2af3c
[ORKGraphChartView] Simpler fix for shadowing variable declaration
rsanchezsaez Feb 20, 2019
16a5da4
[ORKGraphChartView] Simpler fix for shadowing variable declaration
rsanchezsaez Feb 20, 2019
81b945a
[ORKHealthAnswerFormat] Better nullability issue fix
rsanchezsaez Feb 20, 2019
363a1f7
[ORKDateTimePicker] Better nullability test
rsanchezsaez Feb 20, 2019
ea01dbd
Remove unneeded check
rsanchezsaez Feb 20, 2019
762d035
Update comment to reflect code
rsanchezsaez Feb 20, 2019
6f883b4
[ORKHealthAnswerFormat] Better static analyzer fixes
rsanchezsaez Feb 20, 2019
15b6204
[Misc] Rename findInArrayByKey to ORKFindInArrayByKey
rsanchezsaez Feb 20, 2019
97a503c
[ORKMultiValuePicker] Better nullability fix
rsanchezsaez Feb 20, 2019
222855f
[Misc] Nicer variable names
rsanchezsaez Feb 20, 2019
2e0bef5
[ORKPicker] Better nullability fix, remove unused function
rsanchezsaez Feb 20, 2019
4d7c27a
[ORKReviewStep] Add extra nullable annotations
rsanchezsaez Feb 20, 2019
ddb2c50
[ORKReviewStep] Add braces for safety
rsanchezsaez Feb 20, 2019
92c2299
[ORKSkin] Remove unused code
rsanchezsaez Feb 21, 2019
d6f71e2
[ORKStepNavigationRule] Improve comment
rsanchezsaez Feb 20, 2019
319b9f1
[ORKTableStepViewController] Better nullability
rsanchezsaez Feb 20, 2019
08af95d
[ORKTaskViewController] Better UUID nullability
rsanchezsaez Feb 20, 2019
82720f2
[ORKPDFViewerStepView] Add default nullability
rsanchezsaez Feb 20, 2019
61290e4
[ORKTintedImageView] Remove unneeded nullability
rsanchezsaez Feb 20, 2019
e4f7516
[ORKTintedImageView] Remove unneeded changes
rsanchezsaez Feb 20, 2019
5bc0088
[ORKVisualContentStepViewController] Better nullability handling
rsanchezsaez Feb 20, 2019
54feccd
[ORKValuePicker] Undo unneeded changes
rsanchezsaez Feb 20, 2019
6e61d4f
[ORKConsentSection] Remove unneeded import
rsanchezsaez Feb 20, 2019
63fb484
[ORKSpeechRecognitionResult] Fix typo
rsanchezsaez Feb 20, 2019
f614fda
[Misc] Add a space before every ‘nil’
rsanchezsaez Feb 20, 2019
61af3f9
[ORKTaskViewController] Remove unneeded implementation
rsanchezsaez Feb 21, 2019
19de603
[ORKTaskViewController] More compact nil UUID check
rsanchezsaez Feb 21, 2019
d000f5b
Merge pull request #1245 from ResearchKit/rss/project-hardening-c
srinathtm-apple Feb 21, 2019
7235e9e
Merge pull request #3 from ResearchKit/master
davwillev Feb 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions ResearchKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
2EAC5DFB201AAFF8000EF186 /* Speech.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EAC5DFA201AAFF8000EF186 /* Speech.framework */; };
2EBFE11D1AE1B32D00CB8254 /* ORKUIViewAccessibilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EBFE11C1AE1B32D00CB8254 /* ORKUIViewAccessibilityTests.m */; };
2EBFE1201AE1B74100CB8254 /* ORKVoiceEngineTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EBFE11F1AE1B74100CB8254 /* ORKVoiceEngineTests.m */; };
6146D0A31B84A91E0068491D /* ORKLineGraphAccessibilityElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6146D0A11B84A91E0068491D /* ORKLineGraphAccessibilityElement.h */; };
6146D0A41B84A91E0068491D /* ORKLineGraphAccessibilityElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6146D0A21B84A91E0068491D /* ORKLineGraphAccessibilityElement.m */; };
6146D0A31B84A91E0068491D /* ORKGraphChartAccessibilityElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6146D0A11B84A91E0068491D /* ORKGraphChartAccessibilityElement.h */; };
6146D0A41B84A91E0068491D /* ORKGraphChartAccessibilityElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6146D0A21B84A91E0068491D /* ORKGraphChartAccessibilityElement.m */; };
618DA04E1A93D0D600E63AA8 /* ORKAccessibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 618DA0481A93D0D600E63AA8 /* ORKAccessibility.h */; };
618DA0501A93D0D600E63AA8 /* ORKAccessibilityFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 618DA0491A93D0D600E63AA8 /* ORKAccessibilityFunctions.h */; };
618DA0521A93D0D600E63AA8 /* ORKAccessibilityFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 618DA04A1A93D0D600E63AA8 /* ORKAccessibilityFunctions.m */; };
Expand Down Expand Up @@ -859,8 +859,8 @@
2EBFE11C1AE1B32D00CB8254 /* ORKUIViewAccessibilityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKUIViewAccessibilityTests.m; sourceTree = "<group>"; };
2EBFE11E1AE1B68800CB8254 /* ORKVoiceEngine_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORKVoiceEngine_Internal.h; sourceTree = "<group>"; };
2EBFE11F1AE1B74100CB8254 /* ORKVoiceEngineTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKVoiceEngineTests.m; sourceTree = "<group>"; };
6146D0A11B84A91E0068491D /* ORKLineGraphAccessibilityElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKLineGraphAccessibilityElement.h; sourceTree = "<group>"; };
6146D0A21B84A91E0068491D /* ORKLineGraphAccessibilityElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKLineGraphAccessibilityElement.m; sourceTree = "<group>"; };
6146D0A11B84A91E0068491D /* ORKGraphChartAccessibilityElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKGraphChartAccessibilityElement.h; sourceTree = "<group>"; };
6146D0A21B84A91E0068491D /* ORKGraphChartAccessibilityElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKGraphChartAccessibilityElement.m; sourceTree = "<group>"; };
618DA0481A93D0D600E63AA8 /* ORKAccessibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKAccessibility.h; sourceTree = "<group>"; };
618DA0491A93D0D600E63AA8 /* ORKAccessibilityFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORKAccessibilityFunctions.h; sourceTree = "<group>"; };
618DA04A1A93D0D600E63AA8 /* ORKAccessibilityFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORKAccessibilityFunctions.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1849,8 +1849,8 @@
618DA04A1A93D0D600E63AA8 /* ORKAccessibilityFunctions.m */,
618DA04B1A93D0D600E63AA8 /* UIView+ORKAccessibility.h */,
618DA04C1A93D0D600E63AA8 /* UIView+ORKAccessibility.m */,
6146D0A11B84A91E0068491D /* ORKLineGraphAccessibilityElement.h */,
6146D0A21B84A91E0068491D /* ORKLineGraphAccessibilityElement.m */,
6146D0A11B84A91E0068491D /* ORKGraphChartAccessibilityElement.h */,
6146D0A21B84A91E0068491D /* ORKGraphChartAccessibilityElement.m */,
);
path = Accessibility;
sourceTree = "<group>";
Expand Down Expand Up @@ -3274,7 +3274,7 @@
106FF2AE1B6FACA8004EACF2 /* ORKDirectionView.h in Headers */,
86C40DA61A8D7C5C00081FAC /* ORKSurveyAnswerCellForImageSelection.h in Headers */,
86C40D5E1A8D7C5C00081FAC /* ORKQuestionStep.h in Headers */,
6146D0A31B84A91E0068491D /* ORKLineGraphAccessibilityElement.h in Headers */,
6146D0A31B84A91E0068491D /* ORKGraphChartAccessibilityElement.h in Headers */,
86C40C841A8D7C5C00081FAC /* ORKActiveStepTimer.h in Headers */,
86B781BD1AA668ED00688151 /* ORKValuePicker.h in Headers */,
86C40DE21A8D7C5C00081FAC /* ORKVerticalContainerView_Internal.h in Headers */,
Expand Down Expand Up @@ -3528,10 +3528,10 @@
"zh-Hans",
"pt-PT",
"fr-CA",
"es-MX",
"en-GB",
"en-AU",
nb,
"es-419",
);
mainGroup = 3FFF18341829DB1D00167070;
productRefGroup = 3FFF183E1829DB1D00167070 /* Products */;
Expand Down Expand Up @@ -3768,7 +3768,7 @@
86C40C4C1A8D7C5C00081FAC /* ORKSpatialSpanTargetView.m in Sources */,
86C40D9E1A8D7C5C00081FAC /* ORKSubheadlineLabel.m in Sources */,
10864CA31B27146B000F4158 /* ORKPSATContentView.m in Sources */,
6146D0A41B84A91E0068491D /* ORKLineGraphAccessibilityElement.m in Sources */,
6146D0A41B84A91E0068491D /* ORKGraphChartAccessibilityElement.m in Sources */,
D42FEFB91AF7557000A124F8 /* ORKImageCaptureView.m in Sources */,
86C40C401A8D7C5C00081FAC /* ORKSpatialSpanMemoryContentView.m in Sources */,
BCB6E6671B7D535F000D5B34 /* ORKXAxisView.m in Sources */,
Expand Down Expand Up @@ -4027,6 +4027,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -4046,6 +4047,7 @@
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
Expand Down Expand Up @@ -4080,6 +4082,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -4099,6 +4102,7 @@
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
Expand Down Expand Up @@ -4170,7 +4174,14 @@
B183A5931A8535D100C76870 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
CLANG_WARN_ASSIGN_ENUM = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEAD_CODE_STRIPPING = YES;
Expand All @@ -4185,7 +4196,13 @@
"ORK_LOG_LEVEL_WARNING=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_LABEL = YES;
INFOPLIST_FILE = "$(SRCROOT)/ResearchKit/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
Expand All @@ -4194,6 +4211,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.researchkit.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = ResearchKit;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -4205,7 +4223,14 @@
B183A5941A8535D100C76870 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
CLANG_WARN_ASSIGN_ENUM = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEAD_CODE_STRIPPING = YES;
Expand All @@ -4217,7 +4242,13 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = "ORK_LOG_LEVEL_WARNING=1";
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_LABEL = YES;
INFOPLIST_FILE = "$(SRCROOT)/ResearchKit/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/Accessibility/ORKAccessibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@

// Shared header for accessibility functionality.
#import "ORKAccessibilityFunctions.h"
#import "ORKLineGraphAccessibilityElement.h"
#import "ORKGraphChartAccessibilityElement.h"
#import "UIView+ORKAccessibility.h"
4 changes: 2 additions & 2 deletions ResearchKit/Accessibility/ORKAccessibilityFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
@class ORKScaleSlider;

// Used to properly format values from the ORKScaleSlider.
ORK_EXTERN NSString *ORKAccessibilityFormatScaleSliderValue(CGFloat value, ORKScaleSlider *slider);
ORK_EXTERN NSString *ORKAccessibilityFormatContinuousScaleSliderValue(CGFloat value, ORKScaleSlider *slider);
ORK_EXTERN NSString * _Nullable ORKAccessibilityFormatScaleSliderValue(CGFloat value, ORKScaleSlider *slider);
ORK_EXTERN NSString * _Nullable ORKAccessibilityFormatContinuousScaleSliderValue(CGFloat value, ORKScaleSlider *slider);

// Performs a block on the main thread after a delay. If Voice Over is not running, the block is performed immediately.
ORK_EXTERN void ORKAccessibilityPerformBlockAfterDelay(NSTimeInterval delay, void(^block)(void));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface ORKLineGraphAccessibilityElement : UIAccessibilityElement
@interface ORKGraphChartAccessibilityElement : UIAccessibilityElement

- (nonnull instancetype)initWithAccessibilityContainer:(nonnull UIView *)container index:(NSInteger)index maxIndex:(NSInteger)maxIndex;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "ORKLineGraphAccessibilityElement.h"
#import "ORKGraphChartAccessibilityElement.h"


@interface ORKLineGraphAccessibilityElement()
@interface ORKGraphChartAccessibilityElement()

@property (assign, nonatomic) NSInteger index;
@property (assign, nonatomic) NSInteger maxIndex;

@end


@implementation ORKLineGraphAccessibilityElement
@implementation ORKGraphChartAccessibilityElement

- (nonnull instancetype)initWithAccessibilityContainer:(nonnull UIView *)container index:(NSInteger)index maxIndex:(NSInteger)maxIndex {
self = [super initWithAccessibilityContainer:container];
Expand Down
3 changes: 2 additions & 1 deletion ResearchKit/ActiveTasks/ORKActiveStepQuantityView.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ NS_ASSUME_NONNULL_BEGIN

@end

NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END

2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKAudioContentView.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
[self addSubview:_timerLabel];
[self addSubview:_graphView];

_timerLabel.text = @"06:00";
_alertLabel.text = ORKLocalizedString(@"AUDIO_TOO_LOUD_LABEL", nil);
// _timerLabel.text set in -updateTimerLabel:

self.alertThreshold = GraphViewBlueZoneHeight / ((GraphViewRedZoneHeight * 2) + GraphViewBlueZoneHeight);

Expand Down
12 changes: 6 additions & 6 deletions ResearchKit/ActiveTasks/ORKAudioGenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ - (void)handleInterruption:(id)sender;
const double ORKSineWaveToneGeneratorAmplitudeDefault = 0.03f;
const double ORKSineWaveToneGeneratorSampleRateDefault = 44100.0f;

OSStatus ORKAudioGeneratorRenderTone(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData) {
static OSStatus ORKAudioGeneratorRenderTone(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData) {
// Fixed amplitude is good enough for our purposes
const double amplitude = ORKSineWaveToneGeneratorAmplitudeDefault;

Expand Down
6 changes: 5 additions & 1 deletion ResearchKit/ActiveTasks/ORKDataLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,16 @@ - (BOOL)appendObjects:(NSArray *)objects fileHandle:(NSFileHandle *)fileHandle e
// Serialize each object separately to the buffer, pending a single write, so the
// objects form part of a single array.
__block BOOL success = YES;
__block NSError *localError;
if (error) {
localError = *error;
}
[objects enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSData *data;
if ([obj isKindOfClass:[NSData class]]) {
data = obj;
} else {
data = [NSJSONSerialization dataWithJSONObject:obj options:(NSJSONWritingOptions)0 error:error];
data = [NSJSONSerialization dataWithJSONObject:obj options:(NSJSONWritingOptions)0 error:&localError];
}
if (!data) {
success = NO;
Expand Down
14 changes: 7 additions & 7 deletions ResearchKit/ActiveTasks/ORKHealthClinicalTypeRecorder.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ - (void)start {
HKSampleQuery *query = [[HKSampleQuery alloc] initWithSampleType:_healthClinicalType
predicate:_healthFHIRResourceType ? [HKQuery predicateForClinicalRecordsWithFHIRResourceType:_healthFHIRResourceType] : nil limit:HKObjectQueryNoLimit
sortDescriptors:nil
resultsHandler:^(HKSampleQuery * _Nonnull query, NSArray<__kindof HKSample *> * _Nullable results, NSError * _Nullable error) {
NSUInteger resultCount = results.count;
resultsHandler:^(HKSampleQuery * _Nonnull sampleQuery, NSArray<__kindof HKSample *> * _Nullable sampleResults, NSError * _Nullable error) {
NSUInteger resultCount = sampleResults.count;
if (resultCount == 0) {
return;
}

[results enumerateObjectsUsingBlock:^(HKClinicalRecord *clinicalRecord, NSUInteger idx, BOOL *stop) {
[sampleResults enumerateObjectsUsingBlock:^(HKClinicalRecord *clinicalRecord, NSUInteger idx, BOOL *stop) {

NSError *error = nil;
[_logger append:clinicalRecord.FHIRResource.data error:&error];
if (error) {
ORK_Log_Warning(@"Failed to add health records object to the logger with error: %@", error);
NSError *logError = nil;
[_logger append:clinicalRecord.FHIRResource.data error:&logError];
if (logError) {
ORK_Log_Warning(@"Failed to add health records object to the logger with error: %@", logError);
return;
}
}];
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKReactionTimeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ - (void)timeoutTimerDidFire {
- (NSTimeInterval)stimulusInterval {
ORKReactionTimeStep *step = [self reactionTimeStep];
NSTimeInterval range = step.maximumStimulusInterval - step.minimumStimulusInterval;
NSTimeInterval randomFactor = ((NSTimeInterval)rand() / RAND_MAX) * range;
NSTimeInterval randomFactor = ((NSTimeInterval)arc4random() / RAND_MAX) * range;
return randomFactor + step.minimumStimulusInterval;
}

Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKRecorder_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN

- (void)reset NS_REQUIRES_SUPER;

- (void)reportFileResultWithFile:(NSURL *)fileUrl error:(nullable NSError *)error;
- (void)reportFileResultWithFile:(nullable NSURL *)fileUrl error:(nullable NSError *)error;

- (nullable NSURL *)recordingDirectoryURL;

Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKSpatialSpanGame.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ - (void)generateSequence {
// Note: we will only use the first _sequenceLength elements of this array
srandom(_seed);
for (NSInteger i = 0; i < _gameSize; i++) {
NSInteger rand_i = random() % _gameSize;
NSInteger rand_i = arc4random() % _gameSize;
NSInteger tmp = _sequence[i];
_sequence[i] = _sequence[rand_i];
_sequence[rand_i] = tmp;
Expand Down
2 changes: 1 addition & 1 deletion ResearchKit/ActiveTasks/ORKSpeechRecognitionResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
A speech recognition result is typically generated by the framework as the task proceeds. When the task completes, it may be appropriate to serialize the sample for transmission to a server or to immediately perform analysis on it.
*/
ORK_CLASS_AVAILABLE
@interface ORKSpeechRecognitonResult : ORKResult
@interface ORKSpeechRecognitionResult : ORKResult

/**
A hypothesized textual representation of recognized speech
Expand Down
4 changes: 2 additions & 2 deletions ResearchKit/ActiveTasks/ORKSpeechRecognitionResult.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#import "ORKResult_Private.h"
#import "ORKHelpers_Internal.h"

@implementation ORKSpeechRecognitonResult
@implementation ORKSpeechRecognitionResult

- (void)encodeWithCoder:(NSCoder *)aCoder {
[super encodeWithCoder:aCoder];
Expand Down Expand Up @@ -61,7 +61,7 @@ - (BOOL)isEqual:(id)object {
}

- (instancetype)copyWithZone:(NSZone *)zone {
ORKSpeechRecognitonResult *result = [super copyWithZone:zone];
ORKSpeechRecognitionResult *result = [super copyWithZone:zone];
result.transcription = [self.transcription copy];
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ @implementation ORKSpeechRecognitionStepViewController {
ORKSpeechRecognizer *_speechRecognizer;

dispatch_queue_t _speechRecognitionQueue;
ORKSpeechRecognitonResult *_localResult;
ORKSpeechRecognitionResult *_localResult;
BOOL _errorState;
float _peakPower;
}
Expand Down Expand Up @@ -99,7 +99,7 @@ - (void)viewDidLoad {

[ORKSpeechRecognizer requestAuthorization];

_localResult = [[ORKSpeechRecognitonResult alloc] initWithIdentifier:self.step.identifier];
_localResult = [[ORKSpeechRecognitionResult alloc] initWithIdentifier:self.step.identifier];
_speechRecognitionQueue = dispatch_queue_create("SpeechRecognitionQueue", DISPATCH_QUEUE_SERIAL);
}

Expand Down
Loading