{ "id": "153931", "key": "AC-1265", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-12-27T06:05:23.000+0000", "created": "2015-12-17T19:34:03.000+0000", "labels": [ "Hyperloop", "Windows" ], "versions": [], "issuelinks": [], "assignee": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "updated": "2016-03-08T07:37:39.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Should I abandon native API call using JavaScript?\r\n\r\nBuild fails with this simple code:\r\n{code:java}\r\nvar win = require('Windows.UI.Xaml.Window');\r\n{code}\r\n\r\nBuild command:\r\n{noformat}\r\nC:\\Users\\toshiro\\Documents\\Appcelerator_Studio_Workspace\\TestApp>appc ti build -p windows -T ws-local -P MYPASSWORD -R generated.pfx\r\n{noformat}\r\n\r\nError log:\r\n{noformat}\r\n[INFO] Alloy compiled in 16.01656s\r\n[INFO] Alloy compiler completed successfully\r\n[INFO] Missing 3 app icons, generating missing icons\r\n[INFO] Square44x44Logo.png - Used for logo - size: 44x44\r\n[INFO] Square71x71Logo.png - Used for logo - size: 71x71\r\n[INFO] Square150x150Logo.png - Used for logo - size: 150x150\r\n[INFO] Processing JavaScript files\r\n[INFO] Detected native API reference: Windows.UI.Xaml.Window\r\n[INFO] Generating i18n files\r\n[INFO] Generating Native Type Wrappers\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Something went wrong. No metadata for type: Windows.Foundation.IAsyncOperation`1\r\n[WARN] Something went wrong. No metadata for type: Platform.Object\r\n[WARN] Something went wrong. No metadata for type: Windows.Foundation.IAsyncOperationWithProgress`2\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Unable to find metadata for: Platform.Object\r\n[WARN] Unable to find metadata for: Platform.Object\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\nNo metadata found for: Windows.Foundation.Collections.IKeyValuePair`2\r\n[INFO] Setting up native modules for CMakeLists.txt...\r\n[INFO] Writing appxmanifest C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Package.store.appxmanifest.in\r\n[INFO] Writing appxmanifest C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Package.phone.appxmanifest.in\r\n[INFO] Writing appxmanifest C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Package.win10.appxmanifest.in\r\n[INFO] Writing CMakeLists.txt: C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\CMakeLists.txt\r\n[INFO] Running cmake at C:\\ProgramData\\Titanium\\mobilesdk\\win32\\6.0.0.v20151216093835\\windows\\cli\\vendor\\cmake\\bin\\cmake.exe in directory C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\r\n[INFO] -- The C compiler identification is MSVC 18.0.31010.0\r\n[INFO] -- The CXX compiler identification is MSVC 18.0.31010.0\r\n[INFO] -- Check for working C compiler using: Visual Studio 14 2015\r\n[INFO] -- Check for working C compiler using: Visual Studio 14 2015 -- works\r\n[INFO] -- Detecting C compiler ABI info\r\n[INFO] -- Detecting C compiler ABI info - done\r\n[INFO] -- Check for working CXX compiler using: Visual Studio 14 2015\r\n[INFO] -- Check for working CXX compiler using: Visual Studio 14 2015 -- works\r\n[INFO] -- Detecting CXX compiler ABI info\r\n[INFO] -- Detecting CXX compiler ABI info - done\r\n[INFO] -- Detecting CXX compile features\r\n[INFO] -- Detecting CXX compile features - done\r\n[INFO] -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)\r\n[INFO] -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)\r\n[INFO] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR\r\n[INFO] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed\r\n[INFO] -- Performing Test COMPILER_HAS_DEPRECATED\r\n[INFO] -- Performing Test COMPILER_HAS_DEPRECATED - Failed\r\n[INFO] -- Configuring done\r\n[INFO] -- Generating done\r\n[INFO] -- Build files have been written to: C:/Users/toshiro/.titanium/vsbuild/DNPKitchenSink/store.x86\r\n[INFO] Running MSBuild on solution: C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\DNPKitchenSink.sln\r\n[WARN] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.ApplicationModel.DataTransfer.DataPackage.cpp(224): warning C4973: 'Windows::ApplicationModel::DataTransfer::IDataPackage::SetUri' : 非推奨として設定されています [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[WARN] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.ApplicationModel.DataTransfer.DataPackageView.cpp(254): warning C4973: 'Windows::ApplicationModel::DataTransfer::IDataPackageView::GetUriAsync' : 非推奨として設定されています [C:\\Users\\toshiro\\.titaniu\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(195): error C2039: 'StorageProvider' : 'Titanium::Windows::Storage' のメンバーではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindo\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(195): error C2065: 'StorageProvider' : 定義されていない識別子です。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(195): error C2923: 'HAL::JSExport' : 'StorageProvider' は、有効な テンプレート 型引数 (パラメーター 'T') ではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\T\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(196): error C2039: 'StorageProvider' : 'Titanium::Windows::Storage' のメンバーではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(196): error C2065: 'StorageProvider' : 定義されていない識別子です。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(196): error C2974: 'HAL::JSObject::GetPrivate' : テンプレート 引数が 'T' に対して無効です。型が必要です [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(197): error C3536: 'result_wrapper': 初期化前に使用することはできません [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFile.cpp(197): error C2227: '->wrap' : 左側がクラス、構造体、共用体、ジェネリック型へのポインターではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxp\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(174): error C2039: 'StorageProvider' : 'Titanium::Windows::Storage' のメンバーではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(174): error C2065: 'StorageProvider' : 定義されていない識別子です。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(174): error C2923: 'HAL::JSExport' : 'StorageProvider' は、有効な テンプレート 型引数 (パラメーター 'T') ではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(175): error C2039: 'StorageProvider' : 'Titanium::Windows::Storage' のメンバーではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(175): error C2065: 'StorageProvider' : 定義されていない識別子です。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(175): error C2974: 'HAL::JSObject::GetPrivate' : テンプレート 引数が 'T' に対して無効です。型が必要です [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindo\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(176): error C3536: 'result_wrapper': 初期化前に使用することはできません [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vcxproj]\r\n[ERROR] C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\Native\\src\\Windows.Storage.StorageFolder.cpp(176): error C2227: '->wrap' : 左側がクラス、構造体、共用体、ジェネリック型へのポインターではありません。 [C:\\Users\\toshiro\\.titanium\\vsbuild\\DNPKitchenSink\\store.x86\\Native\\TitaniumWindows_Native.vc\r\n{noformat}\r\n", "attachment": [], "flagged": false, "summary": "Can't build Windows Store app using JavaScript against native Windows API", "creator": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows 10 64 bit\r\nTitanium 5.1.1", "comment": { "comments": [ { "id": "373389", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please provide full sample code and explain what you are trying to do. We will try to regenerate the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-22T10:26:05.000+0000", "updated": "2015-12-22T10:26:05.000+0000" }, { "id": "373404", "author": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi, I'm trying examples described here:\r\nhttps://docs.appcelerator.com/platform/latest/#!/guide/Windows_Runtime_Direct_API_Access\r\n\r\nYou can reproduce this error by adding just one line to automatically generated index.js file. So it goes like this:\r\n\r\n{code:java}\r\nfunction doClick(e) {\r\n alert($.label.text);\r\n}\r\nvar win = require('Windows.UI.Xaml.Window');\r\n$.index.open();\r\n{code}\r\n", "updateAuthor": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-22T14:51:54.000+0000", "updated": "2015-12-22T14:51:54.000+0000" }, { "id": "373518", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tested the native Windows API. It working as expected with the example code provided below.\r\n{code}\r\nvar Window = require('Windows.UI.Xaml.Window'),\r\n TextBlock = require('Windows.UI.Xaml.Controls.TextBlock'),\r\n window = Window.Current,\r\n text = new TextBlock();\r\ntext.Text = \"Click me, please!\";\r\n// For enum values, you do not need to require in the class\r\n// See the next section\r\ntext.TextAlignment = Windows.UI.Xaml.TextAlignment.Center;\r\ntext.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center;\r\ntext.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;\r\ntext.FontSize = 60;\r\nwindow.Content = text;\r\nwindow.Activate();\r\n{code}\r\nThough the first time you build a project that includes WinRT APIs, the first build is slow (will take several minutes). For me it took 15 mins. I also tried your code, and your log doesn't show any error, which is also working. According to documentation \"The first time you build a project that includes WinRT APIs, the first build will be slow (will take several minutes). Subsequent builds should be faster even if you add more WinRT classes. \". So wait for the application to build. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-24T08:21:38.000+0000", "updated": "2015-12-24T08:21:38.000+0000" }, { "id": "374268", "author": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I guess you built app for windows phone or windows phone simulator, not for Windows App Store. As I wrote above post, it does not work when you build app with -T ws-local option.", "updateAuthor": { "name": "toshiro", "key": "toshiro", "displayName": "Toshiro Yagi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-12T07:22:34.000+0000", "updated": "2016-01-12T07:22:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }