Skip to content

Commit

Permalink
Merge pull request #637 from meganz/release/v3.1.0
Browse files Browse the repository at this point in the history
v3.1.0
  • Loading branch information
sergiohs84 authored May 11, 2017
2 parents 4499a52 + ea6c8ad commit 8cbdd81
Show file tree
Hide file tree
Showing 42 changed files with 1,410 additions and 217 deletions.
25 changes: 23 additions & 2 deletions bindings/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
/MEGASDK.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/MEGASDK.xcscheme
/MEGASDK.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
18 changes: 7 additions & 11 deletions bindings/ios/3rdparty/build-libws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@ if [ "${ARCH}" == "arm64" ]; then

IOSC_HOST_TRIPLET=aarch64-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DBUILD_ARM64=1 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a
cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DBUILD_ARM64=1 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a

elif [ "${ARCH}" == "i386" ]; then

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a
cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a

elif [ "${ARCH}" == "x86_64" ]; then

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR64 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a
cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR64 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a

else

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a
cmake . -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a
fi

CMAKE_XCOMPILE_ARGS="-DCMAKE_TOOLCHAIN_FILE=$IOSC_CMAKE_TOOLCHAIN -DCMAKE_INSTALL_PREFIX=$IOSC_BUILDROOT"
Expand All @@ -115,12 +115,8 @@ done
mkdir lib || true
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libws.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libws.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libws.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libws.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libws.a -output ${CURRENTPATH}/lib/libws.a

#mkdir -p include/libws || true
#cp -f expat-${EXPAT_VERSION}/lib/*.h include/expat/

#rm -rf bin
#rm -rf expat-${EXPAT_VERSION}
#rm -rf expat-${EXPAT_VERSION}.tar.bz2

mkdir -p include/libws || true
cp -f -R karere-native/third-party/libws/src/*.h include/libws/
cp -f -R karere-native/third-party/libws/libws_config.h include/libws/

echo "Done."
8 changes: 4 additions & 4 deletions bindings/ios/3rdparty/build-megachat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,25 @@ if [ "${ARCH}" == "arm64" ]; then

IOSC_HOST_TRIPLET=aarch64-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DBUILD_ARM64=1 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}
cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DBUILD_ARM64=1 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}

elif [ "${ARCH}" == "i386" ]; then

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}
cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}

elif [ "${ARCH}" == "x86_64" ]; then

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR64 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}
cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=SIMULATOR64 -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}

else

IOSC_HOST_TRIPLET=${ARCH}-apple-darwin

/Applications/CMake.app/Contents/bin/cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}
cmake . -D_LIBMEGA_LIBRARIES= -DLIBMEGA_PUBLIC_INCLUDE_DIR=../../../../../include -DCMAKE_SYSROOT=${CURRENTPATH} -DCMAKE_TOOLCHAIN_FILE=${CURRENTPATH}/iOS.cmake -DIOS_PLATFORM=OS -DIOS_PLATFORM_TYPE=${ARCH} -DCMAKE_LIBRARY_PATH=${CURRENTPATH}/lib -DCMAKE_INCLUDE_PATH=${CURRENTPATH}/include -DLIBEVENT_INCLUDE_DIRS=${CURRENTPATH}/include/libevent -DLIBEVENT_LIB_CORE=${CURRENTPATH}/lib -DLIBEVENT_LIB_EXTRA=${CURRENTPATH}/lib -DLIBEVENT_LIB_OPENSSL=${CURRENTPATH}/lib -DLIBEVENT_LIB_PTHREADS=${CURRENTPATH}/lib -DOPENSSL_INCLUDE_DIR=${CURRENTPATH}/include -DOPENSSL_SSL_LIBRARY=${CURRENTPATH}/lib/libssl.a -DOPENSSL_CRYPTO_LIBRARY=${CURRENTPATH}/lib/libcrypto.a -DOPENSSL_ROOT_DIR=${CURRENTPATH} -DLIBEVENT_LIB=${CURRENTPATH}/lib/libevent.a ${ENABLE_WEBRTC}
fi

CMAKE_XCOMPILE_ARGS="-DCMAKE_TOOLCHAIN_FILE=$IOSC_CMAKE_TOOLCHAIN -DCMAKE_INSTALL_PREFIX=$IOSC_BUILDROOT"
Expand Down
5 changes: 5 additions & 0 deletions bindings/ios/MEGANodeList.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
*/
- (instancetype)clone;

/**
* @brief Add new node to nodeList
* @param node to be added. The node inserted is a copy from 'node'
*/
- (void)addNode:(MEGANode *)node;

