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

Use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found #237

Closed
bluajack opened this issue Jan 26, 2018 · 15 comments
Labels

Comments

@bluajack
Copy link

bluajack commented Jan 26, 2018

The language of WCDB

Swift

The version of WCDB

v1.0.6

The platform of WCDB

iOS

The installation of WCDB

Cocoapods

What's the issue?

I use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found,When compiling a project, the following error is reported:

Error

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/WCDB.swift-umbrella.h"
        ^
/Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/Target Support Files/WCDB.swift/WCDB.swift-umbrella.h:13:9: note: in file included from /Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/Target Support Files/WCDB.swift/WCDB.swift-umbrella.h:13:
#import "SQLite-Bridging.h"
        ^
/Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/WCDB.swift/swift/source/util/SQLite-Bridging.h:28:9: error: 'sqlcipher/fts3_tokenizer.h' file not found
#import <sqlcipher/fts3_tokenizer.h>
        ^
<unknown>:0: error: could not build Objective-C module 'WCDBSwift'

I tried many times the following operation, still can not solve the problem

pod cache clean WCDB --all
rm -rf ~/Library/Caches/CocoaPods
pod repo update

Project dependencies are as follows

2018-01-26 6 53 15

2018-01-26 6 53 52

2018-01-26 6 54 09

By the way,LoginRegisterModule introduced WCDB.swift compiled alone is no problem

@bluajack bluajack changed the title 利用cocoapods建立数据持久化模块并引用WCDB.swfit(cocoapods方式),并在其他项目引入数据持久化模块,会报'sqlcipher/fts3_tokenizer.h' file not found Use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found Jan 26, 2018
@RingoD
Copy link
Collaborator

RingoD commented Jan 27, 2018

Are you intergrating WCDB into your app by pod or into your framework by podspec?

@bluajack
Copy link
Author

My component is as follows

2018-01-27 10 31 28

2018-01-27 10 31 57

2018-01-27 10 32 19

I think I know what is the reason

2018-01-27 10 33 07

When I did the following operation on the project compiled successfully

2018-01-27 10 33 44

But every time after the project pod install again Preprocessor Macros will be reset, what is your solution?

@RingoD
Copy link
Collaborator

RingoD commented Jan 27, 2018

I know what your problem is now.
Could you please give me a sample project which can reproduce this?

@bluajack
Copy link
Author

bluajack commented Jan 27, 2018

https://github.com/ExamplesWCDB

By the way, LoginRegisterModule submitted to the private repository will fail, because wcdb header file error

@RingoD
Copy link
Collaborator

RingoD commented Jan 31, 2018

Which version of cocoapods is ?

@bluajack
Copy link
Author

bluajack commented Feb 3, 2018

COCOAPODS: 1.3.1

@RingoD
Copy link
Collaborator

RingoD commented Feb 3, 2018

It seems that it will be fixed by upgrading to Cocoapods 1.4.0.
Maybe you can have a try.

@bluajack
Copy link
Author

bluajack commented Feb 4, 2018

It still does not work

@niyaoyao
Copy link

@bluajack Have you solved your problem? I have the same issue and I don't know how to solve it. @RingoD

@RingoD
Copy link
Collaborator

RingoD commented Feb 28, 2018

@niyaoyao I had received many of the same issues about it and most of them solved this problem by cleaning the pod cache.

pod cache clean WCDB --all
rm -rf ~/Library/Caches/CocoaPods
pod repo update

So I think it could be the problem of Cocoapods.

@bluajack
Copy link
Author

bluajack commented Feb 28, 2018

@niyaoyao

s.xcconfig = {
      "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) WCDB_BUILTIN_SQLCIPHER WCDB_COCOAPODS",
  }

You can add this in the podspec file that reports the wrong project,But it is only a temporary solution!

@niyaoyao
Copy link

@RingoD I have tried, however it didn't work. So I try to use carthage to install~ It works~~
@bluajack I would have a try later. Thank you~

@hcxyzlm
Copy link

hcxyzlm commented Aug 1, 2018

我目前也遇到这个问题。用pod私有库数据持久化模块并引用WCDB.swfit(cocoapods方式),会报
image
image
我的demo地址为https://github.com/hcxyzlm/PrivatePod_WCDB

@karise-guo
Copy link

@bluajack it works for me, thank you!

@stale
Copy link

stale bot commented Sep 20, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 20, 2018
@stale stale bot closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants