小编Har*_*ari的帖子

在通过cocoapods更新KIF框架后运行以及测试Xcode工作区时出现链接器错误

我有一个Xcode工作区,我已经更新到KIF 2.0(在podfile中通过终端和pod'bIF'进行pod更新)之后我按照https://github.com/kif-中提供的说明配置了工作区.framework/KIF#configure-the-testing-target(使用Cocoapods部分安装).但是当我尝试执行项目以及运行我的测试目标时,它会抛出错误,

ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我还检查了以下链接:https://groups.google.com/forum/#!msg/kif-framework/EilvCp2psZA/huUQ3sGpmwQJ.但问题仍然存在.

我该如何纠正?屏幕截图如下.在此输入图像描述

当我尝试使用iPhone 5运行它时,它显示5个链接器错误,例如

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7s in file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit (2 slices)
Undefined symbols for architecture armv7s:
  "_OBJC_METACLASS_$_SenTestCase", referenced from:
      _OBJC_METACLASS_$_KIFTestCase in libPods.a(KIFTestCase.o)
  "_OBJC_CLASS_$_SenTestCase", referenced from:
      _OBJC_CLASS_$_KIFTestCase in libPods.a(KIFTestCase.o) …
Run Code Online (Sandbox Code Playgroud)

kif-framework cocoapods kif ios7 xcode5

5
推荐指数
1
解决办法
7611
查看次数

iOS中的FacebookSDK不显示关闭按钮且无法关闭

嗨我已经为iOS 6应用程序集成了Facebook SDK.Facebook身份验证和共享工作完美,但没有关闭FB Dialogue box.ie的条款.当FB Dialogue框打开时,它将在认证成功后关闭.没有提供关闭或导航回来.如何创建一个关闭按钮.我正在使用的代码片段如下所示.谢谢提前.

-(NSDictionary *)shareFacebook
{

    NSDictionary *userInfo;
    if (FBSession.activeSession.isOpen)
    {

        if (FBSession.activeSession.isOpen)
        {

            [self.closeButton setHidden:NO];
            [FBRequestConnection startForMeWithCompletionHandler:^(FBRequestConnection *connection, id<FBGraphUser> user, NSError *error) {

                NSUserDefaults *standardUserDefaults=[NSUserDefaults standardUserDefaults];
                [standardUserDefaults setObject:user forKey:@"fbUserInfo"];



                    [self.manager authenticateUserUsingFB:[user objectForKey:@"email"]];


            }];
        }

    }
    else{
        NSLog(@"fb session not active.");
        [self openSessionWithAllowLoginUI:YES];
    }
    return userInfo;
}

- (void)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {

    NSArray *permissions = [[NSArray alloc] initWithObjects:

                            @"user_photos",
                            @"publish_actions",
                            @"read_stream",
                            @"friends_photos",
                            @"email" ,nil];

    [FBSession setActiveSession:[[FBSession alloc] initWithPermissions:permissions]];


    [[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView

                              completionHandler:^(FBSession *session,

                                                  FBSessionState state,

                                                  NSError *error) {

                                  NSLog(@" …
Run Code Online (Sandbox Code Playgroud)

facebook objective-c facebook-graph-api ios5 ios6

2
推荐指数
1
解决办法
1410
查看次数