Skip to content

Commit

Permalink
Fix Xcode 12 errors
Browse files Browse the repository at this point in the history
ORSSerialPort.h  one extra  { add in last commit in  - (instancetype)initWithDevice:(io_object_t)device; Line armadsen#163

Explained: ORSSerial/ORSSerialPacketDescriptor.h file not found in issue armadsen#169

defined the following in ORSSerialPort.h

// defined missing interface to fix XCODE 12.3 errors.
+ (io_object_t) deviceFromBSDPath:(NSString *)bsdPath;
+ (NSString *) bsdCalloutPathFromDevice:(io_object_t)aDevice;
+ (NSString *) modemNameFromDevice:(io_object_t)aDevice;
/**
 *  ORSSerialPort must be init'd using -initWithPath:
 */
- (instancetype) init;
- (void) reallyClosePort;

- (void) notifyDelegateOfPosixError;
- (void) notifyDelegateOfPosixErrorWaitingUntilDone:(BOOL)shouldWait;
- (void) setPortOptions;
- (void) updateModemLines;
- (void) receiveData:(NSData *)data;
  • Loading branch information
flemingm committed Jan 16, 2021
1 parent 63d372b commit e8da40c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Source/ORSSerialPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,22 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface ORSSerialPort : NSObject

// missing interface to fix XCODE 12 errors.
+ (io_object_t) deviceFromBSDPath:(NSString *)bsdPath;
+ (NSString *) bsdCalloutPathFromDevice:(io_object_t)aDevice;
+ (NSString *) modemNameFromDevice:(io_object_t)aDevice;
/**
* ORSSerialPort must be init'd using -initWithPath:
*/
- (instancetype) init;
- (void) reallyClosePort;

- (void) notifyDelegateOfPosixError;
- (void) notifyDelegateOfPosixErrorWaitingUntilDone:(BOOL)shouldWait;
- (void) setPortOptions;
- (void) updateModemLines;
- (void) receiveData:(NSData *)data;

/** ---------------------------------------------------------------------------------------
* @name Getting a Serial Port
* ---------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Source/ORSSerialPort.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ - (instancetype)initWithDevice:(io_object_t)device;
NSString *bsdPath = [[self class] bsdCalloutPathFromDevice:device];
ORSSerialPort *existingPort = [[self class] existingPortWithPath:bsdPath];

if (existingPort != nil && IOObjectIsEqualTo(_IOKitDevice, device)) {
if (existingPort != nil && IOObjectIsEqualTo(_IOKitDevice, device))
{
self = nil;
return existingPort;
Expand Down
5 changes: 4 additions & 1 deletion Source/ORSSerialRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#import <Foundation/Foundation.h>
#import <ORSSerial/ORSSerialPacketDescriptor.h>

//#import <ORSSerial/ORSSerialPacketDescriptor.h>
// reference framework will not find it without framework. uncomment next line if not using framework.
#import "ORSSerialPacketDescriptor.h"

// Keep older versions of the compiler happy
#ifndef NS_ASSUME_NONNULL_BEGIN
Expand Down

0 comments on commit e8da40c

Please sign in to comment.