{"action":"created","issue":{"url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/4","repository_url":"https://api.github.com/repos/janeasystems/nodejs-mobile","labels_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/4/comments","events_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/4/events","html_url":"https://github.com/janeasystems/nodejs-mobile/issues/4","id":262778716,"node_id":"MDU6SXNzdWUyNjI3Nzg3MTY=","number":4,"title":"native modules","user":{"login":"lukaskollmer","id":6547384,"node_id":"MDQ6VXNlcjY1NDczODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6547384?v=4","gravatar_id":"","url":"https://api.github.com/users/lukaskollmer","html_url":"https://github.com/lukaskollmer","followers_url":"https://api.github.com/users/lukaskollmer/followers","following_url":"https://api.github.com/users/lukaskollmer/following{/other_user}","gists_url":"https://api.github.com/users/lukaskollmer/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaskollmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaskollmer/subscriptions","organizations_url":"https://api.github.com/users/lukaskollmer/orgs","repos_url":"https://api.github.com/users/lukaskollmer/repos","events_url":"https://api.github.com/users/lukaskollmer/events{/privacy}","received_events_url":"https://api.github.com/users/lukaskollmer/received_events","type":"User","site_admin":false},"labels":[{"id":709328250,"node_id":"MDU6TGFiZWw3MDkzMjgyNTA=","url":"https://api.github.com/repos/janeasystems/nodejs-mobile/labels/Android","name":"Android","color":"c2e0c6","default":false},{"id":709328575,"node_id":"MDU6TGFiZWw3MDkzMjg1NzU=","url":"https://api.github.com/repos/janeasystems/nodejs-mobile/labels/iOS","name":"iOS","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-10-04T13:02:13Z","updated_at":"2018-08-28T08:48:32Z","closed_at":null,"author_association":"NONE","body":"In your [announcement blog post](http://www.janeasystems.com/blog/announcing-node-js-mobile-apps-true-node-js-runtime-android-ios/) you write\r\n\r\n>JavaScript code can also make direct synchronous calls into native code (Java, Objective C, Swift) and get calls back from it, by means of Node’s native add-on APIs (the V8 API and N-API are both available).\r\n\r\nHow does this work exactly?\r\nI'm trying to use the `ffi` on iOS. I ship my own `node_modules` folder, which I add to `process.env.NODE_PATH` at runtime.\r\n\r\nThe issue is that `node-gyp` simply didn't build the native modules for arm64 in the first place.\r\n\r\n```js\r\nconst ffi = require('ffi');\r\n```\r\nthrows the following error:\r\n\r\n```\r\ndlopen(PATH_TO_APP/Frameworks/NodeJSKit.framework/node_modules/ref/build/Release/binding.node, 1): no suitable image found.  Did find:\r\n\tPATH_TO_APP/Frameworks/NodeJSKit.framework/node_modules/ref/build/Release/binding.node: mach-o, but wrong architecture\r\n\tPATH_TO_APP/Frameworks/NodeJSKit.framework/node_modules/ref/build/Release/binding.node: mach-o, but wrong architecture\r\n```\r\n\r\n---\r\n\r\nIs it possible to build native node addons written in c++ (that use the v8 api or the newer N-API) to work with nodejs-mobile?"},"comment":{"url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/comments/416502803","html_url":"https://github.com/janeasystems/nodejs-mobile/issues/4#issuecomment-416502803","issue_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/4","id":416502803,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjUwMjgwMw==","user":{"login":"xeoshow","id":1164284,"node_id":"MDQ6VXNlcjExNjQyODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1164284?v=4","gravatar_id":"","url":"https://api.github.com/users/xeoshow","html_url":"https://github.com/xeoshow","followers_url":"https://api.github.com/users/xeoshow/followers","following_url":"https://api.github.com/users/xeoshow/following{/other_user}","gists_url":"https://api.github.com/users/xeoshow/gists{/gist_id}","starred_url":"https://api.github.com/users/xeoshow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeoshow/subscriptions","organizations_url":"https://api.github.com/users/xeoshow/orgs","repos_url":"https://api.github.com/users/xeoshow/repos","events_url":"https://api.github.com/users/xeoshow/events{/privacy}","received_events_url":"https://api.github.com/users/xeoshow/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T08:48:32Z","updated_at":"2018-08-28T08:48:32Z","author_association":"NONE","body":"@bil-ash Understood and thank you so much!"}}
{"actor":{"display_login":"xeoshow"}}