これをセットアップしようとすると、リンカー エラーが発生し続けます。アプリのデリゲートでこれを使用してすべてを構成しています
- (void) configureBump {
[BumpClient configureWithAPIKey:@"your_api_key" andUserID:[[UIDevice currentDevice] name]];
[[BumpClient sharedClient] setMatchBlock:^(BumpChannelID channel) {
NSLog(@"Matched with user: %@", [[BumpClient sharedClient] userIDForChannel:channel]);
[[BumpClient sharedClient] confirmMatch:YES onChannel:channel];
}];
[[BumpClient sharedClient] setChannelConfirmedBlock:^(BumpChannelID channel) {
NSLog(@"Channel with %@ confirmed.", [[BumpClient sharedClient] userIDForChannel:channel]);
[[BumpClient sharedClient] sendData:[[NSString stringWithFormat:@"Hello, world!"] dataUsingEncoding:NSUTF8StringEncoding]
toChannel:channel];
}];
[[BumpClient sharedClient] setDataReceivedBlock:^(BumpChannelID channel, NSData *data) {
NSLog(@"Data received from %@: %@",
[[BumpClient sharedClient] userIDForChannel:channel],
[NSString stringWithCString:[data bytes] encoding:NSUTF8StringEncoding]);
}];
[[BumpClient sharedClient] setConnectionStateChangedBlock:^(BOOL connected) {
if (connected) {
NSLog(@"Bump connected...");
} else {
NSLog(@"Bump disconnected...");
}
}];
[[BumpClient sharedClient] setBumpEventBlock:^(bump_event event) {
switch(event) {
case BUMP_EVENT_BUMP:
NSLog(@"Bump detected.");
break;
case BUMP_EVENT_NO_MATCH:
NSLog(@"No match.");
break;
}
}];
}
私が得るエラーは次のとおりです。
Undefined symbols for architecture i386:
"_CFHostCreateWithName", referenced from:
-[BumpClient ipStringForHost] in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_CFHostStartInfoResolution", referenced from:
-[BumpClient ipStringForHost] in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_CFHostGetAddressing", referenced from:
-[BumpClient ipStringForHost] in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_CFHostGetNames", referenced from:
-[BumpClient ipStringForHost] in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_OBJC_CLASS_$_CLLocationManager", referenced from:
objc-class-ref in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_kCLLocationAccuracyBest", referenced from:
-[BumpClient init] in libBump.a(BumpClient-4A2ADD525826BE6B.o)
"_AudioServicesCreateSystemSoundID", referenced from:
-[BumpDetector init] in libBump.a(BumpDetector.o)
"_AudioServicesPlaySystemSound", referenced from:
-[BumpDetector init] in libBump.a(BumpDetector.o)
-[BumpDetector playBumpSound] in libBump.a(BumpDetector.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
libBump.a と BumpClient.H があり、リンクされているフレームワークを確認すると、libBump が含まれています