JWT: Manual installed JWT lib breaks application during RSA signed jwt verification

New Issue Checklist

Issue Info

Info Value
Platform Name ios
Platform Version 10
CocoaLumberjack Version none
Integration Method manually
Xcode Version Xcode 8
Repro rate all the time (100%)

Issue Description and Steps

I am using 3.0.0-beta4 library version. My application demands to install JWT manually, so what i did:

  • I copied Core directory of library into Libraries/JWT directory of my project
  • Then I remove any ‘JWT/’ prefixes from any of import statements in Core files, because compilator could not find any JWT/JWT.h files for some reason.
  • Then I add code sample from #141 and run application.

My application breaks every time with EXC_BAD_ACCESS, when JWT library calls SecTrustCreateWithCertificates() method.

When i install JWT via cocoa pod such problem absents. I looked at #129, #127, #135, but i found nothing helpful for me with that. Obviously, i did something wrong with manual installation of library. Please, could somebody help me to make it properly?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15

Most upvoted comments

@ruslan-bikkinin your approach assume that source code uses ‘as-is’ without additional libraries or frameworks.

Statement

#import <JWT/JWT.h>

Means that you would like to search for target named JWT with JWT.h umbrella header.

Statement

#import "JWT.h"

Means that you would like to search in user space ( in project space, as you wish ) or in main target space.

So, it is correct that in your case import statement could not find any headers in JWT target.

For simplicity and against error-rising approach, you could add JWT repository as submodule.

  1. Add repository as submodule to your project.
  2. Add JWT.xcodeproj to your project ( or create xcworkspace for that reason )
  3. Add dependency for your library ( JWT.xcodeproj has static library for this case )
  4. Have fun!