hansemannn / titanium-homekit

Support for the HomeKit framework in Appcelerator Titanium
Other
7 stars 1 forks source link

Cannot access existing homes #2

Closed andreasschraeder closed 6 years ago

andreasschraeder commented 6 years ago

I've successfully created a new home and made it the primary home. For accessing existing homes there seems to be no method, however. I'd like to get an array with existing homes and then be able to engage with each home's accessories. I've tried to add new methods to the code, but even compiling the code with no changes fails.

hansemannn commented 6 years ago

Hey there! As documented, this module currently utilizes the basic functionality of adding, updating and removing homes. I'd be happy to review a pull request to add more functionality.

To compile, you need to change the SDK-version inside the titanium.xcconfig to an SDK that is installed on your machine, e.g. 7.0.1.GA. Then, compile with appc run -p ios --build-only from the iphone/ directory. Let me know if that works out!

hansemannn commented 6 years ago

I just made a small commit to expose the "homes" property on the top-level module. It allows you to receive a list of Ti.HomeKit.Home instances that you can work with.

hansemannn commented 6 years ago

-> https://github.com/hansemannn/titanium-homekit/releases/tag/v1.2.0

andreasschraeder commented 6 years ago

Hi Hans, thanks a lot for your responsiveness and help. I've tried compiling the source code with the command you indicated, but unfortunately it results in an error message: Command /usr/local/bin/node /Users/andreasschrader/.appcelerator/install/7.0.1/package/node_modules/titanium/lib/titanium.js build -p ios --build-only --config-file /var/folders/nj/w5v_b5g57bz7p5lzplcdcbr80000gn/T/build-1514417009792.json --log-level info --no-banner --project-dir /Users/andreasschrader/Desktop/iphone

[INFO] Project directory: /Users/andreasschrader/Desktop/iphone [INFO] Module ID: ti.homekit [INFO] Creating universal library [INFO] Verifying universal library [INFO] Creating module zip 2017-12-27T23:23:48.384Z | ERROR | An uncaught exception was thrown! ENOENT: no such file or directory, scandir '/Users/andreasschrader/Desktop/example' 2017-12-27T23:23:48.385Z | ERROR | ENOENT: no such file or directory, scandir '/Users/andreasschrader/Desktop/example'

What do I need to change in order to compile the code?

Best regards,

Andreas