mcesystems / libijs Goto Github PK
View Code? Open in Web Editor NEWA node.js library for communicating with iOS devices over USB
License: Other
A node.js library for communicating with iOS devices over USB
License: Other
Thanks for this repo.
Are there any plans on implementing com.apple.mobilesync service any time soon?
How to use your tools code?
I want to try this package but I keep getting "Couldn't find device"
npm ERR! code 1
npm ERR! path /Users/adminy/Desktop/usb_app/node_modules/ref
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/Users/adminy/Desktop/usb_app/node_modules/ref/build'
npm ERR! CXX(target) Release/obj.target/binding/src/binding.o
npm ERR! make: Leaving directory '/Users/adminy/Desktop/usb_app/node_modules/ref/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.12 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/adminy/Desktop/usb_app/node_modules/ref/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/adminy/Library/Caches/node-gyp/17.8.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/adminy/Library/Caches/node-gyp/17.8.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/adminy/Desktop/usb_app/node_modules/ref',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/binding.cc:222:43: error: too few arguments to function call, single argument 'isolate' was not specified
npm ERR! bool persistent = info[3]->BooleanValue();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-value.h:408:8: note: 'BooleanValue' declared here
npm ERR! bool BooleanValue(Isolate* isolate) const;
npm ERR! ^
npm ERR! ../src/binding.cc:253:38: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! size_t size = info[2]->Uint32Value();
npm ERR! ~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
npm ERR! ^
npm ERR! ../src/binding.cc:253:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
npm ERR! size_t size = info[2]->Uint32Value();
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:360:23: error: no matching constructor for initialization of 'String::Utf8Value'
npm ERR! String::Utf8Value _str(in);
npm ERR! ^ ~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-primitive.h:507:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
npm ERR! Utf8Value(const Utf8Value&) = delete;
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-primitive.h:500:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
npm ERR! Utf8Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR! ^
npm ERR! ../src/binding.cc:447:23: error: no matching constructor for initialization of 'String::Utf8Value'
npm ERR! String::Utf8Value _str(in);
npm ERR! ^ ~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-primitive.h:507:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
npm ERR! Utf8Value(const Utf8Value&) = delete;
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-primitive.h:500:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
npm ERR! Utf8Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR! ^
npm ERR! ../src/binding.cc:521:38: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! size_t size = info[1]->Uint32Value();
npm ERR! ~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
npm ERR! ^
npm ERR! ../src/binding.cc:521:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
npm ERR! size_t size = info[1]->Uint32Value();
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:550:44: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! uint32_t numZeros = info[1]->Uint32Value();
npm ERR! ~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
npm ERR! V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
npm ERR! ^
npm ERR! ../src/binding.cc:550:12: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'uint32_t' (aka 'unsigned int')
npm ERR! uint32_t numZeros = info[1]->Uint32Value();
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:582:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(int8, int8_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:583:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(uint8, uint8_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:584:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(int16, int16_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:585:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(uint16, uint16_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:586:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(int32, int32_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:587:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(uint32, uint32_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:588:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(int64, int64_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:589:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(uint64, uint64_t);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:590:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(float, float);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! ../src/binding.cc:591:3: error: no matching member function for call to 'Set'
npm ERR! SET_SIZEOF(double, double);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
npm ERR! smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
npm ERR! ~~~~~~^~~
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^
npm ERR! /Users/adminy/Library/Caches/node-gyp/17.8.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^
npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm ERR! 20 errors generated.
npm ERR! make: *** [binding.target.mk:130: Release/obj.target/binding/src/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.3.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/17.8.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/adminy/Desktop/usb_app/node_modules/ref
npm ERR! gyp ERR! node -v v17.8.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adminy/.npm/_logs/2022-09-10T16_15_27_685Z-debug-0.log
Hey, it's been 6 years since this was last updated. Any chance you want to swap to a more permissible license, like MIT?
Hi, I am not sure if this is supposed to work or not, but I am looking to selectively sync photos and I am using downloadFile
, uploadFile
and readDirectory
to do it.
These methods all work well, namely, when I do a sequence of uploadFile
, readDirectory
and downloadFile
, the individual methods succeed and I see the file appear in the directory listing and it is not corrupted when downloaded back.
However, the file that I upload to DCIM/100APPLE
does not appear in the Photos app. I tried with a PNG file and a JPG file and neither did appear there. I restarted the Photos app to rule out any caching issues as well.
Do you know why this might be happening? Is it perhaps necessary that I use HEIF or maybe a specific kind of a compression for the Photos app to pick my file up?
I'm seeing the backup hang (though I could have sworn I saw it work).
I believe it's occurring here:
The following does not get called.
if (!(yield this.__mobilebackup2.sendStatusResponse(0, null, dirContents)))
It seems that we have to make another call to next() on the function generator. I extracted the code and this is what I got:
const walk = require("./lib/lib/walk");
const meaco = require("meaco");
let count = 0;
function start(dir) {
return meaco(function *doWalk() {
yield walk('.', true, false)
.item( item => { count++; })
.done( () => { console.log(`walk is done: ${count}`); });
console.log(`this is not called ${count}`)
yield `this is not called ${count}`;
});
};
function handle() {
return meaco(function *doWalk() {
yield start('.');
console.log(`why is this getting called ==> ${count}`)
const z = yield 'blah'
console.log(`this is not called ==> ${count}`)
});
}
handle();
console.log(`the end? => ${count}`);
// output:
// why is this getting called ==> 0
// the end? => 0
// walk is done: 15
Thanks for the repo.
i use the lib to backup my phone data. i work well but a Memory leak.
i can see the using Memory increase in the window task and the process crash finally when run backup action.
i have no idea to fix the bug.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.