Git Product home page Git Product logo

blueswift's Introduction

netguru gem

Gem designed to:

  • help generating new project
  • take the load of config/deploy.rb

tasks

netguru:tag_release

Tags releases with a timestamp and environment, e.g. 201205161559-production

Usage: after('deploy:update_code', 'netguru:tag_release')

(this is enabled for production stage by default)

deploy:revert

Rewinds your stage branch to specified timestamp and restarts app.

Usage: cap production deploy:revert -s to=201205161559

generators

Hooks for git (git_hooks)

  • post-merge - show message if changes in Gemfile/Gemfile.lock or schema.rb have been detected so user can spot it and run bundle/rake db:migrate

In order to install:

rails generate netguru:git_hooks

TO DO:

  • specs for review response check during reponse
  • specs for sc middleware
  • use Konf gem

blueswift's People

Contributors

akashivskyy avatar alex-taffe avatar filip-zielinski avatar patrykkaczmarek avatar piotr-sekara avatar poszposz avatar siemian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blueswift's Issues

UIViewController is not key value coding-compliant for class

Reproduction steps:

  1. Clone repository from master branch
  2. Open Bluetooth.xcodeproj with Xcode 10.1 (10B61)
  3. Change target to BlueSwift-Sample
  4. Pick any simulator
  5. Build and run
  6. Tap Connection or Advertisement button

Crash log:

'[<UIViewController 0x7fbba8d1ed70> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key notifyLabel.'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010d6a71bb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x000000010c100735 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010d6a6d29 -[NSException raise] + 9
	3   Foundation                          0x000000010bb2bde4 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
	4   UIKitCore                           0x0000000111a87292 -[UIViewController setValue:forKey:] + 87
	5   UIKitCore                           0x0000000111d1e573 -[UIRuntimeOutletConnection connect] + 109
	6   CoreFoundation                      0x000000010d692cfd -[NSArray makeObjectsPerformSelector:] + 317
	7   UIKitCore                           0x0000000111d1b2b9 -[UINib instantiateWithOwner:options:] + 1814
	8   UIKitCore                           0x0000000111a8e452 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
	9   UIKitCore                           0x0000000111a8eddc -[UIViewController loadView] + 177
	10  UIKitCore                           0x0000000111a8f0ee -[UIViewController loadViewIfRequired] + 175
	11  UIKitCore                           0x0000000111a8f940 -[UIViewController view] + 27
	12  UIKitCore                           0x00000001119d9a9b -[UINavigationController _startCustomTransition:] + 931
	13  UIKitCore                           0x00000001119f03f0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 741
	14  UIKitCore                           0x00000001119f17e0 -[UINavigationController __viewWillLayoutSubviews] + 150
	15  UIKitCore                           0x00000001119d1600 -[UILayoutContainerView layoutSubviews] + 217
	16  UIKitCore                           0x0000000112598795 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
	17  QuartzCore                          0x0000000113b20b19 -[CALayer layoutSublayers] + 175
	18  QuartzCore                          0x0000000113b259d3 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
	19  QuartzCore                          0x0000000113a9e7ca _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
	20  QuartzCore                          0x0000000113ad597e _ZN2CA11Transaction6commitEv + 576
	21  UIKitCore                           0x00000001120a8701 _UIApplicationFlushRunLoopCATransactionIfTooLate + 165
	22  UIKitCore                           0x00000001121a2569 __handleEventQueueInternal + 6874
	23  CoreFoundation                      0x000000010d60c721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	24  CoreFoundation                      0x000000010d60bf93 __CFRunLoopDoSources0 + 243
	25  CoreFoundation                      0x000000010d60663f __CFRunLoopRun + 1263
	26  CoreFoundation                      0x000000010d605e11 CFRunLoopRunSpecific + 625
	27  GraphicsServices                    0x0000000115cb51dd GSEventRunModal + 62
	28  UIKitCore                           0x00000001120ae81d UIApplicationMain + 140
	29  BlueSwiftSample                     0x000000010b7405b7 main + 71
	30  libdyld.dylib                       0x000000010e089575 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

advertisement string does not work

hi i want to match advertisement string for example from peripheral side it advertise "gtpV5nm8Znm" and central side it scan for "gtpV5nm8Znm" if both match then central able to write data so how is it possible i put this string with let configuration = try! Configuration(services: [service], advertisement: "1004FD87-820F-438A-B757-7AC2C15C2D56") but it give me error

Add write requests without response

Now writing is only possible with response. It would be nice to have possibility of choosing type of write requests, as some peripherals might advertise characteristic with only writeWithoutResponse property.

this framework support cross-platform?

actually i want to develop bluetooth low energy where central application send data to peripheral and that peripheral app is on ios and android platform so is this possible using your library

Possible issue

Hi!

I installed library using cocoapods. It is not compiled

place internal extension AdvertisementData

method internal var data: Any? {

  case .servicesUUIDs(let uuid):
            return try? [CBUUID(uuidString: uuid)] -> Maybe [try? CBUUID(uuidString: uuid)] 

With best wishes

Compilation Errors in Xcode 11.2

I get the following error,

/Users/rlotech/Documents/BlueSwift-master/Framework/Source Files/Command/Command.swift:30:5: 'internal' modifier is redundant for instance method declared in an internal extension

Write successfully occurs, but the handler is not called

I am attempting to write to a characteristic. The first time I run the code below, it works and my peripheral is written to and I receive a callback handler for "write" function with no error. Then, when I attempt to run the same exact code a second time, the peripheral is written to but I do not receive a callback handler.

Note: I am using the "develop" branch because the changes to read/write validation were necessary to make the write work in the first place... If you can merge this into master I would much appreciate it.

Here is the example code:

        let characteristic1 = try! Characteristic(uuid: "EXAMPLE")
        let characteristic2 = try! Characteristic(uuid: "EXAMPLE")
        let service = try! Service(uuid: uuid, characteristics: [characteristic1, characteristic2])
        let configuration = try! Configuration(services: [service], advertisement: uuid)
        let peripheral = Peripheral(configuration: configuration)

        // connect to the peripheral
        connection.connect(peripheral) { [weak self] error in
            guard error == nil else {
                return
            }
            
            let command = Command.int8(1)
            

            // write command to characteristic1
            peripheral.write(command: command,
                             characteristic: characteristic1,
                             type: .withResponse)
            { (error) in
                // on second run, this handler code does not execute
                guard error == nil else {
                    // if error writing, read characteristic2
                    peripheral.read(errorCharacteristic) { (result, error) in
                        guard let result = result else {
                            self?.connection.disconnect(peripheral)
                            return
                        }
                        
                        var resultNumber: UInt8 = 0
                        result.copyBytes(to:&resultNumber, count: MemoryLayout<UInt8>.size)
                        print(resultNumber)
                        self?.connection.disconnect(peripheral)
                    }
                    return
                }
                
                // always disconnect
                self?.connection.disconnect(peripheral)
            }
        }

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.