我一直遵循实现此 SDK 的说明:https://github.com/BranchMetrics/Branch-iOS-Invite-SDK ...下面是我的 Podfile 中的内容:
platform :ios, '8.0'
use_frameworks!
target 'My-App' do
pod 'BranchInvite'
end
这是我遇到的错误...
我已经做了很多故障排除来尝试找出问题,查看了此类存储库的过去问题,并且由于某种原因我无法识别/导入“BranchWelcomeViewController”(也不是 BranchInvite)。知道我在这里做错了什么吗?我需要填充我的桥接头吗?
PS:我使用的是 Xcode 7、Swift 2、OS X 10.10.5 和最新版本的 Cocoapods。
谢谢
最佳答案
@SamYoungNY,使用您发送过来的项目进行调试后,使用 Swift 的最佳方法似乎如下:
Podfile
pod "Branch"
pod "BranchInvite"
您应用的桥接 header
#import <Branch/Branch.h>
#import <BranchInvite/BranchInvite.h>
#import <BranchInvite/BranchInviteViewController.h>
#import <BranchInvite/BranchInviteTextContactProvider.h>
#import <BranchInvite/BranchInviteEmailContactProvider.h>
#import <BranchInvite/BranchWelcomeView.h>
#import <BranchInvite/BranchWelcomeViewController.h>
#import <BranchInvite/BranchWelcomeControllerDelegate.h>
#import <BranchInvite/BranchWelcomeDefaultView.h>
如果您之前没有使用过,请务必使用项目的 .xcworkspace
文件。如果这不起作用,请告诉我们。我很高兴继续使用您发送过来的实际项目进行调试。
关于ios - swift 'Could not build Obj-C module ' 分支邀请',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33218117/