/**
* @brief Returns the MEGANode at the position index in the MEGANodeList.
Expand Down
17 changes: 17 additions & 0 deletions bindings/ios/MEGANodeList.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ @interface MEGANodeList ()

@implementation MEGANodeList

- (instancetype)init {
self = [super init];

if (self != nil) {
_nodeList = self.nodeList->createInstance();
_cMemoryOwn = YES;
}

return self;
}

- (instancetype)initWithNodeList:(MegaNodeList *)nodelist cMemoryOwn:(BOOL)cMemoryOwn {
self = [super init];

Expand All @@ -57,6 +68,12 @@ - (MegaNodeList *)getCPtr {
return self.nodeList;
}

- (void)addNode:(MEGANode *)node {
if (node == nil) return;

self.nodeList->addNode([node getCPtr]);
}

- (MEGANode *)nodeAtIndex:(NSInteger)index {
return self.nodeList ? [[MEGANode alloc] initWithMegaNode:self.nodeList->get((int)index)->copy() cMemoryOwn:YES] : nil;
}
Expand Down
30 changes: 15 additions & 15 deletions bindings/ios/MEGASDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
418412731BA1A06600D94E72 /* MEGAInputStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 418412721BA1A06600D94E72 /* MEGAInputStream.mm */; };
41A990731A5D305700B2094A /* mega_utf8proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41A990721A5D305700B2094A /* mega_utf8proc.cpp */; };
41AB68F21A094194003FE608 /* GfxProcCG.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41AB68F11A094194003FE608 /* GfxProcCG.mm */; };
41AB68F81A0943DA003FE608 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41AB68F71A0943DA003FE608 /* MobileCoreServices.framework */; };
41AB68FC1A09444E003FE608 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41AB68FB1A09444E003FE608 /* ImageIO.framework */; };
41AD7A7E1A1E10F900D66856 /* DelegateMEGALoggerListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41AD7A7C1A1E10F900D66856 /* DelegateMEGALoggerListener.mm */; };
41B2AED91A0A859C006C40FB /* DelegateMEGAGlobalListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41B2AED21A0A859C006C40FB /* DelegateMEGAGlobalListener.mm */; };
41B2AEDA1A0A859C006C40FB /* DelegateMEGAListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41B2AED41A0A859C006C40FB /* DelegateMEGAListener.mm */; };
Expand Down Expand Up @@ -108,8 +106,6 @@
41AA739B1A56B246008601DD /* MEGAAccountDetails+init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MEGAAccountDetails+init.h"; sourceTree = "<group>"; };
41AB68ED1A093C3D003FE608 /* MEGASdk+init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MEGASdk+init.h"; sourceTree = "<group>"; };
41AB68F11A094194003FE608 /* GfxProcCG.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GfxProcCG.mm; sourceTree = "<group>"; };
41AB68F71A0943DA003FE608 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
41AB68FB1A09444E003FE608 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
41AD7A7B1A1E0F1B00D66856 /* MEGALoggerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MEGALoggerDelegate.h; sourceTree = "<group>"; };
41AD7A7C1A1E10F900D66856 /* DelegateMEGALoggerListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DelegateMEGALoggerListener.mm; sourceTree = "<group>"; };
41AD7A7D1A1E10F900D66856 /* DelegateMEGALoggerListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DelegateMEGALoggerListener.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -275,8 +271,6 @@
files = (
41E3FE961D6B10F2005ABE2B /* libsodium.a in Frameworks */,
414820921C523AA600552E76 /* libuv.a in Frameworks */,
41AB68FC1A09444E003FE608 /* ImageIO.framework in Frameworks */,
41AB68F81A0943DA003FE608 /* MobileCoreServices.framework in Frameworks */,
940BEF9219ED9245007E7FA2 /* libcares.a in Frameworks */,
940BEF9319ED9245007E7FA2 /* libcrypto.a in Frameworks */,
940BEF9419ED9245007E7FA2 /* libcryptopp.a in Frameworks */,
Expand Down Expand Up @@ -573,18 +567,10 @@
9472043A19ED916F00F6805F = {
isa = PBXGroup;
children = (
41AB68FB1A09444E003FE608 /* ImageIO.framework */,
41AB68F71A0943DA003FE608 /* MobileCoreServices.framework */,
940BEFF919ED9723007E7FA2 /* bindings */,
940BEF9719ED9259007E7FA2 /* sdk */,
940BEF8D19ED9245007E7FA2 /* libcares.a */,
940BEF8E19ED9245007E7FA2 /* libcrypto.a */,
940BEF8F19ED9245007E7FA2 /* libcryptopp.a */,
940BEF9019ED9245007E7FA2 /* libcurl.a */,
940BEF9119ED9245007E7FA2 /* libssl.a */,
414820911C523AA600552E76 /* libuv.a */,
41E3FE951D6B10F2005ABE2B /* libsodium.a */,
9472044419ED916F00F6805F /* Products */,
A82751021E97A929007CD9E2 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -596,6 +582,20 @@
name = Products;
sourceTree = "<group>";
};
A82751021E97A929007CD9E2 /* Frameworks */ = {
isa = PBXGroup;
children = (
940BEF8D19ED9245007E7FA2 /* libcares.a */,
940BEF8E19ED9245007E7FA2 /* libcrypto.a */,
940BEF8F19ED9245007E7FA2 /* libcryptopp.a */,
940BEF9019ED9245007E7FA2 /* libcurl.a */,
940BEF9119ED9245007E7FA2 /* libssl.a */,
414820911C523AA600552E76 /* libuv.a */,
41E3FE951D6B10F2005ABE2B /* libsodium.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
A8FD7B621E93B3FB0031FC50 /* osx */ = {
isa = PBXGroup;
children = (
Expand Down
Loading

0 comments on commit 8cbdd81

Please sign in to comment.