Commit 5e94fc51 authored by Wei Han's avatar Wei Han

code update

parent c18924b9
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2BE2AF4C6D3B8606D943CAF3 /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8352A4F24DF4210A8AFCA7C2 /* libPods-example.a */; };
44006126336D83DB220E7214 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; 44006126336D83DB220E7214 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
5C7C7888B2763DDB537944FB /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D74587F939203677C6032281 /* libPods-example.a */; };
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; }; 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = example/PrivacyInfo.xcprivacy; sourceTree = "<group>"; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = example/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = example/AppDelegate.swift; sourceTree = "<group>"; }; 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = example/AppDelegate.swift; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = example/LaunchScreen.storyboard; sourceTree = "<group>"; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = example/LaunchScreen.storyboard; sourceTree = "<group>"; };
97D3B4D39E2B400BB6CD8948 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = "<group>"; }; 8352A4F24DF4210A8AFCA7C2 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
B95376DB92E5F5D667A3EE8C /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = "<group>"; }; 9174F6EB895EEB012209BA4C /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = "<group>"; };
D74587F939203677C6032281 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; A060F5E8935E48625B4E63FC /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
5C7C7888B2763DDB537944FB /* libPods-example.a in Frameworks */, 2BE2AF4C6D3B8606D943CAF3 /* libPods-example.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
D74587F939203677C6032281 /* libPods-example.a */, 8352A4F24DF4210A8AFCA7C2 /* libPods-example.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
BBD78D7AC51CEA395F1C20DB /* Pods */ = { BBD78D7AC51CEA395F1C20DB /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B95376DB92E5F5D667A3EE8C /* Pods-example.debug.xcconfig */, 9174F6EB895EEB012209BA4C /* Pods-example.debug.xcconfig */,
97D3B4D39E2B400BB6CD8948 /* Pods-example.release.xcconfig */, A060F5E8935E48625B4E63FC /* Pods-example.release.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -105,13 +105,13 @@ ...@@ -105,13 +105,13 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
buildPhases = ( buildPhases = (
1AC50A012F321C74340135C6 /* [CP] Check Pods Manifest.lock */, E427C8CAE7DBF9D62EAF2898 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */, 13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */, 13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
E8C958D1F83ABEF9914FCE5F /* [CP] Embed Pods Frameworks */, 29C7524E232168406C951301 /* [CP] Embed Pods Frameworks */,
54B1B9DF69523B7F550C3320 /* [CP] Copy Pods Resources */, 6333DBD2A89CA3E6CDB09BB7 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
...@@ -183,29 +183,24 @@ ...@@ -183,29 +183,24 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
}; };
1AC50A012F321C74340135C6 /* [CP] Check Pods Manifest.lock */ = { 29C7524E232168406C951301 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = ( name = "[CP] Embed Pods Frameworks";
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
); "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-example-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
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"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
54B1B9DF69523B7F550C3320 /* [CP] Copy Pods Resources */ = { 6333DBD2A89CA3E6CDB09BB7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
...@@ -222,21 +217,26 @@ ...@@ -222,21 +217,26 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
E8C958D1F83ABEF9914FCE5F /* [CP] Embed Pods Frameworks */ = { E427C8CAE7DBF9D62EAF2898 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks"; inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-output-files.xcfilelist", );
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-example-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n"; 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; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = { 13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = B95376DB92E5F5D667A3EE8C /* Pods-example.debug.xcconfig */; baseConfigurationReference = 9174F6EB895EEB012209BA4C /* Pods-example.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
}; };
13B07F951A680F5B00A75B9A /* Release */ = { 13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 97D3B4D39E2B400BB6CD8948 /* Pods-example.release.xcconfig */; baseConfigurationReference = A060F5E8935E48625B4E63FC /* Pods-example.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
EqtjfGVJUrKupCnFW6lfffSo2ZA= mDeq0E4lblXfFuIgkojjE5zY6hk=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
w8N5kkR8hr/wIwb/x0XA5+wVpdo= /JZsUWwwr7A+ZF0o001HQXRnzpI=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI= 0+eonZqFOeyimWUH94CuUhfXNEulhfi9YeuUE/wnX0s=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
EqtjfGVJUrKupCnFW6lfffSo2ZA= mDeq0E4lblXfFuIgkojjE5zY6hk=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
uEkE+l7bQzwu7vnX83uBlOCEpCk= 4pQwOIuYwsUH4Iiw1M402s3Ii8Y=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI= 0+eonZqFOeyimWUH94CuUhfXNEulhfi9YeuUE/wnX0s=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
2FAEF09A2E8B7BC80086EDA3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FAEF0992E8B7BC80086EDA3 /* UIKit.framework */; }; 2FAEF09A2E8B7BC80086EDA3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FAEF0992E8B7BC80086EDA3 /* UIKit.framework */; };
2FAEF09C2E8B7BD40086EDA3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FAEF09B2E8B7BD40086EDA3 /* Foundation.framework */; }; 2FAEF09C2E8B7BD40086EDA3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FAEF09B2E8B7BD40086EDA3 /* Foundation.framework */; };
2FB2922A2EAB04F400D9F164 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FB292292EAB04F400D9F164 /* AVFoundation.framework */; }; 2FB2922A2EAB04F400D9F164 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FB292292EAB04F400D9F164 /* AVFoundation.framework */; };
2FD1557B2ECAC5CC00233981 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FD1557A2ECAC5CC00233981 /* WebKit.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
2FAEF0992E8B7BC80086EDA3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 2FAEF0992E8B7BC80086EDA3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
2FAEF09B2E8B7BD40086EDA3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 2FAEF09B2E8B7BD40086EDA3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
2FB292292EAB04F400D9F164 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; 2FB292292EAB04F400D9F164 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
2FD1557A2ECAC5CC00233981 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk/System/iOSSupport/System/Library/PrivateFrameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
...@@ -52,6 +54,7 @@ ...@@ -52,6 +54,7 @@
files = ( files = (
2FB2922A2EAB04F400D9F164 /* AVFoundation.framework in Frameworks */, 2FB2922A2EAB04F400D9F164 /* AVFoundation.framework in Frameworks */,
2F99420D2EA9C5F000622199 /* QuartzCore.framework in Frameworks */, 2F99420D2EA9C5F000622199 /* QuartzCore.framework in Frameworks */,
2FD1557B2ECAC5CC00233981 /* WebKit.framework in Frameworks */,
2F8D09092E9605E200C764FF /* CoreGraphics.framework in Frameworks */, 2F8D09092E9605E200C764FF /* CoreGraphics.framework in Frameworks */,
2FAEF09C2E8B7BD40086EDA3 /* Foundation.framework in Frameworks */, 2FAEF09C2E8B7BD40086EDA3 /* Foundation.framework in Frameworks */,
2FAEF09A2E8B7BC80086EDA3 /* UIKit.framework in Frameworks */, 2FAEF09A2E8B7BC80086EDA3 /* UIKit.framework in Frameworks */,
...@@ -81,6 +84,7 @@ ...@@ -81,6 +84,7 @@
2FAEF0982E8B7BC80086EDA3 /* Frameworks */ = { 2FAEF0982E8B7BC80086EDA3 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2FD1557A2ECAC5CC00233981 /* WebKit.framework */,
2FB292292EAB04F400D9F164 /* AVFoundation.framework */, 2FB292292EAB04F400D9F164 /* AVFoundation.framework */,
2F99420C2EA9C5F000622199 /* QuartzCore.framework */, 2F99420C2EA9C5F000622199 /* QuartzCore.framework */,
2F8D09082E9605E200C764FF /* CoreGraphics.framework */, 2F8D09082E9605E200C764FF /* CoreGraphics.framework */,
......
// AppointmentAPIClient.h
#import <Foundation/Foundation.h>
@interface AppointmentAPIClient : NSObject
+ (void)fetchAppointment:(void (^)(NSDictionary *data, NSError *error))completion;
@end
// AppointmentAPIClient.mm
#import "AppointmentAPIClient.h"
@implementation AppointmentAPIClient
+ (void)fetchAppointment:(void (^)(NSDictionary *data, NSError *error))completion {
// ✅ URL
NSString *urlString = @"https://kitadev.commudesk.com/api/owner/appointment/getSlot?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImF0aGlyYWh6YWlkaUBjb252ZXAuY29tIiwicGFzc3dvcmQiOiIkMnkkMTAkNU9xYklqMnZ6UHJwckJrcVd5c3I2LmJCc1hVYS9Hd014eUhnL3RhUUhPUkNQcGdmTG8yakciLCJzdWIiOjIxNzAsImlzcyI6Imh0dHBzOi8va2l0YWRldi5jb21tdWRlc2suY29tL2FwaS9vd25lci9hdXRoL3Bhc3N3b3JkbGVzc19sb2dpbiIsImlhdCI6MTc2MDMxNTM1MiwiZXhwIjoyMDc1ODg0ODcyLCJuYmYiOjE3NjAzMTUzNTIsImp0aSI6IktoQmNyQnJEdDVNdDZlWmMifQ.JnxGbZ7hTeoOr6oibIzZMphgyKtTo2Aq9Efx6mrGfFA";
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"POST";
// ✅ JSON headers
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
// ✅ Build JSON body
NSDictionary *jsonBody = @{
@"data": @{
@"os": @"AND",
@"project_id": @"8",
@"drawing_plan_id": @"135"
}
};
// ✅ Convert dictionary → NSData
NSError *jsonError;
NSData *bodyData = [NSJSONSerialization dataWithJSONObject:jsonBody options:0 error:&jsonError];
if (jsonError) {
NSLog(@"❌ JSON Serialization Error: %@", jsonError);
if (completion) completion(nil, jsonError);
return;
}
request.HTTPBody = bodyData;
// 🧭 Debug logs
NSLog(@"🌍 URL: %@", urlString);
NSLog(@"📦 Body JSON: %@", jsonBody);
// ✅ Make request
NSURLSessionDataTask *task = [[NSURLSession sharedSession]
dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"❌ Network Error: %@", error);
dispatch_async(dispatch_get_main_queue(), ^{
if (completion) completion(nil, error);
});
return;
}
NSError *jsonParseError;
NSDictionary *jsonResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonParseError];
if (jsonParseError) {
NSLog(@"⚠️ JSON Parse Error: %@", jsonParseError);
} else {
NSLog(@"✅ Appointment API Response:\n%@", jsonResponse);
}
dispatch_async(dispatch_get_main_queue(), ^{
if (completion) completion(jsonResponse, jsonParseError);
});
}];
[task resume];
}
@end
// AppointmentViewController.h
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface AppointmentViewController : UIViewController
@property (nonatomic, strong) NSString *projectCode;
@property (nonatomic, strong) NSString *projectName;
@property (nonatomic, strong) NSString *projectId;
@end
NS_ASSUME_NONNULL_END
// AppointmentViewController.mm
#import "AppointmentViewController.h"
#import <UIKit/UIKit.h>
#import "AppointmentAPIClient.h"
#import <WebKit/WebKit.h>
@interface AppointmentViewController () <WKNavigationDelegate, WKUIDelegate, UIScrollViewDelegate>
@property (nonatomic, strong) UIView *headerBar;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *backButton;
@property (nonatomic, strong) UIButton *helpButton;
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIView *contentView;
// Terms & Conditions
@property (nonatomic, strong) UIView *termsOverlay;
@property (nonatomic, strong) UITextView *termsTextView;
@property (nonatomic, strong) UIButton *agreeButton;
@property (nonatomic, assign) BOOL hasAgreedToTerms;
@property (nonatomic, strong) UILabel *termsTitleLabel;
@property (nonatomic, strong) UIView *termsContainer;
@property (nonatomic, strong) NSDictionary *appointmentData;
@property (nonatomic, strong) WKWebView *termsWebView;
// Calendar placeholder
@property (nonatomic, strong) UIView *calendarContainer;
@property (nonatomic, strong) UIStackView *legendStack;
// Footer buttons
@property (nonatomic, strong) UIView *footerView;
@property (nonatomic, strong) UIButton *backFooterButton;
@property (nonatomic, strong) UIButton *nextFooterButton;
// Tutorial overlay
@property (nonatomic, strong) UIView *tutorialOverlay;
@property (nonatomic, strong) UIImageView *tutorialImageView;
@property (nonatomic, strong) UIButton *skipButton;
@end
@implementation AppointmentViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = UIColor.whiteColor;
[self setupUI];
[self setupTermsOverlay];
[self fetchAppointment];
}
#pragma mark - Setup UI
- (void)setupUI {
[self setupHeader];
[self setupScrollView];
[self setupCalendarSection];
[self setupFooter];
[self setupTutorialOverlay];
}
#pragma mark - Navigation Bar
- (void)setupHeader {
UILayoutGuide *safe = self.view.safeAreaLayoutGuide;
//Header
self.headerBar = [[UIView alloc] init];
self.headerBar.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0]; // #006D8D
[self.view addSubview:self.headerBar];
self.headerBar.translatesAutoresizingMaskIntoConstraints = NO;
[NSLayoutConstraint activateConstraints:@[
[self.headerBar.topAnchor constraintEqualToAnchor:safe.topAnchor],
[self.headerBar.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.headerBar.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[self.headerBar.heightAnchor constraintEqualToConstant:48],
]];
// Title
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.text = @"Make Appointment";
self.titleLabel.textColor = UIColor.whiteColor;
self.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
// Back button
self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.backButton setImage:[UIImage systemImageNamed:@"xmark"] forState:UIControlStateNormal];
self.backButton.tintColor = UIColor.whiteColor;
[self.backButton addTarget:self
action:@selector(handleBackTapped)
forControlEvents:UIControlEventTouchUpInside];
for (UIView *sub in @[self.titleLabel, self.backButton]) {
sub.translatesAutoresizingMaskIntoConstraints = NO;
[self.headerBar addSubview:sub];
}
[NSLayoutConstraint activateConstraints:@[
[self.backButton.leadingAnchor constraintEqualToAnchor:self.headerBar.leadingAnchor constant:16],
[self.backButton.centerYAnchor constraintEqualToAnchor:self.headerBar.centerYAnchor],
[self.titleLabel.centerXAnchor constraintEqualToAnchor:self.headerBar.centerXAnchor],
[self.titleLabel.centerYAnchor constraintEqualToAnchor:self.headerBar.centerYAnchor],
]];
}
#pragma mark = Overlay t&c
- (void)setupTermsOverlay {
self.termsOverlay = [[UIView alloc] init];
self.termsOverlay.backgroundColor = UIColor.whiteColor;
self.termsOverlay.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.termsOverlay];
[NSLayoutConstraint activateConstraints:@[
[self.termsOverlay.topAnchor constraintEqualToAnchor:self.headerBar.bottomAnchor],
[self.termsOverlay.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.termsOverlay.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[self.termsOverlay.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor],
]];
self.termsTitleLabel = [[UILabel alloc] init];
self.termsTitleLabel.text = @"Terms & Conditions";
self.termsTitleLabel.font = [UIFont boldSystemFontOfSize:18];
self.termsTitleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.termsOverlay addSubview:self.termsTitleLabel];
self.termsContainer = [[UIView alloc] init];
self.termsContainer.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1.0];
self.termsContainer.layer.cornerRadius = 12.0;
self.termsContainer.translatesAutoresizingMaskIntoConstraints = NO;
[self.termsOverlay addSubview:self.termsContainer];
// WKWebView
self.termsWebView = [[WKWebView alloc] initWithFrame:CGRectZero];
self.termsWebView.translatesAutoresizingMaskIntoConstraints = NO;
self.termsWebView.scrollView.delegate = self;
self.termsWebView.navigationDelegate = self;
[self.termsContainer addSubview:self.termsWebView];
// Agree button
self.agreeButton = [UIButton buttonWithType:UIButtonTypeSystem];
self.agreeButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.agreeButton setTitle:@"Agree and Continue" forState:UIControlStateNormal];
self.agreeButton.enabled = NO;
self.agreeButton.backgroundColor = UIColor.lightGrayColor;
self.agreeButton.tintColor = UIColor.whiteColor;
self.agreeButton.layer.cornerRadius = 10.0;
[self.agreeButton addTarget:self action:@selector(handleAgreeTapped)
forControlEvents:UIControlEventTouchUpInside];
[self.termsOverlay addSubview:self.agreeButton];
// Layout
[NSLayoutConstraint activateConstraints:@[
[self.termsTitleLabel.topAnchor constraintEqualToAnchor:self.termsOverlay.topAnchor constant:40],
[self.termsTitleLabel.leadingAnchor constraintEqualToAnchor:self.termsOverlay.leadingAnchor constant:20],
[self.termsTitleLabel.trailingAnchor constraintEqualToAnchor:self.termsOverlay.trailingAnchor constant:-20],
[self.termsContainer.topAnchor constraintEqualToAnchor:self.termsTitleLabel.bottomAnchor constant:12],
[self.termsContainer.leadingAnchor constraintEqualToAnchor:self.termsOverlay.leadingAnchor constant:20],
[self.termsContainer.trailingAnchor constraintEqualToAnchor:self.termsOverlay.trailingAnchor constant:-20],
[self.termsContainer.bottomAnchor constraintEqualToAnchor:self.agreeButton.topAnchor constant:-20],
[self.termsWebView.topAnchor constraintEqualToAnchor:self.termsContainer.topAnchor],
[self.termsWebView.leadingAnchor constraintEqualToAnchor:self.termsContainer.leadingAnchor],
[self.termsWebView.trailingAnchor constraintEqualToAnchor:self.termsContainer.trailingAnchor],
[self.termsWebView.bottomAnchor constraintEqualToAnchor:self.termsContainer.bottomAnchor],
[self.agreeButton.leadingAnchor constraintEqualToAnchor:self.termsOverlay.leadingAnchor constant:40],
[self.agreeButton.trailingAnchor constraintEqualToAnchor:self.termsOverlay.trailingAnchor constant:-40],
[self.agreeButton.bottomAnchor constraintEqualToAnchor:self.termsOverlay.safeAreaLayoutGuide.bottomAnchor constant:-20],
[self.agreeButton.heightAnchor constraintEqualToConstant:50],
]];
}
#pragma mark - Scroll View
- (void)setupScrollView {
self.scrollView = [[UIScrollView alloc] init];
self.scrollView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.scrollView];
[NSLayoutConstraint activateConstraints:@[
[self.scrollView.topAnchor constraintEqualToAnchor:self.headerBar.bottomAnchor],
[self.scrollView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.scrollView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[self.scrollView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-100]
]];
self.contentView = [[UIView alloc] init];
self.contentView.translatesAutoresizingMaskIntoConstraints = NO;
[self.scrollView addSubview:self.contentView];
[NSLayoutConstraint activateConstraints:@[
[self.contentView.widthAnchor constraintEqualToAnchor:self.scrollView.widthAnchor],
[self.contentView.topAnchor constraintEqualToAnchor:self.scrollView.topAnchor],
[self.contentView.bottomAnchor constraintEqualToAnchor:self.scrollView.bottomAnchor]
]];
}
#pragma mark - Calendar Section
- (void)setupCalendarSection {
self.calendarContainer = [[UIView alloc] init];
self.calendarContainer.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
self.calendarContainer.layer.cornerRadius = 12.0;
self.calendarContainer.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:self.calendarContainer];
// Legend stack
self.legendStack = [[UIStackView alloc] init];
self.legendStack.axis = UILayoutConstraintAxisHorizontal;
self.legendStack.spacing = 16.0;
self.legendStack.alignment = UIStackViewAlignmentCenter;
self.legendStack.distribution = UIStackViewDistributionEqualSpacing;
self.legendStack.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:self.legendStack];
NSArray *legendData = @[
@{@"title": @"Available", @"color": UIColor.systemGreenColor},
@{@"title": @"Limited", @"color": UIColor.systemOrangeColor},
@{@"title": @"Unavailable", @"color": UIColor.systemRedColor}
];
for (NSDictionary *item in legendData) {
UIView *dot = [[UIView alloc] init];
dot.backgroundColor = item[@"color"];
dot.layer.cornerRadius = 6;
dot.translatesAutoresizingMaskIntoConstraints = NO;
[dot.heightAnchor constraintEqualToConstant:12].active = YES;
[dot.widthAnchor constraintEqualToConstant:12].active = YES;
UILabel *label = [[UILabel alloc] init];
label.text = item[@"title"];
label.font = [UIFont systemFontOfSize:13];
UIStackView *pair = [[UIStackView alloc] initWithArrangedSubviews:@[dot, label]];
pair.axis = UILayoutConstraintAxisHorizontal;
pair.spacing = 4.0;
[self.legendStack addArrangedSubview:pair];
}
[NSLayoutConstraint activateConstraints:@[
[self.calendarContainer.topAnchor constraintEqualToAnchor:self.contentView.topAnchor constant:20],
[self.calendarContainer.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor constant:16],
[self.calendarContainer.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor constant:-16],
[self.calendarContainer.heightAnchor constraintEqualToConstant:320],
[self.legendStack.topAnchor constraintEqualToAnchor:self.calendarContainer.bottomAnchor constant:16],
[self.legendStack.centerXAnchor constraintEqualToAnchor:self.contentView.centerXAnchor]
]];
}
#pragma mark - Footer Buttons
- (void)setupFooter {
self.footerView = [[UIView alloc] init];
self.footerView.backgroundColor = UIColor.whiteColor;
self.footerView.layer.shadowOpacity = 0.1;
self.footerView.layer.shadowOffset = CGSizeMake(0, -1);
self.footerView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.footerView];
[NSLayoutConstraint activateConstraints:@[
[self.footerView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.footerView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[self.footerView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor],
[self.footerView.heightAnchor constraintEqualToConstant:80]
]];
self.backFooterButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.backFooterButton setTitle:@"Back" forState:UIControlStateNormal];
self.backFooterButton.layer.borderColor = [UIColor systemTealColor].CGColor;
self.backFooterButton.layer.borderWidth = 1.0;
self.backFooterButton.layer.cornerRadius = 20.0;
[self.backFooterButton setTitleColor:[UIColor systemTealColor] forState:UIControlStateNormal];
self.nextFooterButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.nextFooterButton setTitle:@"Next" forState:UIControlStateNormal];
self.nextFooterButton.backgroundColor = [UIColor systemTealColor];
self.nextFooterButton.tintColor = UIColor.whiteColor;
self.nextFooterButton.layer.cornerRadius = 20.0;
UIStackView *stack = [[UIStackView alloc] initWithArrangedSubviews:@[self.backFooterButton, self.nextFooterButton]];
stack.axis = UILayoutConstraintAxisHorizontal;
stack.spacing = 12.0;
stack.distribution = UIStackViewDistributionFillEqually;
stack.translatesAutoresizingMaskIntoConstraints = NO;
[self.footerView addSubview:stack];
[NSLayoutConstraint activateConstraints:@[
[stack.topAnchor constraintEqualToAnchor:self.footerView.topAnchor constant:12],
[stack.leadingAnchor constraintEqualToAnchor:self.footerView.leadingAnchor constant:16],
[stack.trailingAnchor constraintEqualToAnchor:self.footerView.trailingAnchor constant:-16],
[stack.bottomAnchor constraintEqualToAnchor:self.footerView.bottomAnchor constant:-12]
]];
}
#pragma mark - Tutorial Overlay
- (void)setupTutorialOverlay {
self.tutorialOverlay = [[UIView alloc] init];
self.tutorialOverlay.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6];
self.tutorialOverlay.hidden = YES;
self.tutorialOverlay.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.tutorialOverlay];
[NSLayoutConstraint activateConstraints:@[
[self.tutorialOverlay.topAnchor constraintEqualToAnchor:self.view.topAnchor],
[self.tutorialOverlay.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.tutorialOverlay.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[self.tutorialOverlay.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor]
]];
self.tutorialImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tutorial_step1"]];
self.tutorialImageView.contentMode = UIViewContentModeScaleAspectFit;
self.tutorialImageView.translatesAutoresizingMaskIntoConstraints = NO;
[self.tutorialOverlay addSubview:self.tutorialImageView];
self.skipButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.skipButton setTitle:@"Skip" forState:UIControlStateNormal];
self.skipButton.tintColor = UIColor.whiteColor;
self.skipButton.layer.borderColor = UIColor.whiteColor.CGColor;
self.skipButton.layer.borderWidth = 1.0;
self.skipButton.layer.cornerRadius = 6.0;
self.skipButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.tutorialOverlay addSubview:self.skipButton];
[NSLayoutConstraint activateConstraints:@[
[self.tutorialImageView.centerXAnchor constraintEqualToAnchor:self.tutorialOverlay.centerXAnchor],
[self.tutorialImageView.centerYAnchor constraintEqualToAnchor:self.tutorialOverlay.centerYAnchor],
[self.tutorialImageView.widthAnchor constraintEqualToAnchor:self.tutorialOverlay.widthAnchor multiplier:0.9],
[self.tutorialImageView.heightAnchor constraintEqualToAnchor:self.tutorialOverlay.heightAnchor multiplier:0.7],
[self.skipButton.topAnchor constraintEqualToAnchor:self.tutorialOverlay.safeAreaLayoutGuide.topAnchor constant:16],
[self.skipButton.trailingAnchor constraintEqualToAnchor:self.tutorialOverlay.trailingAnchor constant:-16],
[self.skipButton.widthAnchor constraintEqualToConstant:70],
[self.skipButton.heightAnchor constraintEqualToConstant:32]
]];
}
#pragma mark - api
- (void)fetchAppointment {
[AppointmentAPIClient fetchAppointment:^(NSDictionary *data, NSError *error) {
if (error) return;
NSDictionary *appointData = data;
NSString *text = [NSString stringWithFormat:@"%@", appointData];
NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject;
NSString *filePath = [docsPath stringByAppendingPathComponent:@"appointmentData.txt"];
NSString *plainText = [NSString stringWithFormat:@"%@", appointData];
[plainText writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:nil];
NSLog(@"📁 appointmentData saved as plain text to: %@", filePath);
self.appointmentData = appointData[@"Data"];
dispatch_async(dispatch_get_main_queue(), ^{
NSDictionary *jointInspection = self.appointmentData[@"joint_inspection"];
NSDictionary *handover = self.appointmentData[@"handover"];
NSString *termsHTML = jointInspection[@"terms"] ?: handover[@"terms"];
if (termsHTML.length == 0) {
NSLog(@"⚠️ termsHTML is EMPTY");
} else {
NSLog(@"✅ Loading terms HTML (%lu chars)", termsHTML.length);
}
NSString *styledHTML = [NSString stringWithFormat:
@"<html>"
"<head>"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\">"
"<style>"
"body {"
"font-size: 14px;"
"font-family: -apple-system;"
"line-height: 1.5;"
"padding: 12px;"
"background-color: #F9F9F9;"
"}"
"p { margin-bottom: 12px; }"
"</style>"
"</head>"
"<body>%@</body>"
"</html>", termsHTML];
[self.termsWebView loadHTMLString:styledHTML baseURL:nil];
});
}];
}
#pragma mark - WKWebView Delegate
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
// Ensure layout is up-to-date
[webView layoutIfNeeded];
// Get content height via JS
[webView evaluateJavaScript:@"document.body.scrollHeight;" completionHandler:^(id _Nullable result, NSError * _Nullable error) {
if (error) return;
CGFloat contentHeight = [result doubleValue];
CGFloat frameHeight = webView.scrollView.bounds.size.height;
// Short content: enable button immediately
if (contentHeight <= frameHeight) {
[self enableAgreeButton];
} else {
// Long content: track scrolling
webView.scrollView.delegate = self;
}
}];
}
#pragma mark - Scroll View Delegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView != self.termsWebView.scrollView) return;
if (self.agreeButton.enabled) return;
CGFloat offsetY = scrollView.contentOffset.y;
CGFloat contentHeight = scrollView.contentSize.height;
CGFloat frameHeight = scrollView.bounds.size.height;
if (offsetY + frameHeight >= contentHeight - 10) {
[self enableAgreeButton];
}
}
#pragma mark - Helper
- (void)enableAgreeButton {
self.agreeButton.enabled = YES;
self.agreeButton.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0];
}
- (void)handleAgreeTapped {
self.calendarContainer.userInteractionEnabled = YES;
self.footerView.userInteractionEnabled = YES;
[UIView animateWithDuration:0.25 animations:^{
self.termsOverlay.alpha = 0.0;
} completion:^(BOOL finished) {
self.termsOverlay.hidden = YES;
self.termsOverlay.alpha = 1.0;
}];
}
- (void)handleBackTapped {
if (self.navigationController) {
// If inside a navigation controller → go back
[self.navigationController popViewControllerAnimated:YES];
} else {
// Otherwise → dismiss modally
[self dismissViewControllerAnimated:YES completion:nil];
}
}
@end
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#import "DashboardAPIClient.h" #import "DashboardAPIClient.h"
#import "IssueDetailViewController.h" #import "IssueDetailViewController.h"
#import "IssuesViewController.h" #import "IssuesViewController.h"
#import "AppointmentViewController.h"
@interface DashboardViewController () @interface DashboardViewController ()
...@@ -210,7 +211,18 @@ ...@@ -210,7 +211,18 @@
- (void)footerButtonTapped:(UIButton *)sender { - (void)footerButtonTapped:(UIButton *)sender {
switch (sender.tag) { switch (sender.tag) {
case 0: {
NSLog(@"Navigating to Appointment");
AppointmentViewController *appointVC = [[AppointmentViewController alloc] init];
appointVC.projectCode = self.projectCode;
appointVC.projectName = self.projectName;
appointVC.projectId = @"8";
appointVC.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:appointVC animated:YES completion:nil];
break;
}
case 1: { case 1: {
NSLog(@"Navigating to Plan");
PlanViewController *planVC = [[PlanViewController alloc] init]; PlanViewController *planVC = [[PlanViewController alloc] init];
planVC.projectCode = self.projectCode; planVC.projectCode = self.projectCode;
planVC.projectName = self.projectName; planVC.projectName = self.projectName;
...@@ -218,6 +230,9 @@ ...@@ -218,6 +230,9 @@
[self presentViewController:planVC animated:YES completion:nil]; [self presentViewController:planVC animated:YES completion:nil];
break; break;
} }
case 2: {
NSLog(@"Navigating to Access Item");
}
default: default:
break; break;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
EqtjfGVJUrKupCnFW6lfffSo2ZA= mDeq0E4lblXfFuIgkojjE5zY6hk=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
w8N5kkR8hr/wIwb/x0XA5+wVpdo= /JZsUWwwr7A+ZF0o001HQXRnzpI=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI= 0+eonZqFOeyimWUH94CuUhfXNEulhfi9YeuUE/wnX0s=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
EqtjfGVJUrKupCnFW6lfffSo2ZA= mDeq0E4lblXfFuIgkojjE5zY6hk=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
uEkE+l7bQzwu7vnX83uBlOCEpCk= 4pQwOIuYwsUH4Iiw1M402s3Ii8Y=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI= 0+eonZqFOeyimWUH94CuUhfXNEulhfi9YeuUE/wnX0s=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment