{"id":2984,"date":"2025-11-12T11:06:13","date_gmt":"2025-11-12T04:06:13","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=2984"},"modified":"2025-11-12T11:06:41","modified_gmt":"2025-11-12T04:06:41","slug":"configuration","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/ios\/library\/configuration\/","title":{"rendered":"Configuration"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"configuration\">Configuration<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"service-configuration\">Service Configuration<\/h2>\n\n\n\n<p>\u0e04\u0e2d\u0e19\u0e1f\u0e34\u0e01\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>serverURL<\/td><td>Endpoint \u0e02\u0e2d\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a<\/td><td>String<\/td><td><a href=\"https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api<\/a><\/td><\/tr><tr><td>httpRequestTimeout<\/td><td>\u0e04\u0e48\u0e32 Timeout \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e15\u0e48\u0e25\u0e30 Request<\/td><td>Double<\/td><td>5000<\/td><\/tr><tr><td>referer<\/td><td>\u0e04\u0e33\u0e2d\u0e49\u0e32\u0e07\u0e2d\u0e34\u0e07\u0e43\u0e19 Header \u0e02\u0e2d\u0e07 Request<\/td><td>Optional(String)<\/td><td>null<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"general-configuration\">General Configuration<\/h2>\n\n\n\n<p>\u0e04\u0e2d\u0e19\u0e1f\u0e34\u0e01\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e2d\u0e1e\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>schemaVersion<\/td><td>\u0e40\u0e25\u0e02\u0e40\u0e27\u0e2d\u0e23\u0e4c\u0e0a\u0e31\u0e19\u0e02\u0e2d\u0e07 Schema Database<\/td><td>UInt64<\/td><td>1<\/td><\/tr><tr><td>logDirectory<\/td><td>Directory \u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c Log \u0e20\u0e32\u0e22\u0e43\u0e19\u0e41\u0e2d\u0e1e\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19<\/td><td>String<\/td><td>Logs<\/td><\/tr><tr><td>geodatabaseDirectory<\/td><td>Directory \u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c Geodatabase \u0e20\u0e32\u0e22\u0e43\u0e19\u0e41\u0e2d\u0e1e\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19<\/td><td>String<\/td><td>Geodatabases<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sync-configuration\">Sync Configuration<\/h2>\n\n\n\n<p>\u0e04\u0e2d\u0e19\u0e1f\u0e34\u0e01\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23 Sync Offline<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>syncDirectory<\/td><td>Directory \u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c Sync<\/td><td>String<\/td><td>Sync<\/td><\/tr><tr><td>syncFileDirectory<\/td><td>Directory \u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23 Sync<\/td><td>String<\/td><td>Files<\/td><\/tr><tr><td>jsonFileName<\/td><td>\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c Json \u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23 Sync<\/td><td>String<\/td><td>TransactionOrder.json<\/td><\/tr><tr><td>zipFileName<\/td><td>\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c Zip \u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23 Sync<\/td><td>String<\/td><td>Sync.zip<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"keywindow\">KeyWindow<\/h2>\n\n\n\n<p>Application KeyWindow for iOS 13.0+<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>public var keyWindow: UIWindow? {\n    if #available(iOS 13.0, *) {\n        return UIApplication.shared.connectedScenes\n            .filter({ $0.activationState == .foregroundActive })\n            .map({ $0 as? UIWindowScene })\n            .compactMap({ $0 })\n            .first?.windows\n            .filter({ $0.isKeyWindow }).first\n    } else {\n        return UIApplication.shared.keyWindow\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">keyWindow<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #267F99\">UIWindow<\/span><span style=\"color: #000000\">? {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #267F99\">if<\/span><span style=\"color: #000000\"> #<\/span><span style=\"color: #795E26\">available<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">iOS<\/span><span style=\"color: #000000\"> 13.0, *) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #AF00DB\">return<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">UIApplication<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">shared<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">connectedScenes<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #795E26\">filter<\/span><span style=\"color: #000000\">({ $0.<\/span><span style=\"color: #001080\">activationState<\/span><span style=\"color: #000000\"> == .<\/span><span style=\"color: #001080\">foregroundActive<\/span><span style=\"color: #000000\"> })<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #795E26\">map<\/span><span style=\"color: #000000\">({ $0 as? <\/span><span style=\"color: #001080\">UIWindowScene<\/span><span style=\"color: #000000\"> })<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #795E26\">compactMap<\/span><span style=\"color: #000000\">({ <\/span><span style=\"color: #001080\">$0<\/span><span style=\"color: #000000\"> })<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #001080\">first<\/span><span style=\"color: #000000\">?.<\/span><span style=\"color: #001080\">windows<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">            .<\/span><span style=\"color: #795E26\">filter<\/span><span style=\"color: #000000\">({ $0.<\/span><span style=\"color: #001080\">isKeyWindow<\/span><span style=\"color: #000000\"> }).<\/span><span style=\"color: #001080\">first<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    } <\/span><span style=\"color: #267F99\">else<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #267F99\">return<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">UIApplication<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #267F99\">shared<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">keyWindow<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"featured_media":0,"parent":2981,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-2984","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=2984"}],"version-history":[{"count":2,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2984\/revisions"}],"predecessor-version":[{"id":2986,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2984\/revisions\/2986"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2981"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=2984"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=2984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}