ursachec / CPAProxy

A thin Objective-C wrapper around Tor.
Other
160 stars 49 forks source link

Xcode 7 Bitcode support #24

Open chrisballinger opened 9 years ago

chrisballinger commented 9 years ago

We need to add a flag -fembed-bitcode when building with Xcode 7.

Tuzr commented 8 years ago

@chrisballinger Excuse me, may I know where did you add the flag? In the Xcode ? I had got the error in below ld: '.../Tor/lib/libtor.a(main.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) Do you have this problem? Thanks !

rainwolf commented 8 years ago

Or build without bitcode? I use the following snippet in my Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
Tuzr commented 8 years ago

@rainwolf Thanks! Finally, I modify the script (build-libssl.sh, build-libevent.sh, build-tor.sh) to compile with bitcode enable, and it works ! I add this parameter at CFLAGS and CPPFLAGS "-isystem ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk/usr/include -fembed-bitcode"

And if the arch is i386 / x86_64(Simulator), it doesn't contain Bitcode. So it doesn't need add the parameter that just mentioned.

cdotindia commented 6 years ago

@Tuzr Can you share the script files with the changes? Since I'm using Cocoapods to install this library in iOS project how will I manage to add these script files while installing CPAProxy from this github repo.