ios example app update
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
BUILD_NUMBER_STR=$(cat .buildnum)
|
||||
BUILD_NUMBER=$((BUILD_NUMBER_STR + 1))
|
||||
echo $BUILD_NUMBER > .buildnum
|
||||
echo "#define ZTSDK_BUILD_VERSION " $BUILD_NUMBER > src/SDK_LocalBuild.h
|
||||
echo "#define ZTSDK_BUILD_VERSION " $BUILD_NUMBER > src/build.h
|
||||
echo $BUILD_NUMBER
|
||||
|
||||
@@ -1317,7 +1317,6 @@
|
||||
"-DSDK_DEBUG",
|
||||
"-DSDK",
|
||||
"-D__IOS__",
|
||||
"-DLWIP_DEBUG",
|
||||
"-DSDK_BUNDLED",
|
||||
"-DUSING_BRIDGING_HEADER",
|
||||
"-DSDK_IPV4",
|
||||
|
||||
@@ -427,6 +427,15 @@ void *zts_start_core_service(void *thread_id) {
|
||||
// set_intercept_status(INTERCEPT_DISABLED); // Ignore network calls from ZT service
|
||||
//#endif
|
||||
|
||||
#if defined(__IOS__)
|
||||
// Go to the app's data directory so we can shorten the sun_path we bind to
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
getcwd(current_dir, MAX_DIR_SZ);
|
||||
std::string targetDir = homeDir; // + "/../../";
|
||||
chdir(targetDir.c_str());
|
||||
homeDir = localHomeDir;
|
||||
#endif
|
||||
|
||||
#if defined(__UNITY_3D__)
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
getcwd(current_dir, MAX_DIR_SZ);
|
||||
@@ -467,6 +476,7 @@ void *zts_start_core_service(void *thread_id) {
|
||||
if ((*pi != ".")&&(*pi != "..")) {
|
||||
if (!ZeroTier::OSUtils::mkdir(ptmp)) {
|
||||
DEBUG_ERROR("home path does not exist, and could not create");
|
||||
perror("error\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -476,14 +486,7 @@ void *zts_start_core_service(void *thread_id) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(__IOS__)
|
||||
// Go to the app's data directory so we can shorten the sun_path we bind to
|
||||
char current_dir[MAX_DIR_SZ];
|
||||
getcwd(current_dir, MAX_DIR_SZ);
|
||||
std::string targetDir = homeDir + "/../../";
|
||||
chdir(targetDir.c_str());
|
||||
homeDir = localHomeDir;
|
||||
#endif
|
||||
|
||||
|
||||
//chdir(current_dir); // Return to previous current working directory (at the request of Unity3D)
|
||||
#if defined(__UNITY_3D__)
|
||||
|
||||
@@ -695,8 +695,6 @@ NetconEthernetTap::NetconEthernetTap(
|
||||
// SIP-0
|
||||
// Load and initialize network stack library
|
||||
#if defined(SDK_LWIP)
|
||||
DEBUG_INFO("Did I get here?");
|
||||
|
||||
Utils::snprintf(stackPath,sizeof(stackPath),"%s%sliblwip.so",homePath,ZT_PATH_SEPARATOR_S);
|
||||
lwipstack = new lwIP_stack(stackPath);
|
||||
if(!lwipstack) {
|
||||
|
||||
Reference in New Issue
Block a user