V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
bloodshed
V2EX  ›  iDev

Swift 项目里混编 objective-c, prefixheader 的问题

  •  
  •   bloodshed · 2016-06-07 14:57:46 +08:00 · 2897 次点击
    这是一个创建于 2881 天前的主题,其中的信息可能已经有所发展或是发生改变。

    前辈们
    遇到个 oc 和 swift 的混编的问题 现在新的项目是 swift 的 然后需要引入许多以前的 oc 的文件 以前老的 oc 项目里用了 prefixheader 来引入一些类(比如 logger 的类) 所以不用在每个 oc 的类里单独引入头文件 但是现在 swift 里没有 prefixheader 我自己尝试手动创建 但好像也无效 有什么办法能达到同样的效果吗

    5 条回复    2016-06-07 16:15:37 +08:00
    kkhaike
        1
    kkhaike  
       2016-06-07 15:32:01 +08:00   ❤️ 1
    修改了工程设置吗?还是只增加了 pch 文件?
    zg_gz
        2
    zg_gz  
       2016-06-07 15:34:03 +08:00
    Bridging-Header
    bloodshed
        3
    bloodshed  
    OP
       2016-06-07 15:43:44 +08:00
    @kkhaike 修改了。
    bloodshed
        4
    bloodshed  
    OP
       2016-06-07 15:44:18 +08:00
    @zg_gz 我的情况是想让 swift 项目里的 oc 统一引用另一个 oc
    bloodshed
        5
    bloodshed  
    OP
       2016-06-07 16:15:37 +08:00
    @kkhaike 又排查了一遍, prefixheader 的路径设错了,,,现在可以了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2818 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:12 · PVG 20:12 · LAX 05:12 · JFK 08:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.