Giter Club home page Giter Club logo

Comments (16)

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

Sorry,the document has not been updated, now you do not need to create CocoaMQTT-Bridging-Header.h

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

CocoaPods , Carthage and Manual should done step by step?
I follow CocaPods and Manual, the project will compile failed for "import CocoaAsyncSocket --- no such moudle ’CocoaAsyncSocket ‘

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

Does not need select all, just select one: CocoaPods Carthage or Manual

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

@lsxredrain ,you can recreate a project, just use CocoaPods.

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

follow those step:
$ git init
$git init$ git submodule add https://github.com/emqtt/CocoaMQTT.git
$cd CocacaMQTT
$vi Podfile
$cat Podfileplatform :ios, 9.0
use_frameworks!

pod 'CocoaAsyncSocket'
pod 'MSWeakTimer'
pod 'CocoaMQTT'
$pod install
open CocoaMQTT.xcodeproj
then compile this project in Xcode, it will find three compile error/Users/lsx/workbase/CocoaMQTT/Source/CocoaMQTT.swift:364:27: Expected expression in list
of expressions
/Users/lsx/workbase/CocoaMQTT/Source/CocoaMQTT.swift:364:27: Expected ',' separator/Users/lsx/workbase/CocoaMQTT/Source/CocoaMQTT.swift:10:8: No such module 'CocoaAsyncSocket'

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

just two step:

1.create the Podfile with follow content:

use_frameworks!

pod 'CocoaMQTT' 

2.excude the command:
pod install

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

lsxdeMacBook-Pro:CocaMQTT lsx$ cat Podfile
use_frameworks!
pod 'CocoaMQTT'
lsxdeMacBook-Pro:CocaMQTT lsx$ pod install
CocoaPods 1.0.0.beta.8 is available.
To update use: gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:

xcodeproj 'path/to/Project.xcodeproj'

lsxdeMacBook-Pro:CocaMQTT lsx$ ls
Podfile Pods

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

http://stackoverflow.com/questions/21070977/how-do-i-select-a-project-in-my-podfile-im-getting-the-error-unable-to-find-t

Make sure you are running $pod install from your project directory:

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

lsxdeMacBook-Pro:CocaMQTT lsx$ pwd
/Users/lsx/workbase/CocaMQTT
lsxdeMacBook-Pro:CocaMQTT lsx$ ls
Podfile
lsxdeMacBook-Pro:CocaMQTT lsx$ cat Podfile
platform :ios, 9.0
use_frameworks!
pod 'CocoaMQTT'lsxdeMacBook-Pro:CocaMQTT lsx$ pod install
Updating local specs repositories

CocoaPods 1.0.0.beta.8 is available.
To update use: gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:

xcodeproj 'path/to/Project.xcodeproj'

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024
  1. first, you should create an xcode project
  2. create a Podfile in the project folder
  3. excute command pod install

like my test project:

➜  swifttest ls
Podfile               Pods                  swifttest.xcodeproj
Podfile.lock          swifttest             swifttest.xcworkspace
➜  swifttest 

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

1 create null project as named CocoaHello in Xcode 7.2
2 create Podfile
3 pod install

localhost:CocoaHello lsx$ ls
CocoaHello Podfile uncrustify.cfg
CocoaHello.xcodeproj Podfile.lock
CocoaHello.xcworkspace Pods
localhost:CocoaHello lsx$ cat Podfile
platform :ios, '9.0'
use_frameworks! # Add this if you are targeting iOS 8+ or using Swift
pod 'CocoaMQTT'localhost:CocoaHello lsx$ ls Pods/
CocoaAsyncSocket Local Podspecs Pods.xcodeproj
CocoaMQTT MSWeakTimer Target Support Files
Headers Manifest.lock

4 close CocoaHello.xcodeproj
5 open CocoaHello.xcworkspace ------ not CocoaHello.xcodeproj
still have error
/Users/lsx/github/podtest/Pods/CocoaMQTT/Source/CocoaMQTT.swift:364:27: Expected expression in list of expressions
/Users/lsx/github/podtest/Pods/CocoaMQTT/Source/CocoaMQTT.swift:364:27: Expected ',' separator
/Users/lsx/github/podtest/Pods/CocoaMQTT/Source/CocoaMQTT.swift:361:68: Missing argument for parameter 'selector' in call

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024
//CocoaMQTTReader Delegate

public func didReceiveConnAck(reader: CocoaMQTTReader, connack: UInt8) {
    connState = CocoaMQTTConnState.CONNECTED
    #if DEBUG
    NSLog("CocoaMQTT: CONNACK Received: \(connack)")
    #endif

    let ack = CocoaMQTTConnAck(rawValue: connack)!
    delegate?.mqtt(self, didConnectAck: ack)

    //keep alive
   //begin commit by lsxredrain 2016-4-21,then will compile sucessed
    if ack == CocoaMQTTConnAck.ACCEPT && keepAlive > 0 {
    //    aliveTimer = MSWeakTimer.scheduledTimerWithTimeInterval(ß
     //       NSTimeInterval(keepAlive),
      //      target: self,
       //     selector: #selector(CocoaMQTT._aliveTimerFired),
        //    userInfo: nil,
         //   repeats: true,
           // dispatchQueue: dispatch_get_main_queue())
    }
    //end 
}

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

use the xcode7.3

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

i can't use Xcode 7.3 for my os is 10.10, can u add selector: #selector(CocoaMQTT._aliveTimerFired) for Xcode 7.2?

from cocoamqtt.

CrazyWisdom avatar CrazyWisdom commented on May 18, 2024

you can change selector: #selector(CocoaMQTT._aliveTimerFired)
to selector: "_aliveTimerFired",

from cocoamqtt.

lsxredrain avatar lsxredrain commented on May 18, 2024

ok thanks a lot!
as a newcomer of swift, I should study this article first
http://blog.csdn.net/eqera/article/details/39312125

from cocoamqtt.

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.