Skip to content
This repository was archived by the owner on Dec 22, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ fastlane/test_output
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
Assignment\ Two/GoogleService-Info.plist
20 changes: 18 additions & 2 deletions Assignment Two.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
8EF8F77D2597C7DE000850BF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EF8F77C2597C7DE000850BF /* ContentView.swift */; };
8EF8F77F2597C7E1000850BF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EF8F77E2597C7E1000850BF /* Assets.xcassets */; };
8EF8F7822597C7E1000850BF /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EF8F7812597C7E1000850BF /* Preview Assets.xcassets */; };
BCC44AF625C9358E00384FC6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BCC44AF525C9358E00384FC6 /* GoogleService-Info.plist */; };
BCC44AFA25C935A100384FC6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BCC44AF925C935A100384FC6 /* GoogleService-Info.plist */; };
BCC44AFE25C93E3900384FC6 /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCC44AFD25C93E3900384FC6 /* CardView.swift */; };
BCC44B0125C9F5D700384FC6 /* CardStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCC44B0025C9F5D700384FC6 /* CardStackView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -41,6 +45,10 @@
8EF8F77E2597C7E1000850BF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8EF8F7812597C7E1000850BF /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
8EF8F7832597C7E1000850BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BCC44AF525C9358E00384FC6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
BCC44AF925C935A100384FC6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
BCC44AFD25C93E3900384FC6 /* CardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = "<group>"; };
BCC44B0025C9F5D700384FC6 /* CardStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardStackView.swift; sourceTree = "<group>"; };
E7DE9A4430C3A45320910A5E /* Pods_Assignment_Two.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Assignment_Two.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -72,9 +80,11 @@
isa = PBXGroup;
children = (
8EF8F77C2597C7DE000850BF /* ContentView.swift */,
BCC44B0025C9F5D700384FC6 /* CardStackView.swift */,
8E8775DC25B8F8B800AB350A /* HeaderView.swift */,
8E35408825B8FE3A007B7029 /* SurveyView.swift */,
8E35408C25B8FFC9007B7029 /* RoundedTextView.swift */,
BCC44AFD25C93E3900384FC6 /* CardView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -124,6 +134,8 @@
8EF8F77A2597C7DE000850BF /* Assignment_TwoApp.swift */,
8E35409825B90F1B007B7029 /* RKTaskDelegate.swift */,
8E0A956825B677950025461E /* RKTaskSamples.swift */,
BCC44AF925C935A100384FC6 /* GoogleService-Info.plist */,
BCC44AF525C9358E00384FC6 /* GoogleService-Info.plist */,
);
path = "Assignment Two";
sourceTree = "<group>";
Expand Down Expand Up @@ -214,6 +226,8 @@
buildActionMask = 2147483647;
files = (
8EF8F7822597C7E1000850BF /* Preview Assets.xcassets in Resources */,
BCC44AFA25C935A100384FC6 /* GoogleService-Info.plist in Resources */,
BCC44AF625C9358E00384FC6 /* GoogleService-Info.plist in Resources */,
8EF8F77F2597C7E1000850BF /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -276,6 +290,8 @@
8E35409625B90E80007B7029 /* ORKESerialization.m in Sources */,
8E0A956625B6767B0025461E /* CKTaskViewController.swift in Sources */,
8EF8F77B2597C7DE000850BF /* Assignment_TwoApp.swift in Sources */,
BCC44B0125C9F5D700384FC6 /* CardStackView.swift in Sources */,
BCC44AFE25C93E3900384FC6 /* CardView.swift in Sources */,
8E35409925B90F1B007B7029 /* RKTaskDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -416,7 +432,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "edu.stanford.cs342.Assignment-Two";
PRODUCT_BUNDLE_IDENTIFIER = com.stanfordhcilab.hpdslongitudinal;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Assignment Two/Supporting Files/Assignment Two-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -442,7 +458,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "edu.stanford.cs342.Assignment-Two";
PRODUCT_BUNDLE_IDENTIFIER = com.stanfordhcilab.hpdslongitudinal;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Assignment Two/Supporting Files/Assignment Two-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
61 changes: 59 additions & 2 deletions Assignment Two/RKTaskSamples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Copyright © 2019 Stanford University.
// All rights reserved.
//

import ResearchKit

/**
Expand All @@ -25,6 +24,64 @@ struct RKTaskSamples {
Add steps to the array above to create a survey!
*/

return ORKOrderedTask(identifier: "SurveyTask-Assessment", steps: steps)
// OUTCOME 1: Belonging.

// Question 1.1 - Sliding Scale of Belonging
let belongingAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let belongingStep = ORKQuestionStep(identifier: "belongingQuestion", title: "Experience Sampling", question: "I feel like I belong in this space.", answer: belongingAnswer)

steps += [belongingStep]

// Question 1.2 - Sliding Scale of Connection to Coworkers
let coworkerConnectionAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let coworkerConnectionStep = ORKQuestionStep(identifier: "corowkerConnectionQuestion", title: "Experience Sampling", question: "I feel connected to my co-workers.", answer: coworkerConnectionAnswer)

steps += [coworkerConnectionStep]

// OUTCOME 2: Stress

// Question 2.1 - Sliding Scale of Stress
let stressAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let stressStep = ORKQuestionStep(identifier: "stressQuestion", title: "Experience Sampling", question: "I currently feel stressed.", answer: stressAnswer)

steps += [stressStep]

// Question 2.2 - Sliding Scale of Overwhelmed
let overwhelmedAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let overwhelmedStep = ORKQuestionStep(identifier: "overwhelmedQuestion", title: "Experience Sampling", question: "I currently feel overwhelmed.", answer: overwhelmedAnswer)

steps += [overwhelmedStep]

// OUTCOME 3: Environmental Sttitudes

// Question 3.1 - Sliding Scale of Caring about Environment
let environmentalAttitudesAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let environmentalAttitudesStep = ORKQuestionStep(identifier: "environmentalAttitudesQuestion", title: "Experience Sampling", question: "I care about the wellbeing of the environment I occupy.", answer: environmentalAttitudesAnswer)

steps += [environmentalAttitudesStep]

// Questoin 3.2 - Sliding Scale of Environmental Attunement
let environmentalAttunementAnswer = ORKScaleAnswerFormat(maximumValue: 7, minimumValue: 1, defaultValue: 4, step: 1)
let environmentalAttunementStep = ORKQuestionStep(identifier: "environmentalAttunementQuestion", title: "Experience Sampling", question: "I feel attuned to my environment.", answer: environmentalAttunementAnswer)

steps += [environmentalAttunementStep]

// OUTCOME 4: Creativity

// Question 4.1 - Text Box for Creativity (will be evaluated by coders after the study)
let creativityAnswer = ORKTextAnswerFormat()
let creativityStep = ORKQuestionStep(identifier: "creativityQuestion", title: "Experience Sampling", question: "If you have seen a problem in a new way since your last experience sampling survey, explain in the box below.", answer: creativityAnswer)

steps += [creativityStep]

let task = ORKNavigableOrderedTask(identifier: "SurveyTask-Assessment", steps: steps)

// let resultBooleanSelector = ORKResultSelector(resultIdentifier: booleanStep.identifier)
// let predicate = ORKResultPredicate.predicateForBooleanQuestionResult(with: resultBooleanSelector, expectedAnswer: false)
// let navigableRule = ORKPredicateStepNavigationRule(resultPredicatesAndDestinationStepIdentifiers: [(predicate, summaryStep.identifier)])
// task.setNavigationRule(navigableRule, forTriggerStepIdentifier: booleanStep.identifier)

return task
}()

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-58.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-80.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-152.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon-167.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-40.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-58.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-80.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-120.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-180.png",
"scale" : "3x"
},
{
"size" : "24x24",
"idiom" : "watch",
"filename" : "icon-48.png",
"subtype" : "38mm",
"role" : "notificationCenter",
"scale" : "2x"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"filename" : "icon-55.png",
"subtype" : "42mm",
"role" : "notificationCenter",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "icon-58.png",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "icon-87.png",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"filename" : "icon-80.png",
"subtype" : "38mm",
"role" : "appLauncher",
"scale" : "2x"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "icon-88.png",
"subtype" : "40mm",
"role" : "appLauncher",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "icon-100.png",
"subtype" : "44mm",
"role" : "appLauncher",
"scale" : "2x"
},
{
"size" : "86x86",
"idiom" : "watch",
"filename" : "icon-172.png",
"subtype" : "38mm",
"role" : "quickLook",
"scale" : "2x"
},
{
"size" : "98x98",
"idiom" : "watch",
"filename" : "icon-196.png",
"subtype" : "42mm",
"role" : "quickLook",
"scale" : "2x"
},
{
"size" : "108x108",
"idiom" : "watch",
"filename" : "icon-216.png",
"subtype" : "44mm",
"role" : "quickLook",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "watch-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
}
],
"author" : "Iconizer",
"version" : "2020.11.0"
}
Loading