Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 尝试将Linkedin SDK集成到我的Swift项目时出错_Ios_Swift_Xcode_Podfile_Objc Bridging Header - Fatal编程技术网

Ios 尝试将Linkedin SDK集成到我的Swift项目时出错

Ios 尝试将Linkedin SDK集成到我的Swift项目时出错,ios,swift,xcode,podfile,objc-bridging-header,Ios,Swift,Xcode,Podfile,Objc Bridging Header,我正在尝试将Linkedin SDK集成到我的Swift项目中。我正在使用,这是我得到的错误 使用未解析的标识符“LinkedinSwiftHelper” 我的播客文件: let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "myclientid", clientSecret: "myclientsecret", state: "mystate", permiss

我正在尝试将Linkedin SDK集成到我的Swift项目中。我正在使用,这是我得到的错误

使用未解析的标识符“LinkedinSwiftHelper”

我的播客文件:

let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "myclientid", clientSecret: "myclientsecret", state: "mystate", permissions: ["r_basicprofile", "r_emailaddress"]))
#ifndef ObjectiveCHeader_h
#define ObjectiveCHeader_h

#import <LinkedinSwift/LSHeader.h> // this will use both for POD and import framework.


#endif /* ObjectiveCHeader_h */
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>linkedin.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>
<key>LIAppId</key>
<string>4594413</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>li4594413</string>
        </array>
    </dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>linkedin</string>
    <string>linkedin-sdk2</string>
    <string>linkedin-sdk</string>
</array>
使用你的框架

目标“工作奖励”是什么 pod‘LinkedinSwift’,“~>1.6.5”

结束

这是我得到错误的那一行,我是在我的视图控制器的类声明之后声明的:

let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "myclientid", clientSecret: "myclientsecret", state: "mystate", permissions: ["r_basicprofile", "r_emailaddress"]))
#ifndef ObjectiveCHeader_h
#define ObjectiveCHeader_h

#import <LinkedinSwift/LSHeader.h> // this will use both for POD and import framework.


#endif /* ObjectiveCHeader_h */
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>linkedin.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>
<key>LIAppId</key>
<string>4594413</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>li4594413</string>
        </array>
    </dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>linkedin</string>
    <string>linkedin-sdk2</string>
    <string>linkedin-sdk</string>
</array>
我的桥接头:

let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "myclientid", clientSecret: "myclientsecret", state: "mystate", permissions: ["r_basicprofile", "r_emailaddress"]))
#ifndef ObjectiveCHeader_h
#define ObjectiveCHeader_h

#import <LinkedinSwift/LSHeader.h> // this will use both for POD and import framework.


#endif /* ObjectiveCHeader_h */
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>linkedin.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>
<key>LIAppId</key>
<string>4594413</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>li4594413</string>
        </array>
    </dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>linkedin</string>
    <string>linkedin-sdk2</string>
    <string>linkedin-sdk</string>
</array>

提前感谢您的帮助,我已经为此挣扎了两天。

在使用可可豆时,您不应该需要桥接头。是否在包含该viewcontroller的Swift文件中导入LinkedInSwift?对我来说,这是没有问题的

import UIKit
import LinkedinSwift

class ViewController: UIViewController {

    let linkedinHelper = LinkedinSwiftHelper()

}

没问题。如果桥接头是您使用它的唯一目的,那么您可能希望删除该桥接头。