【发布时间】:2018-06-20 14:01:20
【问题描述】:
我在将 Branch 集成到我的应用时遇到错误。在我的AppDelegate 的didFinishLaunchingWithOptions 中,我检查:Branch.getInstance().validateSDKIntegration()
我收到了这个错误:
团队 ID 不匹配:'xxxx'
所以我进入Branch+Validator.m 来检查我收到此错误的原因,我发现虽然从服务器获取的所有数据都是正确的,但我在这一行遇到了这个问题:
NSString *clientTeamId = [BNCSystemObserver getTeamIdentifier];
更多信息:
+ (NSString *)getTeamIdentifier {
NSString *teamWithDot = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"AppIdentifierPrefix"];
if (teamWithDot.length) {
return [teamWithDot substringToIndex:([teamWithDot length] - 1)];
}
return nil;
}
这就是我收到此错误的地方,因为 teamWithDot 在这里为零。后来:
if ([serverTeamId isEqualToString:clientTeamId]) {
alertString = [alertString stringByAppendingFormat:@"%@Team ID matches:\n\t'%@'\n",
kPassMark, serverTeamId];
} else {
testsFailed = YES;
alertString = [alertString stringByAppendingFormat:@"%@Team ID mismatch:\n\t'%@'\n",
kFailMark, serverTeamId];
}
我不知道为什么 clientTeamId 在这里为零,而且我以前从未遇到过这个问题。
有什么想法吗?
【问题讨论】:
标签: ios objective-c branch.io