swift - 使用未声明的标识符“_AppsFlyerdelegate”
问题描述
我不是 iOS 开发人员,而是了解一点 iOS,我被困在 iOS 的原生端
所以我在iOS上遇到了这个问题
我正在尝试这个建议的答案
在这里他说要添加这个,所以我做了
// AppsFlyer init here...
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
[AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY"; // HACK: iOS SDK is faster than RN plugin
但我开始收到这些错误
Use of undeclared identifier '_AppsFlyerdelegate'
所以我去了我的 pod 文件并添加了这个(不确定这个 sis 是否正确)
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'AppsFlyerFramework'
是否安装了 pod,再次运行命令但错误没有消失?知道我做错了什么吗?
也(不重要)但有人可以简要解释一下这段代码
if(_AppsFlyerdelegate == nil){
_AppsFlyerdelegate = [[RNAppsFlyer alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
[AppsFlyerLib shared].appsFlyerDevKey = @"YOUR_APPSFLYER_DEV_KEY"; // HACK: iOS SDK is faster than RN plugin
// React Native Bridge and Root View init here...
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc]
initWithBridge:bridge
moduleName:@"FiftyViewsUnderTheAppiumSea"
initialProperties:nil
];
解决方案
推荐阅读
- python - 打印类的结果 - python 2.7
- c# - 如何通过 azure relay C# 发送 prem wcf https 服务的基本身份验证凭据?
- python - 在for循环中定义可变列数
- python - SyntaxError:关键字不能是表达式(将行与表达式匹配)
- python - 将光标的焦点设置回 Python
- python - Z3Prover 中的女士或老虎问题
- installation - 哪个 protobuf 版本与 caffe 一起使用?
- graphics - 球对球碰撞解决方案
- javascript - 光标位于带有 React 的自动聚焦文本区域的开头
- c# - 使用反序列化 XML 文件中的多字段 List<> 填充第二个单字段列表 (Xamarin)