meganz / iOS

MEGA for iOS

Home Page:https://apps.apple.com/app/mega/id706857885?mt=8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing files

sofqi opened this issue · comments

commented

When building this in Xcode I get

In file included from :1:
/Users/TonyMac/sofqi/mega/iOS3/iMEGA/Extensions/MEGAShare/MEGAShare-PrefixHeader.pch:3:13: fatal error: 'LocalizationSystem.h' file not found
#import "LocalizationSystem.h"

mdfind -name LocallizationSystem.h returns no results

Hi,

Did you clone all submodules?

The file LocalizationSystem.h is part of AMLocalizedString submodule
https://github.com/tagyro/AMLocalizedString

ls -l iMEGA/Vendor/AMLocalizedString/
total 48
-rw-r--r-- 1 jn staff 6891 Mar 23 12:13 AMLocalized.podspec
-rw-r--r-- 1 jn staff 1074 Mar 23 12:13 LICENSE
-rwxr-xr-x 1 jn staff 1080 Mar 23 12:13 LocalizationSystem.h
-rwxr-xr-x 1 jn staff 3375 Mar 23 12:13 LocalizationSystem.m
-rwxr-xr-x 1 jn staff 166 Mar 23 12:13 README.md

commented

HI @jnavarrom
Thanks, that got past one issue. (as a side note the readme.md file should say git clone https://github.com/meganz/ios3.git not git clone https://github.com/meganz/ios.git)

  • thirdparty buildall.sh fails with
ld: warning: ignoring file /opt/local/lib/libz.dylib, missing required architecture armv7 in file /opt/local/lib/libz.dylib (2 slices)
Undefined symbols for architecture armv7:
  "_inflate", referenced from:
      _inflate_stream in libcurl.a(libcurl_la-content_encoding.o)
  "_inflateInit2_", referenced from:
      _inflate_stream in libcurl.a(libcurl_la-content_encoding.o)
      _Curl_unencode_gzip_write in libcurl.a(libcurl_la-content_encoding.o)
  "_inflateEnd", referenced from:
      _inflate_stream in libcurl.a(libcurl_la-content_encoding.o)
      _Curl_unencode_gzip_write in libcurl.a(libcurl_la-content_encoding.o)
      _Curl_unencode_cleanup in libcurl.a(libcurl_la-content_encoding.o)
  "_inflateInit_", referenced from:
      _Curl_unencode_deflate_write in libcurl.a(libcurl_la-content_encoding.o)
  "_zlibVersion", referenced from:
      _Curl_version_init in libcurl.a(libcurl_la-version.o)
      _curl_version in libcurl.a(libcurl_la-version.o)
      _curl_version_info in libcurl.a(libcurl_la-version.o)
      _Curl_unencode_gzip_write in libcurl.a(libcurl_la-content_encoding.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [curl] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
  • Xcode build fails with
CompileC /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Objects-normal/x86_64/cservices.o /Users/TonyMac/sofqi/mega/ios3/iMEGA/Vendor/Karere/src/base/cservices.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/TonyMac/sofqi/mega/ios3/iMEGA/Vendor/Karere/bindings/Objective-C
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/TonyMac/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/TonyMac/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mios-simulator-version-min=10.3 -g -Wno-sign-conversion -Winfinite-recursion -Wmove -iquote /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Karere-generated-files.hmap -I/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Karere-own-target-headers.hmap -I/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Karere-all-target-headers.hmap -iquote /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Karere-project-headers.hmap -iquote../../../SDK/bindings/ios/3rdparty/include/libws -iquote../../../SDK/bindings/ios/3rdparty/include/libevent -iquote../../../SDK/include/mega/posix -iquote../../../SDK/bindings/ios -iquote../../../SDK/bindings/ios/private -I/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Products/Debug-iphonesimulator/include -I../../src/base -I../../src/rtcModule -I../../third-party -I../../src -I../../../SDK/include -I../../../SDK/bindings/ios/3rdparty/include/libws -I../../../SDK/bindings/ios/3rdparty/include -I../../../SDK/bindings/ios/3rdparty/include/libevent -I/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/DerivedSources/x86_64 -I/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/DerivedSources -F/Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Products/Debug-iphonesimulator -DENABLE_CHAT -DHAVE_CONFIG_H -DHAVE_KARERE_LOGGER -DKARERE_DISABLE_WEBRTC -DSVC_DISABLE_STROPHE -D_DARWIN_C_SOURCE -MMD -MT dependencies -MF /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Objects-normal/x86_64/cservices.d --serialize-diagnostics /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Objects-normal/x86_64/cservices.dia -c /Users/TonyMac/sofqi/mega/ios3/iMEGA/Vendor/Karere/src/base/cservices.cpp -o /Users/TonyMac/Library/Developer/Xcode/DerivedData/iMEGA-bvtqwqcljlllljdbnprzqzxefyfa/Build/Intermediates/Karere.build/Debug-iphonesimulator/Karere.build/Objects-normal/x86_64/cservices.o

/Users/TonyMac/sofqi/mega/ios3/iMEGA/Vendor/Karere/src/base/cservices.cpp:6:10: fatal error: 'event2/event.h' file not found
#include <event2/event.h>
         ^
1 error generated.```

Hi, sorry for the late response.

Point the SDK to the last commit in the develop branch 6248db9aee68f3079147b15b3058f97bfc0f807b (meganz/sdk@6248db9)

Then run sh build-all.sh --enable-chat

Download the third party libraries pre-compiled from the following link:

https://mega.nz/#!8U12XQDD!RAjMASSyhXIF5eQGbk3qLEJK9i58cTAZtZEMItynu9g

Then uncompress that file and move the folders include and lib into iMEGA/Vendor/sdk/bindings/ios/3rdparty

screen shot 2017-09-21 at 13 44 20

commented

Hi @jnavarrom
Updating the third party libraries seemed to work, also I had to search and replace group.mega.ios with my own group. identifier in all the project files (e.g. *.m, *.entitlement)