[TIMOB-27079] iOS: File API broken for projects with space in their name
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Unknown |
Created | 2019-05-14T09:04:29.000+0000 |
Updated | 2019-05-14T09:05:19.000+0000 |
Description
*Steps to reproduce the behavior*
Create a new app with a space in it's name:
Add the following code snipped to
Build and run the app with
*Actual behavior*
The app throws the following error:
Create a new app with a space in it's name: ti create -t app -n space name
Add the following code snipped to app.js
const file = Ti.Filesystem.getFile('app.js');
console.log(file.nativePath);
Build and run the app with ti build -p ios
*Actual behavior*
The app throws the following error:
[ERROR] Script Error {
[ERROR] column = 17;
[ERROR] line = 50;
[ERROR] message = "*** -[NSURL initFileURLWithPath:]: nil string parameter";
[ERROR] nativeStack = "3 Foundation 0x00000001026c5cf3 -[NSURL(NSURL) initFileURLWithPath:] + 127\n4 Foundation 0x00000001026c655f +[NSURL(NSURL) fileURLWithPath:] + 45\n5 TitaniumKit0x0000000105903479 -[TiFilesystemFileProxy nativePath] + 46\n6 TitaniumKit0x000000010591aed1 -[KrollObject valueForKey:] + 200\n7 TitaniumKit0x0000000105918b57 KrollGetProperty + 317\n8 JavaScriptCore 0x0000000100c24c81 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE14callbackGetterEPNS_9ExecStateExNS_12PropertyNameE + 225\n9 JavaScriptCore 0x00000001010bafcf llint_slow_path_get_by_id + 5743\n10 JavaScriptCore 0x0000000100be6cbd llint_entry + 25130\n11 JavaScriptCore 0x0000000100befb71 llint_entry + 61662\n12 JavaScriptCore 0x0000000100be08d9 vmEntryToJavaScript + 200\n13 JavaScriptCore 0x0000000100fc51d8 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 11304\n14 JavaScriptCore 0x0000000101238280 _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 288\n15 JavaScriptCore 0x0000000100c1c4d4 JSEvaluateScript + 676\n16 TitaniumKit0x0000000105957612 -[KrollEval jsInvokeInContext:exception:] + 199\n17 TitaniumKit0x000000010591f34a -[KrollBridge loadCommonJSModule:withSourceURL:] + 321\n18 TitaniumKit0x000000010591fd23 -[KrollBridge loadJavascriptText:fromFile:withContext:] + 68\n19 TitaniumKit0x000000010592113c -[KrollBridge require:path:] + 400";
[ERROR] sourceURL = "file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js";
[ERROR] stack = " at file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js:50:17)\n at global code@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js:52:70)\n at require@[native code]\n at require@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.internal/extensions/binding.js:21:25)\n at file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.main.js:40:10)\n at loadAsync@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.internal/bootstrap.loader.js:108:13)\n at global code@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.main.js:37:52)";
[ERROR] toJSON = "<KrollCallback: 0x600001d15e80>";
[ERROR] }
*Expected behavior*
The app does not throw an error and the full native path of the app.js
file inside the app bundle gets logged.
No comments