DimensionDev / DMSOpenPGP

Swift wrapper for Bouncy Castle OpenPGP
GNU Affero General Public License v3.0
6 stars 0 forks source link

Installing DMSOpenPGP #5

Open glinares1408 opened 4 years ago

glinares1408 commented 4 years ago

Hi,

Thanks for your incredible job building this library.

I created a new project and added Podfile like this:

platform :ios, '13.0'

target 'TESTPGP' do

use_frameworks!

pod 'DMSOpenPGP'

end

Then I have tried to run the project but this issue appears:

Screen Shot 2020-01-02 at 6 38 23 PM

Could you tell me how can I fix this please?

Xcode: 11.3 Pods version: 1.8.4

Thanks for your time.

Best regards.

MainasuK commented 4 years ago

The CocoaPods do not install the BouncyCastle_ObjC module correctly. Please check BouncyCastle-ObjC readme page to meet the JDK requirements.

And please check the scripts. Run pod with --verbose to see what's going wrong.

AntonMitrofanov commented 4 years ago

Hello, thanks for you job!

I ran into the same issue as @glinares1408 had. I looked through BouncyCastle_ObjC requirements, installed needed JDK, but error doesn't go away. Please, could you provide short step by step solution for the problem. Maybe I'm doing something wrong.

Thanks for your time.

Best regards.

MainasuK commented 4 years ago
$ brew cask install adoptopenjdk8
$ echo export JAVA_HOME=$(/usr/libexec/java_home -v"1.8") >> ~/.zshrc
$ source ~/.zshrc
$ cat ~/.zshrc
> export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
$ java -version
> openjdk version "1.8.0_242"
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

$ sudo gem install cocoapods-clean
$ pod --version
> 1.9.1
$ xcodebuild -version 
> Xcode 11.4
> Build version 11E146

$ git clone https://github.com/DimensionDev/DMSOpenPGP.git
$ cd DMSOpenPGP/Example/
$ pod repo update
$ pod clean     # always clean install until build without error
$ pod install --verbose

Tip: You can download J2ObjC and check the scripts under ./Pods/BouncyCastle-ObjC/BouncyCastle-ObjC/Scripts/. Run the scripts manually to see what's going wrong until the ./Pods/BouncyCastle-ObjC/BouncyCastle-ObjC/Classes/ have generated classes.

Basically the J2ObjC related issue cause builds failure. And run the generate.sh with set -ev could make the procedure more clear.

J2ObjC-2.4: https://github.com/google/j2objc/releases/download/2.4/j2objc-2.4.zip

AntonMitrofanov commented 4 years ago

Thanks a lot, wish all the best for you!

fabian1122 commented 3 years ago

Hi everyone

I would like to know if there is any way to download the compilation version of the library? I need to use from version 10 iOS

I appreciate your help

MainasuK commented 3 years ago

Hi everyone

I would like to know if there is any way to download the compilation version of the library? I need to use from version 10 iOS

I appreciate your help

We provide CocoaPods distribution for now. The source code is compatible with iOS 8+ (I believe). If you need the iOS 10 building. Fork this repo. Change deployment_target in the DMSOpenPGP.podspec:

s.ios.deployment_target = '10.0' 

And update s.source with other meta Infos to your repo. Finally, manually specific the pod path like this.

Just remind: the iOS 10 is a 4 years old OS. That's safe to drop that if you start an app from scratch.