macchina-io / macchina.io

macchina.io EDGE is a powerful C++ and JavaScript SDK for edge devices, multi-service IoT gateways and connected embedded systems.
https://macchina.io
GNU General Public License v3.0
512 stars 152 forks source link

On iOS real device (not simulator) the home directory is not usable #94

Closed LorenzoBe closed 5 years ago

LorenzoBe commented 5 years ago

https://github.com/macchina-io/macchina.io/blob/9a2afd3b57c97f7966b21436b03f7b634aea9867/platform/Foundation/src/Path_UNIX.cpp#L52

As an iOS App creator, I would like to access to the app home folder, data folder, tmp folder... When I get the path from the environment "HOME" variable I get the correct path, like: "/private/var/mobile/Containers/Data/Application/8C96C82A-A8CE-4F6D-B67E-0F488566EC19"

When I am using the Poco::Path::home() I get instead the home folder of the running user: "/var/mobile/"

I think for iOS real devices it would be more useful to get the environment variable, like for VXWORKS in PathImpl::homeImpl(). On iOS simulator the behavior seems to be ok.

obiltschnig commented 5 years ago

Moving this to https://github.com/pocoproject/poco/issues/2772