Facebook-iOS-SDK: How to correct build framework and add it to project?

元气小坏坏 提交于 2019-12-05 18:35:55

So, after a long time i make such things to make this FacebookSDK work:

1)First, I delete build of FacebookSDK framework (rm -rf) and run script for building framework (build_framework.sh)

2)After that, i add to project (project -> build phases -> link binary with libraries ) FacebookSDK.framework (from local directory, with button add other) and libsqlite3.0dylib and libsqlite3.dylib (just search it in search-field!)

0) or 3)And After that i make this: find directory ~/Library/Developer/Xcode/DerivedData and delete EVERYTHING from this. (use command rm -rf dir_name/*)

You can do it from step 3) that i also named step 0).

Here i provide a script, which can help you

#!/usr/bin/perl
my $pathToCacheDirectory = qq(~/Library/Developer/Xcode/DerivedData/);

sub TaskToDo{
    my ($refToArgv)=@_;
    die "can't work with too much parameters" unless(scalar(@$refToArgv)==1);
    my $what = shift @$refToArgv;
    my $time = 30; #wait 30 seconds in each iteration
    my $workRef = sub{
        print "i will delete: ";
        print qx(ls $pathToCacheDirectory);
    qx(rm -rf $pathToCacheDirectory);
    };
    #view help
    if ($what eq 'help'){
        print qx(perldoc -t $0);
    }
    #list directory 
    if ($what eq 'watch'){
    print qx(ls $pathToCacheDirectory);
    }
    #kill files instantly
    if ($what eq 'now'){
    print 'kill now'.qq(\n);
    $workRef->();
    print 'see result'.qq(\n);
    print qx(ls $pathToCacheDirectory);
    }
    #switch on watcher
    if ($what eq 'work'){
    for(;;){
        #in INF loop
        for my $s(0..4){
        #print "this is <<$_>>\n";
        print "time remaining: ".(5-$s)*$time." sec \n";
        sleep($time);
        }
        $workRef->();    
        sleep(10);
    }
    }
} 

TaskToDo(\@ARGV);



__END__

=head1 DESCRIPTION

This script clear directory with cache from Xcode

    -- 'help'  will show this log

    -- 'work'  will run script as observer and killer

    -- 'watch' will show info about directory with cache

    -- 'now'   will kill all instantly

    Example: perl scriptName.pl help

=cut

The solution I found was to go to the Target Info and delete the Framework search path that XCode created. Then everything compiled correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!