diff --git a/ios/CameraView.swift b/ios/CameraView.swift index c979e60..3d2dcc7 100644 --- a/ios/CameraView.swift +++ b/ios/CameraView.swift @@ -578,34 +578,37 @@ class CameraView: UIView, AVCaptureVideoDataOutputSampleBufferDelegate { tableRow.alignment = .center // Centers the buttons vertically tableRow.distribution = .equalSpacing // Ensures equal spacing between buttons tableRow.translatesAutoresizingMaskIntoConstraints = false + tableRow.isLayoutMarginsRelativeArrangement = false tableLayout.addArrangedSubview(tableRow) } let cardButton = UIButton(type: .system) - - if let cardId = cardDict["card_id"] as? Int { + cardButton.backgroundColor = UIColor.darkGray + if let cardId = cardDict["card_id"] as? Int { cardButton.setTitle("\(cardId)", for: .normal) cardButton.tag = cardId } else if let cardId = cardDict["card_id"] as? String, let cardIdInt = Int(cardId) { cardButton.setTitle(cardId, for: .normal) cardButton.tag = cardIdInt + + if let is_attendance_taken = self.classData?["is_attendance_taken"], is_attendance_taken as! Bool { + if let is_present = cardDict["is_present"] as? Bool, !is_present { + cardButton.backgroundColor = .red + } + } } else { print("Could not cast card_id to Int for card: \(cardDict)") } cardButton.setTitleColor(.white, for: .normal) cardButton.titleLabel?.font = UIFont.boldSystemFont(ofSize: 12) - cardButton.backgroundColor = UIColor.darkGray - cardButton.layer.cornerRadius = 15 - - tableRow.addArrangedSubview(cardButton) - NSLayoutConstraint.activate([ - - cardButton.heightAnchor.constraint(equalToConstant: 30), - cardButton.widthAnchor.constraint(equalToConstant: 30) - ]) - - + cardButton.layer.cornerRadius = 12 + cardButton.contentEdgeInsets = .zero + NSLayoutConstraint.activate([ + cardButton.heightAnchor.constraint(equalToConstant: 24), + cardButton.widthAnchor.constraint(equalToConstant: 24) + ]) + tableRow.addArrangedSubview(cardButton) } } @@ -630,7 +633,7 @@ class CameraView: UIView, AVCaptureVideoDataOutputSampleBufferDelegate { func createCardsDesignTableLayout(context: UIView) -> UIStackView { let cardDesign = UIStackView() cardDesign.axis = .vertical - cardDesign.spacing = 10 + cardDesign.spacing = 2 cardDesign.alignment = .leading cardDesign.translatesAutoresizingMaskIntoConstraints = false context.addSubview(cardDesign) @@ -686,6 +689,23 @@ class CameraView: UIView, AVCaptureVideoDataOutputSampleBufferDelegate { return false } + func hasStudentPresent(cardlists: [Any], key: String, value: Int) -> Bool { + + if let is_attendance_taken = self.classData?["is_attendance_taken"], is_attendance_taken as! Bool { + for cardD in cardData { + guard let cardDict = cardD as? [String: Any] else { continue } + if let cardIdString = cardDict[key] as? String, let cardIdInt = Int(cardIdString) { + if cardIdInt == value { + if let is_present = cardDict["is_present"] as? Bool, !is_present { + return false + } + } + } + } + } + return true + } + private func storeCardResult(_ resultsArray : [[String: Any]]){ for marker in resultsArray { @@ -701,10 +721,13 @@ class CameraView: UIView, AVCaptureVideoDataOutputSampleBufferDelegate { self.cardResult.append(["answer": answer, "attendance": 1, "card_id": id]) } }else if(CARD_SCANNING_TYPE == 1){ - if let index = self.cardResult.firstIndex(where: { $0["card_id"] as! Int == id }) { - self.cardResult[index]["answer"] = answer - } else { - self.cardResult.append(["answer": answer, "attendance": 1, "card_id": id]) + let studentPresent = hasStudentPresent(cardlists: cardData as! [Any], key: "card_id", value: id) + if(studentPresent){ + if let index = self.cardResult.firstIndex(where: { $0["card_id"] as! Int == id }) { + self.cardResult[index]["answer"] = answer + } else { + self.cardResult.append(["answer": answer, "attendance": 1, "card_id": id]) + } } }else if(CARD_SCANNING_TYPE == 2){ var serial = 0 @@ -764,7 +787,10 @@ class CameraView: UIView, AVCaptureVideoDataOutputSampleBufferDelegate { for markerId in markerIds { if let cardButton = self.viewWithTag(markerId) as? UIButton { - cardButton.backgroundColor = .green + + if cardButton.backgroundColor != UIColor.red { + cardButton.backgroundColor = .green + } } } self.storeCardResult(resultsArray) diff --git a/ios/TedQu.xcodeproj/project.pbxproj b/ios/TedQu.xcodeproj/project.pbxproj index aa46e88..ae89fd4 100644 --- a/ios/TedQu.xcodeproj/project.pbxproj +++ b/ios/TedQu.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 4D9D16A878859EEF8AF0A6CD /* libPods-TedQu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F01D516ED451E6AA2CCCA8C1 /* libPods-TedQu.a */; }; + 15E8B0E727287BD697097D48 /* libPods-TedQu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E18195A5E3B5C9E038278A88 /* libPods-TedQu.a */; }; 6037D3FCB4E8802890888A38 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FFC6ED7D84D1414FD723FB /* ExpoModulesProvider.swift */; }; 6F93290F2C3D29D20015F107 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6F93290E2C3D29D20015F107 /* MaterialIcons.ttf */; }; 6F9329112C3D3C150015F107 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6F9329102C3D3C140015F107 /* MaterialCommunityIcons.ttf */; }; @@ -26,8 +26,8 @@ 6FE89CAA2C57B989009C7421 /* CameraView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE89CA92C57B989009C7421 /* CameraView.swift */; }; 6FEDAA112C1970B7006C933B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6FEDAA102C1970B7006C933B /* GoogleService-Info.plist */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 8CC1C4295F9306DA202CDFF6 /* libPods-TedQu-TedQuTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4753190342AB62BD6A296F4E /* libPods-TedQu-TedQuTests.a */; }; CD02D14BAB68D22F47E9770B /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A4A24EB72FA8993EEB6E9B /* ExpoModulesProvider.swift */; }; - F49E75CDFA8B7797828AADDE /* libPods-TedQu-TedQuTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21D0D32D10D3A1EF94B83556 /* libPods-TedQu-TedQuTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -51,7 +51,7 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TedQu/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = TedQu/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TedQu/main.m; sourceTree = ""; }; - 21D0D32D10D3A1EF94B83556 /* libPods-TedQu-TedQuTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TedQu-TedQuTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4753190342AB62BD6A296F4E /* libPods-TedQu-TedQuTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TedQu-TedQuTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6F93290E2C3D29D20015F107 /* MaterialIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = ""; }; 6F9329102C3D3C140015F107 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = ""; }; 6F9329122C3D46950015F107 /* Ionicons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; @@ -66,17 +66,15 @@ 6FA5668B2C53B56700A90A30 /* TedQu-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TedQu-Bridging-Header.h"; sourceTree = ""; }; 6FA566952C54163800A90A30 /* ArtagViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ArtagViewManager.m; sourceTree = ""; }; 6FA566972C54164700A90A30 /* ArtagViewManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtagViewManager.swift; sourceTree = ""; }; - 6FE2C3252CDBA02900023F2B /* libRNAudioRecorderPlayer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libRNAudioRecorderPlayer.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 6FE2C3282CDBA12E00023F2B /* libRNAudioRecorderPlayer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libRNAudioRecorderPlayer.a; sourceTree = BUILT_PRODUCTS_DIR; }; 6FE89CA92C57B989009C7421 /* CameraView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraView.swift; sourceTree = ""; }; 6FEDAA102C1970B7006C933B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 7FBB3BB69E47B1E627368C39 /* Pods-TedQu-TedQuTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu-TedQuTests.release.xcconfig"; path = "Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests.release.xcconfig"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = TedQu/LaunchScreen.storyboard; sourceTree = ""; }; - 995F4A2B4534EFB3B81ECD7D /* Pods-TedQu.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu.debug.xcconfig"; path = "Target Support Files/Pods-TedQu/Pods-TedQu.debug.xcconfig"; sourceTree = ""; }; - BD4B5DB86A44C51A9E4B9E8F /* Pods-TedQu-TedQuTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu-TedQuTests.debug.xcconfig"; path = "Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests.debug.xcconfig"; sourceTree = ""; }; - DC6AF3EE923B240ABC99DD2D /* Pods-TedQu.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu.release.xcconfig"; path = "Target Support Files/Pods-TedQu/Pods-TedQu.release.xcconfig"; sourceTree = ""; }; - EA33B67C621BFDC19AD26190 /* Pods-TedQu-TedQuTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu-TedQuTests.release.xcconfig"; path = "Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests.release.xcconfig"; sourceTree = ""; }; + 9E021257167DE155627D64FC /* Pods-TedQu.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu.debug.xcconfig"; path = "Target Support Files/Pods-TedQu/Pods-TedQu.debug.xcconfig"; sourceTree = ""; }; + B25871617CC0120BE641C498 /* Pods-TedQu.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu.release.xcconfig"; path = "Target Support Files/Pods-TedQu/Pods-TedQu.release.xcconfig"; sourceTree = ""; }; + BB7790A97D4BD80BAFE59331 /* Pods-TedQu-TedQuTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TedQu-TedQuTests.debug.xcconfig"; path = "Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests.debug.xcconfig"; sourceTree = ""; }; + E18195A5E3B5C9E038278A88 /* libPods-TedQu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TedQu.a"; sourceTree = BUILT_PRODUCTS_DIR; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - F01D516ED451E6AA2CCCA8C1 /* libPods-TedQu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TedQu.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F2A4A24EB72FA8993EEB6E9B /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-TedQu-TedQuTests/ExpoModulesProvider.swift"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -85,7 +83,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F49E75CDFA8B7797828AADDE /* libPods-TedQu-TedQuTests.a in Frameworks */, + 8CC1C4295F9306DA202CDFF6 /* libPods-TedQu-TedQuTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -94,7 +92,7 @@ buildActionMask = 2147483647; files = ( 6FA566842C53A49500A90A30 /* opencv2.framework in Frameworks */, - 4D9D16A878859EEF8AF0A6CD /* libPods-TedQu.a in Frameworks */, + 15E8B0E727287BD697097D48 /* libPods-TedQu.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -146,11 +144,9 @@ 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( - 6FE2C3282CDBA12E00023F2B /* libRNAudioRecorderPlayer.a */, - 6FE2C3252CDBA02900023F2B /* libRNAudioRecorderPlayer.a */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - F01D516ED451E6AA2CCCA8C1 /* libPods-TedQu.a */, - 21D0D32D10D3A1EF94B83556 /* libPods-TedQu-TedQuTests.a */, + E18195A5E3B5C9E038278A88 /* libPods-TedQu.a */, + 4753190342AB62BD6A296F4E /* libPods-TedQu-TedQuTests.a */, ); name = Frameworks; sourceTree = ""; @@ -219,10 +215,10 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 995F4A2B4534EFB3B81ECD7D /* Pods-TedQu.debug.xcconfig */, - DC6AF3EE923B240ABC99DD2D /* Pods-TedQu.release.xcconfig */, - BD4B5DB86A44C51A9E4B9E8F /* Pods-TedQu-TedQuTests.debug.xcconfig */, - EA33B67C621BFDC19AD26190 /* Pods-TedQu-TedQuTests.release.xcconfig */, + 9E021257167DE155627D64FC /* Pods-TedQu.debug.xcconfig */, + B25871617CC0120BE641C498 /* Pods-TedQu.release.xcconfig */, + BB7790A97D4BD80BAFE59331 /* Pods-TedQu-TedQuTests.debug.xcconfig */, + 7FBB3BB69E47B1E627368C39 /* Pods-TedQu-TedQuTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -242,13 +238,13 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "TedQuTests" */; buildPhases = ( - DFA9F284F42A9230B9187374 /* [CP] Check Pods Manifest.lock */, + 6C693A46F9B423A258017BBE /* [CP] Check Pods Manifest.lock */, F9AAF2953C91E58420FFDF04 /* [Expo] Configure project */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - CE097E1E244D673DF895BCC2 /* [CP] Embed Pods Frameworks */, - 42BA61680EDCA8ED1AD9FF47 /* [CP] Copy Pods Resources */, + 444101631CB6C79290053C2F /* [CP] Embed Pods Frameworks */, + A7EFE3964849C35E803E01F7 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -264,15 +260,15 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "TedQu" */; buildPhases = ( - 079C570107777D00A6FA5642 /* [CP] Check Pods Manifest.lock */, + 26E7562E6AD9F4E9B1AAF87F /* [CP] Check Pods Manifest.lock */, 18529C7D3737CC92E5C805E1 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 65601449A673B514525F1F46 /* [CP] Embed Pods Frameworks */, - 39572A55023945828D27BA98 /* [CP] Copy Pods Resources */, - E31D4FAEA787BACFD699D98E /* [CP-User] [RNFB] Core Configuration */, + B43C6D9B7F13990E6AD7C4E5 /* [CP] Embed Pods Frameworks */, + 9B5118F9922D8AF94036CBFF /* [CP] Copy Pods Resources */, + AF351A4C76E2D478EBBC0A73 /* [CP-User] [RNFB] Core Configuration */, ); buildRules = ( ); @@ -362,7 +358,26 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 079C570107777D00A6FA5642 /* [CP] Check Pods Manifest.lock */ = { + 18529C7D3737CC92E5C805E1 /* [Expo] Configure project */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "[Expo] Configure project"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-TedQu/expo-configure-project.sh\"\n"; + }; + 26E7562E6AD9F4E9B1AAF87F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -384,77 +399,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 18529C7D3737CC92E5C805E1 /* [Expo] Configure project */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "[Expo] Configure project"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-TedQu/expo-configure-project.sh\"\n"; - }; - 39572A55023945828D27BA98 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 42BA61680EDCA8ED1AD9FF47 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 65601449A673B514525F1F46 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - CE097E1E244D673DF895BCC2 /* [CP] Embed Pods Frameworks */ = { + 444101631CB6C79290053C2F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -471,7 +416,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - DFA9F284F42A9230B9187374 /* [CP] Check Pods Manifest.lock */ = { + 6C693A46F9B423A258017BBE /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -493,7 +438,41 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E31D4FAEA787BACFD699D98E /* [CP-User] [RNFB] Core Configuration */ = { + 9B5118F9922D8AF94036CBFF /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + A7EFE3964849C35E803E01F7 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu-TedQuTests/Pods-TedQu-TedQuTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + AF351A4C76E2D478EBBC0A73 /* [CP-User] [RNFB] Core Configuration */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -506,6 +485,23 @@ shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; }; + B43C6D9B7F13990E6AD7C4E5 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TedQu/Pods-TedQu-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; F9AAF2953C91E58420FFDF04 /* [Expo] Configure project */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -564,7 +560,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BD4B5DB86A44C51A9E4B9E8F /* Pods-TedQu-TedQuTests.debug.xcconfig */; + baseConfigurationReference = BB7790A97D4BD80BAFE59331 /* Pods-TedQu-TedQuTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -593,7 +589,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EA33B67C621BFDC19AD26190 /* Pods-TedQu-TedQuTests.release.xcconfig */; + baseConfigurationReference = 7FBB3BB69E47B1E627368C39 /* Pods-TedQu-TedQuTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; @@ -619,7 +615,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 995F4A2B4534EFB3B81ECD7D /* Pods-TedQu.debug.xcconfig */; + baseConfigurationReference = 9E021257167DE155627D64FC /* Pods-TedQu.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; @@ -669,7 +665,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC6AF3EE923B240ABC99DD2D /* Pods-TedQu.release.xcconfig */; + baseConfigurationReference = B25871617CC0120BE641C498 /* Pods-TedQu.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; diff --git a/src/screens/Pscyometric/QuestionScreen.tsx b/src/screens/Pscyometric/QuestionScreen.tsx index 17e4432..fe766f3 100644 --- a/src/screens/Pscyometric/QuestionScreen.tsx +++ b/src/screens/Pscyometric/QuestionScreen.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React from 'react' import { View, Text, Button, Animated, StyleSheet, TouchableOpacity, ActivityIndicator } from 'react-native' import AsyncStorage from "@react-native-async-storage/async-storage" @@ -42,8 +42,6 @@ class QuestionScreen extends React.Component{ if(casheAnswer && questionnaire_details){ const answer = casheAnswer.answer_data.find((item:any) => item.question_id === questionnaire_details[this.state.currentQuestion]?.id) if(answer){ - console.log('hi') - console.log(answer) this.setState({ starCount: answer.answer }) } } @@ -139,14 +137,9 @@ class QuestionScreen extends React.Component{ questionsStarRating: [...prevState.questionsStarRating, newItem], })) } - - if(questionsStarRating){ - const answer = questionsStarRating.find((item:any) => item.id === questionnaire_details[this.state.currentQuestion]?.id) - if(answer){ + const answer = questionsStarRating.length > 0 && questionsStarRating.find((item:any) => item.id === questionnaire_details[this.state.currentQuestion]?.id) + if(answer){ this.setState({ starCount: answer.value }) - }else{ - this.setState({ starCount: 0 }) - } }else if(casheAnswer){ const answer = casheAnswer.answer_data.find((item:any) => item.question_id === questionnaire_details[this.state.currentQuestion]?.id) if(answer){ @@ -200,13 +193,10 @@ class QuestionScreen extends React.Component{ const { casheAnswer } = this.props const { currentQuestion, starCount,questionsStarRating } = this.state const { unique_id, class_id, student_id, questionnaire_details } = this.props.questionDetails - if(questionsStarRating){ - const answer = questionsStarRating.find((item:any) => item.id === questionnaire_details[currentQuestionId]?.id) - if(answer){ - this.setState({ starCount: answer.value }) - }else{ - this.setState({ starCount: 0 }) - } + + const answer = questionsStarRating.length > 0 && questionsStarRating.find((item:any) => item.id === questionnaire_details[currentQuestionId]?.id) + if(answer){ + this.setState({ starCount: answer.value }) } else if(casheAnswer){ const answer = casheAnswer.answer_data.find((item:any) => item.question_id === questionnaire_details[currentQuestionId]?.id) diff --git a/src/screens/Student/StudentProfile.tsx b/src/screens/Student/StudentProfile.tsx index 3bdfeb3..3df955a 100644 --- a/src/screens/Student/StudentProfile.tsx +++ b/src/screens/Student/StudentProfile.tsx @@ -345,7 +345,8 @@ class StudentProfile extends React.Component{ ))} - {studentPerfomanceInfo && studentPerfomanceInfo.map((subjectItem: any, subjectIndex: any) => ( + {studentPerfomanceInfo && studentPerfomanceInfo.map((subjectItem: any, subjectIndex: any) => ( + subjectItem.percentage && subjectItem.percentage.length > 0 && {subjectItem?.subject_name} No of Questions : {subjectItem?.total_count} diff --git a/src/screens/Student/StudentReport.tsx b/src/screens/Student/StudentReport.tsx index 1de2380..fccb353 100644 --- a/src/screens/Student/StudentReport.tsx +++ b/src/screens/Student/StudentReport.tsx @@ -198,7 +198,7 @@ class StudentReport extends React.Component{ } - {this.props.studentsList.data && this.props.classes.data.status !== false && + {this.props.studentsList.data && this.props.classes?.data?.status !== false && { + style={[AppStyles.primaryBtn, { alignSelf: 'center' }, (!isValid || !dirty || this.props.loading) && AppStyles.primaryDisabledButton]} onPress={handleSubmit} activeOpacity={0.8}> Update diff --git a/src/screens/Teacher/MapSubject.tsx b/src/screens/Teacher/MapSubject.tsx index 50d42f6..82eda94 100644 --- a/src/screens/Teacher/MapSubject.tsx +++ b/src/screens/Teacher/MapSubject.tsx @@ -262,7 +262,7 @@ class MapSubject extends React.Component{ + style={[AppStyles.primaryBtn, { alignSelf: 'center' }, (!isValid || !dirty || this.props.loading) && AppStyles.primaryDisabledButton]} onPress={handleSubmit} activeOpacity={0.8}> Add diff --git a/src/screens/Teacher/MapSubjectUpdate.tsx b/src/screens/Teacher/MapSubjectUpdate.tsx index 9ad7830..febebb3 100644 --- a/src/screens/Teacher/MapSubjectUpdate.tsx +++ b/src/screens/Teacher/MapSubjectUpdate.tsx @@ -278,7 +278,7 @@ class MapSubjectUpdate extends React.Component{ - Update diff --git a/src/screens/Teacher/TeacherInfo.tsx b/src/screens/Teacher/TeacherInfo.tsx index 4d820a0..f8befc4 100644 --- a/src/screens/Teacher/TeacherInfo.tsx +++ b/src/screens/Teacher/TeacherInfo.tsx @@ -180,19 +180,17 @@ class TeacherInfo extends React.Component{ color: BaseColors.mainColor, alignSelf: 'center' }]}>{subjectItem?.subject_name} - {subjectItem?.class_list && subjectItem?.class_list.map((classBasedTopic: any, classBasedIndex: any) => ( - - {classBasedTopic?.class_name} + + {subjectItem?.class_name} - {classBasedTopic?.graph_data && classBasedTopic?.graph_data.map((topicItem: any, topicIndex: any) => ( + {subjectItem?.graph_data && subjectItem?.graph_data.map((topicItem: any, topicIndex: any) => ( + onPress={this.onTopicBasedResults.bind(this, topicItem, subjectItem)}> {topicItem?.topics} {topicItem?.question_performance}% ))} - ))} ))} diff --git a/src/theme/BaseStyles.tsx b/src/theme/BaseStyles.tsx index 8a177ba..75bf0b9 100644 --- a/src/theme/BaseStyles.tsx +++ b/src/theme/BaseStyles.tsx @@ -556,6 +556,9 @@ export const AppStyles = StyleSheet.create({ marginTop: 40, marginBottom: 10, }, + primaryDisabledButton: { + backgroundColor: "#d3cffa", + }, primaryDisabledBtn: { width: "64%", backgroundColor: "#d3cffa",