Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dynamic libraries #170

Open
sust86 opened this issue Jan 5, 2016 · 8 comments
Open

Support dynamic libraries #170

sust86 opened this issue Jan 5, 2016 · 8 comments

Comments

@sust86
Copy link

sust86 commented Jan 5, 2016

For receipt verification it's required to add 'RMStore/AppReceiptVerificator' pod. This requires OpenSSL and will automatically add OpenSSL as a pod. The OpenSSL library RMStoreVerifcation depends on doesn't work as dynamic library. Adding use_frameworks! in the Podfile will result in an error:

[!] The 'Pods-appname' target has transitive dependencies that include static binaries: (/Users/user/Development/appname.ios/Pods/OpenSSL/lib/libcrypto.a and /Users/user/Development/appname.ios/Pods/OpenSSL/lib/libssl.a)

I switched to OpenSSL-Universal (https://github.com/krzyzanowskim/OpenSSL) which works when using dynamic libraries.

Can we update RMStores podspec file to use OpenSSL-Universal instead of OpenSSL ?

@sust86
Copy link
Author

sust86 commented Jan 5, 2016

I'm not 100% sure what the issue here is. I tried to use a local RMStore podspec where I tried to use OpenSSL-Universal. I'll receive the same static binary error.
However, removing the dependency and adding the OpenSSL library explicitly in my pods will work.

@tschmitz
Copy link

I'm running into the same problem. @sust86 How did you work around this?

@sust86
Copy link
Author

sust86 commented Feb 15, 2016

Unfortunately I don't have a nice solution but I found a way to use the ReceiptVerificator with dynamic libraries for now.
I'm no longer including RMStore/AppReceiptVerificator in my pods. Instead I'm including OpenSSL explicitly in my Pods and adding the AppReceiptVerificator part manually to my project. (I'm still using RMStore via pods)

@philwebster
Copy link

I got this working by using OpenSSL-iOS and changing the subspec for AppReceiptVerificator to this:

  s.subspec 'AppReceiptVerificator' do |arv|
    arv.dependency 'RMStore/Core'
    arv.platform = :ios, '7.0'
    arv.source_files = 'RMStore/Optional/RMStoreAppReceiptVerificator.{h,m}', 'RMStore/Optional/RMAppReceipt.{h,m}'
    arv.dependency 'OpenSSL-iOS'

    arv.vendored_libraries = '${PODS_ROOT}/OpenSSL-iOS/libcrypto.a', '${PODS_ROOT}/OpenSSL-iOS/libssl.a'
    arv.libraries = 'ssl', 'crypto'
    arv.xcconfig = { 'HEADER_SEARCH_PATHS' => "${PODS_ROOT}/OpenSSL-iOS/openssl/**", 'LIBRARY_SEARCH_PATHS' => "${PODS_ROOT}/OpenSSL-iOS/" }
  end

However, I'm not sure this is the right approach. Any guidance is welcome.

tschmitz added a commit to tschmitz/RMStore that referenced this issue Feb 24, 2016
Updated OpenSSL dependency in AppReceiptVerificator to support dynamic frameworks in Swift. Based on the issue here: robotmedia#170 (comment)
@scottfister
Copy link

Would love a proper fix to this, it's blocking us from being able to change to use_frameworks! for Swift code :)

@bb-git
Copy link

bb-git commented May 24, 2016

subscribing

@Sjoerdjanssenen
Copy link

Any updates on this?

@Pwyll28
Copy link

Pwyll28 commented Jul 25, 2017

Still no update ?

everappz added a commit to everappz/RMStore that referenced this issue Mar 24, 2024
Updated OpenSSL dependency in AppReceiptVerificator to support dynamic frameworks in Swift. Based on the issue here: robotmedia#170 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants