{ "id": "162412", "key": "TIMOB-23729", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-04T10:13:27.000+0000", "created": "2016-08-04T09:41:35.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "52329", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "155203", "key": "TIMOB-20484", "fields": { "summary": "Hyperloop: iOS: Local-embedded frameworks not working", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T22:27:59.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Just found out that local frameworks will get a build failure if false\r\n\r\nYou are going to need this framework and this tessdata.\r\nhttps://github.com/gali8/Tesseract-OCR-iOS\r\nhttps://github.com/tesseract-ocr/tessdata\r\n\r\nor look for [~jlongton].\r\n\r\nh4. Steps to reproduce\r\n\r\n1. *appc new --classic*\r\n2. install the packaged hyperloop module here: https://github.com/appcelerator/hyperloop.next/releases/tag/1.2.5\r\n3. in tiapp.xml include\r\n{code}\r\n\r\n\tfalse\r\n\tfalse\r\n\r\n\r\n\r\n\thyperloop\r\n\r\n\r\n\r\n\thyperloop\r\n\r\n{code}\r\n4. create a `src` folder and put TesseractOCR.framework in\r\n5. add {{Lenore3.png}} to Resources/iPhone\r\n6. add tessdata folder to Resources/iPhone\r\n7. create a `appc.js` file, and use this as content \r\n{code}\r\n/**\r\n * Hyperloop configuration\r\n */\r\n\r\n\r\nmodule.exports = {\r\n\ttype: 'app',\r\n\tgroup: 'titanium',\r\n\tdependencies: {\r\n\t},\r\n\thyperloop: {\r\n\t\tios: {\r\n\t\t\txcodebuild: {\r\n\t\t\t\t/**\r\n\t\t\t\t * any flags available to be passed into the Xcode can be\r\n\t\t\t\t * included here to further customize the xcode build\r\n\t\t\t\t */\r\n\t\t\t\tflags: {\r\n//\t\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS: 'foo=bar'\r\n\t\t\t\t\tFRAMEWORK_SEARCH_PATHS: '../../src'\r\n\t\t\t\t},\r\n\t\t\t\t/**\r\n\t\t\t\t * this sample doesn't use StoreKit but this demonstrates\r\n\t\t\t\t * how you can bring in frameworks explicitly. Hyperloop\r\n\t\t\t\t * will automatically determine the required frameworks\r\n\t\t\t\t * but in case you want to force a specific version, you can\r\n\t\t\t\t * include it here\r\n\t\t\t\t */\r\n\t\t\t\tframeworks: [\r\n\t\t\t\t\t'TesseractOCR'\r\n\t\t\t\t]\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * optionally, you can bring in third-party or first-party libraries,\r\n\t\t\t * source code, resources etc. by including them here. The 'key' is the\r\n\t\t\t * name of the package that will be used in the require (if code).\r\n\t\t\t * the values can either be an Array or String value to the directory\r\n\t\t\t * where the files are located\r\n\t\t\t */\r\n\t\t\tthirdparty: {\r\n\t\t\t\t'TesseractOCR': {\r\n\t\t\t\t\t// these can be an array or string\r\n\t\t\t\t\tsource: ['src'],\r\n\t\t\t\t\theader: 'src',\r\n\t\t\t\t\tresource: 'src'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n{code}\r\n6. in {{Resources/app.js}}, use this\r\n{code}\r\nvar G8Tesseract = require('TesseractOCR/G8Tesseract');\r\nvar UIImage = require('UIKit/UIImage');\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white',\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar imageView = Ti.UI.createImageView({\r\n\timage: 'Lenore3.png'\r\n});\r\n\r\nwin.add(imageView);\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'OCR THIS'\r\n});\r\n\r\nwin.add(btn);\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n\tborderWidth: 2,\r\n\tborderColor: 'blue',\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.FILL\r\n});\r\nwin.add(textArea);\r\n\r\nbtn.addEventListener('click', function(e) {\r\n\tvar tess = G8Tesseract.alloc().initWithLanguage('eng+ita');\r\n\tvar img = UIImage.imageNamed('Lenore3.png');\t\r\n\ttess.setImage(img);\r\n\ttess.recognize();\r\n\ttextArea.setValue(tess.recognizedText.toString());\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh4. Expected Result\r\napp builds flawlessly\r\n\r\nh4. Actual Result\r\n{code}\r\n[TRACE] : \b\b \b/Users/kiat/titaniumTestWatch/HLTesseract/build/iphone/Classes/TiToJS.h:125:9: fatal error: 'JavaScriptCore/TiCore.h' file not found\r\n[TRACE] : \b\b \b#import \"JavaScriptCore/TiCore.h\"\r\n[TRACE] : \b\b \b ^\r\n[TRACE] : \b\b \b1 error generated.\r\n[ERROR] ** BUILD FAILED **\r\n[ERROR] The following build commands failed:\r\n[ERROR] CompileC build/Intermediates/HLTesseract.build/Debug-iphonesimulator/HLTesseract.build/Objects-normal/x86_64/TiFile.o Classes/TiFile.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler\r\n{code}", "attachment": [], "flagged": false, "summary": "Hyperloop: iOS: Local-embedded frameworks not working with TICORE", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "appc cli 5.4.0-37\r\nappc npm 4.2.7\r\nHyperloop Module 1.2.5\r\nTi SDK : 5.4.0.v20160802165655", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "392405", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PRs:\r\nhttps://github.com/appcelerator/hyperloop.next/pull/51\r\nhttps://github.com/appcelerator/hyperloop.next/pull/50\r\n\r\nAnd you can test easily with this pre-release https://github.com/appcelerator/hyperloop.next/releases/tag/1.2.6_b1", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-04T10:04:49.000+0000", "updated": "2016-08-04T10:04:49.000+0000" }, { "id": "392406", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR's (master & 1_2_X) merged. Do we want this in 5.4.0.GA as well?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-04T10:13:27.000+0000", "updated": "2016-08-04T10:13:27.000+0000" }, { "id": "392770", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "[~cng] I am not able to run the Tesseract application on a device.\r\n\r\nh4. Tested on\r\n\r\n{noformat}\r\niPhone 6s plus (9.3.1)\r\niPhone 5 (9.1)\r\niPhone Simulator (9.3)\r\n
Mac OSX El Capitan 10.11.6\r\nStudio: 4.7.0.201607250649\r\n
Ti SDK: 5.4.0.v20160809033140\r\n
Appc NPM: 4.2.7\r\nAppc CLI: 5.4.0-40\r\nXcode 7.3.1\r\nNode: v4.4.4\r\nHyperloop: 1.2.6\r\nCocoaPods: 1.0.1\r\n{noformat}\r\n\r\nh4. Simulator \r\nOn the simulator the application works just throwing a {{failed to load}} error for the language params. \r\n{noformat}\r\n[ERROR] : failed to load /Users/Josh/Library/Developer/CoreSimulator/Devices/D5EEC5AB-078C-46AA-AC55-05BBBD410CB7/data/Containers/Bundle/Application/FA4E6363-7592-4B2C-BD6D-8425F3B56303/Josh-HyperLoop-Test-app.app/tessdata/ita.special-words\r\n[ERROR] Using default language params\r\n{noformat}\r\n\r\nh4.Device \r\nOn the device the application throws an application error as soon as {{OCR this}} is clicked. \r\n\r\n{noformat}\r\n[ERROR] Cannot find class with name: G8Tesseract\r\n[ERROR] Script Error {\r\n[ERROR] column = 32;\r\n[ERROR] description = \"Cannot find class with name: G8Tesseract\";\r\n[ERROR] line = 105;\r\n[ERROR] message = \"Cannot find class with name: G8Tesseract\";\r\n[ERROR] name = ClassNotFound;\r\n[ERROR] nativeStack = \"1 libobjc.A.dylib 0x36e9edff objc_exception_throw + 38\\n2 Josh-HyperLoop-Test-app 0x0023ac3d Josh-HyperLoop-Test-app + 1723453\\n3 Josh-HyperLoop-Test-app 0x00233b5d Josh-HyperLoop-Test-app + 1694557\\n4 JavaScriptCore 0x26e31de3 + 366\\n5 JavaScriptCore 0x26bf9d43 + 314\\n6 JavaScriptCore 0x26bf856d + 120\\n7 JavaScriptCore 0x26ebf393 + 20386\\n8 JavaScriptCore 0x26ebf39d + 20396\\n9 JavaScriptCore 0x26eba1e1 + 336\\n10 JavaScriptCore 0x26e136b7 + 102\\n11 JavaScriptCore 0x26bfc9f9 + 344\\n12 JavaScriptCore 0x26bfc89d _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 60\\n13 JavaScriptCore 0x26dbf73f + 126\\n14 JavaScriptCore 0x26f185b7 _ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE + 42\\n15 JavaScriptCore 0x26bf4101 + 1408\\n16 JavaScriptCore 0x26ebc83d + 9292\\n17 JavaScriptCore 0x26ebf39d + 20396\\n18 JavaScriptCore 0x26eba1e1 + 336\\n19 JavaScriptCore 0x26e136b7 + 102\\n20 JavaScriptCore 0x26bfc9f9 + 344\\n21 JavaScriptCore 0x26bfc89d _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 60\\n22 JavaScriptCore 0x26bfc7b5 JSObjectCallAsFunction + 300\\n23 Josh-HyperLoop-Test-app 0x001d9e15 Josh-HyperLoop-Test-app + 1326613\\n24 Josh-HyperLoop-Test-app 0x00136c25 Josh-HyperLoop-Test-app + 658469\\n25 Josh-HyperLoop-Test-app 0x001d9d0f Josh-HyperLoop-Test-app + 1326351\\n26 Josh-HyperLoop-Test-app 0x001d9f9d Josh-HyperLoop-Test-app + 1327005\\n27 Josh-HyperLoop-Test-app 0x000b45bf Josh-HyperLoop-Test-app + 124351\\n28 Josh-HyperLoop-Test-app 0x000b46ab Josh-HyperLoop-Test-app + 124587\\n29 Josh-HyperLoop-Test-app 0x00136c25 Josh-HyperLoop-Test-app + 658469\\n30 Josh-HyperLoop-Test-app 0x000b466d Josh-HyperLoop-Test-app + 124525\\n31 Josh-HyperLoop-Test-app 0x001da02b Josh-HyperLoop-Test-app + 1327147\\n32 Josh-HyperLoop-Test-app 0x001d963d Josh-HyperLoop-Test-app + 1324605\\n33 Josh-HyperLoop-Test-app 0x0011b217 Josh-HyperLoop-Test-app + 545303\\n34 Josh-HyperLoop-Test-app 0x000d5045 Josh-HyperLoop-Test-app + 258117\\n35 Josh-HyperLoop-Test-app 0x0010daef Josh-HyperLoop-Test-app + 490223\\n36 Josh-HyperLoop-Test-app 0x0011ae63 Josh-HyperLoop-Test-app + 544355\\n37 Josh-HyperLoop-Test-app 0x0010ff9d Josh-HyperLoop-Test-app + 499613\\n38 UIKit 0x299495e1 + 80\\n39 UIKit 0x29949571 + 64\\n40 UIKit 0x29931487 + 446\\n41 UIKit 0x29948ec1 + 616\\n42 UIKit 0x29948b2f + 646\\n43 UIKit 0x2994144f + 642\\n44 UIKit 0x299122f1 + 204\\n45 UIKit 0x29910937 + 5134\\n46 CoreFoundation 0x257a07c7 + 14\\n47 CoreFoundation 0x257a03b7 + 454\\n48 CoreFoundation 0x2579e71f + 806\\n49 CoreFoundation 0x256f10d9 CFRunLoopRunSpecific + 516\\n50 CoreFoundation 0x256f0ecd CFRunLoopRunInMode + 108\\n51 GraphicsServices 0x2ea66af9 GSEventRunModal + 160\\n52 UIKit 0x2997a2dd UIApplicationMain + 144\\n53 Josh-HyperLoop-Test-app 0x0009cf3f Josh-HyperLoop-Test-app + 28479\\n54 libdyld.dylib 0x375ec873 + 2\";\r\n[ERROR] sourceURL = \"file:///var/mobile/Containers/Bundle/Application/967340AF-0866-4BDE-AFED-1F86CC245A15/Josh-HyperLoop-Test-app.app/hyperloop/tesseractocr/g8tesseract.js\";\r\n[ERROR] } \r\n{noformat}\r\n\r\n*I have attached my application used [here|https://www.dropbox.com/s/34w2fl884ea83m2/Josh-HyperLoop-Test-app.zip?dl=0]*\r\n", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-09T21:46:26.000+0000", "updated": "2016-08-10T17:46:27.000+0000" }, { "id": "416601", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed, if there are any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T22:27:59.000+0000", "updated": "2017-03-31T22:27:59.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }