Comments (6)
并且没办法在类似pch
文件的地方引入 WCDB.h
from wcdb.
如果一个class引入了WCDB.h
, 并且这个class在所有地方都有用到, 会导致几乎整个app的.m
文件都要改成.mm
??
from wcdb.
xcode对于.mm
文件的自动补全, 语法高亮太差了.
所以改成.mm
之后, WCDB
使用起来特别费劲
from wcdb.
.mm
是对应Objective-C++代码文件后缀- 如果你在源文件里引用WCDB,则只需要将对应源文件的
.m
改为.mm
。 - 如果你在头文件里引用WCDB,则需要将所有引用该头文件的源文件的
.m
改为.mm
。 - 为了最小化你的修改,建议可以在头文件使用
@WCTDatabase
的语法,然后在源文件里再import WCDB。 - 如果你必须在头文件里引用WCDB,建议用脚本批量修改文件名后缀。
- 如果你在源文件里引用WCDB,则只需要将对应源文件的
- Xcode对
.mm
的自动补全和语法高亮也是很好的。但你在刚修改完文件名后缀,可能xcode的索引还没有建完。可以等待其完成后再重启Xcode。如果依然没有高亮,可以删除~/Library/Developer/Xcode/DerivedData
下对应project的数据后再试。
from wcdb.
为了最小化你的修改,建议可以在头文件使用@WCTDatabase的语法,然后在源文件里再import WCDB。
WCTTableCoding.h
WCTCodingMacro.h
这两个文件呢, 不是必须在model的头文件引入的嘛, 其他需要引入该model的, 也都必须改成.mm
呀.
from wcdb.
这个看你代码结构怎么设计,Objective-C++的机制是需要改后缀的。
from wcdb.
Related Issues (20)
- > ![image](https://user-images.githubusercontent.com/5007022/270093463-56885d67-5d82-4d58-84ac-b3d5d49f08b6.png)
- Database close HOT 1
- 关键字查找 HOT 4
- iOS12系列机型,app启动就carsh HOT 2
- new java version... HOT 1
- 什么时候支持arkTs? HOT 2
- Use of undeclared identifier 'WCDB_VERSION_STRING' HOT 1
- Use of undeclared identifier 'WCDB_VERSION_STRING' HOT 2
- 源码引入,release环境报错:umbrella header 'WCDBBridging.h' not found HOT 3
- disk I/O 错误;wal 和 shm文件未回收
- [ERROR] Code:IOError when exec(StatementVacuum().vacuum()) HOT 3
- 求好心人提供一个WCDB.swift的多表查询Demo HOT 1
- wcdbswift left join 如何实现? HOT 1
- WCDB.swift会考虑支持Swift package manager吗? HOT 2
- OC 版本 现在distinct 怎么用? HOT 1
- ThreadLocal crash HOT 4
- 微信的Swift开发 HOT 1
- Pods/WCDB.objc/src/common/core/sqlite/HandleNotification.cpp:247:9: No matching function for call to 'sqlite3_wal_checkpoint_handler' HOT 3
- linker command failed with exit code 1
- Roadmap for Java or Kotlin? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wcdb.