Coder Social home page Coder Social logo

Comments (8)

Kivenhaoyu avatar Kivenhaoyu commented on June 16, 2024

1:First you should write pod "Qiniu", "~> 7.0" to your Podfile,then pod install
2:Actually,Swift project can use the same way to pod Qiniu SDK like objective-c,when you import the SDK,you can use "Bridging Header" to contect the two codes,Here is an example to upload an image named playLogo with Swift

func UpLoad()
{
    var mutable : NSMutableDictionary = NSMutableDictionary()
    let manager = QNUploadManager()
    let imageData = UIImagePNGRepresentation(UIImage(named: "playLogo")!)
    manager .putData(imageData, key: "your key", token: "your token", complete: { (QNResponseInfo, String, resp) -> Void in

        }, option: nil)
}

from objc-sdk.

longbai avatar longbai commented on June 16, 2024

@Kivenhaoyu 👍

from objc-sdk.

xspyhack avatar xspyhack commented on June 16, 2024

Oh my boys, Of course I knew how to use Objective-C in Swift projects. But it does not work.

from objc-sdk.

xspyhack avatar xspyhack commented on June 16, 2024

I can use AFNetworking which is pod with 'Qiniu ~> 7.0'. But there is an error in QiniuSDK in file QNStats.h and others files which imported AFNetworking.

from objc-sdk.

longbai avatar longbai commented on June 16, 2024

Could you give me the sdk version? The latest version has fixed the isssue. Could you give me the demo project, thanks.

from objc-sdk.

xspyhack avatar xspyhack commented on June 16, 2024

Sure, it is the version 7.0.14 that I pod yesterday. You should not import AFNetworking Framework like this but use Cocoapods to import. --By: Kevin

from objc-sdk.

xspyhack avatar xspyhack commented on June 16, 2024

I think it had fixed at 7.0.15

from objc-sdk.

Kivenhaoyu avatar Kivenhaoyu commented on June 16, 2024

what is your pods version? The latest version is 7.0.15

from objc-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.