Facebook SDK を使用してユーザーのプロファイル データを迅速に取得していますが、FBRequestConnection.startWithGraphPath:completionHandler: を呼び出すと迅速にクラッシュします。
ログの関連部分だと思うものを残します
1. While type-checking 'profile' at /Users/fratelli/Documents/Projects/Wink/Wink/OAuthFacebookSession.swift:118:14
2. While type-checking expression at [/Users/fratelli/Documents/Projects/Wink/Wink/OAuthFacebookSession.swift:139:9 - line:142:9] RangeText="FBRequestConnection.startWithGraphPath(
self.readPermissions(),
completionHandler: completionHandler
)"
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
Command /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254
私はすでにバグレポートを記入しました。現在、Objective-c を使用する以外に、これを回避する方法はありません。私が知りたいのは、同じ効果を達成するために試すことができる他の FB SDK メソッドがあるかどうかです。
コードは次のとおりです。
var completionHandler = {
connection, result, error in
} as FBSessionStateHandler;
// Request the profile info
FBRequestConnection.startWithGraphPath(
"me?fields=birthday,gender,first_name,last_name,name_format,picture",
completionHandler: completionHandler
);