Skip to content

Commit

Permalink
Hotfix for Themis CocoaPods podspec: support Xcode12 (cossacklabs#719)
Browse files Browse the repository at this point in the history
* update podspec to fix builds on xcode12

* ok, use 0.13.2 as podspec version

* set ios deployment target to 10.0 for cocoapods projects

* update themis podspec for 0.13.3 tag
  • Loading branch information
vixentael committed Oct 12, 2020
1 parent f6a755c commit 7472f22
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 14 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@

Changes that are currently in development and have not been released yet.


## [0.13.3](https://github.com/cossacklabs/themis/releases/tag/0.13.3), October 12th 2020

**Hotfix for Themis CocoaPods and Xcode12:**

- Default Themis podspec is using OpenSSL 1.0.2u again ("themis/themis-openssl"). OpenSSL 1.1.1g podspec ("themis/openssl") might be broken for Xcode12, fixing is in progress. BoringSSL podspec ("themis/themis-boringssl") is available too.

_Code:_

- **Objective-C / Swift**

- Themis CocoaPods podspec is updated with bitcode fixes and disabling arm64 simulator in order to support Xcode12 builds. This is a podspec change only, no changes in code, headers or whatsoever. Default podspec is set as "themis/themis-openssl", which uses OpenSSL 1.0.2u. Fixes for "themis/openssl" podspec (OpenSSL 1.1.1g) might arrive soon.



## [0.13.2](https://github.com/cossacklabs/themis/releases/tag/0.13.2), August 14th 2020

**Breaking changes and deprecations:**
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Themis-server/Obj-C/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
platform :ios, '10.0'
project 'WorkingWithThemisServer/WorkingWithThemisServer.xcodeproj'
inhibit_all_warnings!
use_frameworks!
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Themis-server/swift/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
platform :ios, '10.0'
project 'SwiftThemisServerExample/SwiftThemisServerExample.xcodeproj'
inhibit_all_warnings!
use_frameworks!
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/objc/iOS-CocoaPods/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
platform :ios, '10.0'
project 'ThemisTest/ThemisTest.xcodeproj'
inhibit_all_warnings!
use_frameworks!
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/swift/iOS-CocoaPods/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
platform :ios, '10.0'
project 'ThemisSwift/ThemisSwift.xcodeproj'
inhibit_all_warnings!
use_frameworks!
Expand Down
5 changes: 4 additions & 1 deletion tests/objcthemis/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
platform :ios, '10.0'
inhibit_all_warnings!

target "objthemis" do
Expand All @@ -26,6 +26,9 @@ target "objthemis" do

end

#TODO: add tests for openssl1.1.1 target?


target "objthemis_boring" do

# example should work with head
Expand Down
37 changes: 28 additions & 9 deletions themis.podspec
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
Pod::Spec.new do |s|
s.name = "themis"
s.version = "0.13.1"
s.version = "0.13.3"
s.summary = "Data security library for network communication and data storage for iOS and mac OS"
s.description = "Themis is a convenient cryptographic library for data protection. It provides secure messaging with forward secrecy and secure data storage. Themis is aimed at modern development practices and has a unified API across 12 platforms, including iOS/macOS, Ruby, JavaScript, Python, and Java/Android."
s.homepage = "https://cossacklabs.com"
s.license = { :type => 'Apache 2.0'}

s.source = { :git => "https://github.com/cossacklabs/themis.git", :tag => "#{s.version}" }

s.author = {'cossacklabs' => 'info@cossacklabs.com'}

s.module_name = 'themis'
s.default_subspec = 'openssl-1.1.1'
s.default_subspec = 'themis-openssl'

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.11'
s.ios.frameworks = 'UIKit', 'Foundation'

# TODO(ilammy, 2020-03-02): resolve "pod spec lint" warnings due to dependencies
# If you update dependencies, please check whether we can remove "--allow-warnings"
# from podspec validation in .github/workflows/test-objc.yaml

# TODO(vixentael, 11 oct 2020): as xcode12 introduces new arm64 architecture, our own openssl framework doesn't work yet
# Change openssl-1.1.1 to default when fix our openssl
# This variant uses the current stable, non-legacy version of OpenSSL.
s.subspec 'openssl-1.1.1' do |so|
# OpenSSL 1.1.1g
Expand Down Expand Up @@ -77,17 +80,33 @@ Pod::Spec.new do |s|

# use `themis/themis-openssl` as separate target to use Themis with OpenSSL
s.subspec 'themis-openssl' do |so|
# Enable bitcode for openssl only, unfortunately boringssl with bitcode not available at the moment
so.ios.pod_target_xcconfig = {'ENABLE_BITCODE' => 'YES' }

# Enable bitcode for OpenSSL in a very specific way, but it works, thanks to @deszip
#so.ios.pod_target_xcconfig = {'ENABLE_BITCODE' => 'YES' }
so.ios.pod_target_xcconfig = {
'OTHER_CFLAGS[config=Debug]' => '$(inherited) -fembed-bitcode-marker',
'OTHER_CFLAGS[config=Release]' => '$(inherited) -fembed-bitcode',
'BITCODE_GENERATION_MODE[config=Release]' => 'bitcode',
'BITCODE_GENERATION_MODE[config=Debug]' => 'bitcode-marker'
}

# Xcode12, arm64 simulator issues https://stackoverflow.com/a/63955114
# disable building for arm64 simulator for now

so.ios.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
so.ios.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }


# TODO: due to error in symbols in GRKOpenSSLFramework 219 release, we've manually switched to 218
# which doesn't sound like a good decision, so when GRKOpenSSLFramework will be updated –
# please bring back correct dependency version
# https://github.com/cossacklabs/themis/issues/538
# 26 sept 2019
#so.dependency 'GRKOpenSSLFramework', '~> 1.0.1' # <-- this is good
# 11 oct 2020 update: trying 1.0.2.20, but it also gives linking errors, so postponed
# https://github.com/levigroker/GRKOpenSSLFramework/issues/10
#so.dependency 'GRKOpenSSLFramework', '1.0.2.20' # 1.0.2u, latest in 1.0.2 branch

so.dependency 'GRKOpenSSLFramework', '1.0.2.18' # <-- this is bad and temp
so.dependency 'GRKOpenSSLFramework', '1.0.2.18' # <-- this is temp


so.ios.xcconfig = { 'OTHER_CFLAGS' => '-DLIBRESSL', 'USE_HEADERMAP' => 'NO',
Expand Down Expand Up @@ -146,4 +165,4 @@ Pod::Spec.new do |s|
ss.dependency 'themis/themis-boringssl/core'
end
end
end
end

0 comments on commit 7472f22

Please sign in to comment.