Skip to content

Commit

Permalink
OS X target and travis build file
Browse files Browse the repository at this point in the history
  • Loading branch information
rhummelmose committed Sep 16, 2015
1 parent 6413bb0 commit fd139ac
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 14 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: objective-c
osx_image: xcode7
branches:
only:
- master
env:
- LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8
script:
- set -o pipefail
- xcodebuild -project BluetoothKit.xcodeproj -scheme "BluetoothKit iOS" -sdk iphonesimulator
-destination "platform=iOS Simulator,name=iPhone 6" ONLY_ACTIVE_ARCH=NO
- pod lib lint --quick
158 changes: 149 additions & 9 deletions BluetoothKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
C687E3C41B8B4CF100B702D8 /* BluetoothKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C687E3C31B8B4CF100B702D8 /* BluetoothKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
C6BFB2921B95885D00AB5CAE /* BKDiscoveriesChange.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6BFB2911B95885D00AB5CAE /* BKDiscoveriesChange.swift */; };
C6BFB2941B959C8800AB5CAE /* BKContinuousScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6BFB2931B959C8800AB5CAE /* BKContinuousScanner.swift */; };
C6ED86C91BA955DB00C9B70B /* BKAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22721B8C80C300CB74CE /* BKAvailability.swift */; };
C6ED86CA1BA955DB00C9B70B /* BKCBCentralManagerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3A61B8B4A2800B702D8 /* BKCBCentralManagerDelegateProxy.swift */; };
C6ED86CB1BA955DB00C9B70B /* BKCBPeripheralDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3A71B8B4A2800B702D8 /* BKCBPeripheralDelegateProxy.swift */; };
C6ED86CC1BA955DB00C9B70B /* BKCBPeripheralManagerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22771B8C86C800CB74CE /* BKCBPeripheralManagerDelegateProxy.swift */; };
C6ED86CD1BA955DB00C9B70B /* BKCental.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3A81B8B4A2800B702D8 /* BKCental.swift */; };
C6ED86CE1BA955DB00C9B70B /* BKCentralStateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3AB1B8B4A2800B702D8 /* BKCentralStateMachine.swift */; };
C6ED86CF1BA955DB00C9B70B /* BKConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C66888AE1B984792003C8DBB /* BKConfiguration.swift */; };
C6ED86D01BA955DB00C9B70B /* BKConnectionAttempt.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22351B8C49CC00CB74CE /* BKConnectionAttempt.swift */; };
C6ED86D11BA955DB00C9B70B /* BKConnectionPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3AD1B8B4A2800B702D8 /* BKConnectionPool.swift */; };
C6ED86D21BA955DB00C9B70B /* BKContinuousScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6BFB2931B959C8800AB5CAE /* BKContinuousScanner.swift */; };
C6ED86D31BA955DB00C9B70B /* BKDiscoveriesChange.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6BFB2911B95885D00AB5CAE /* BKDiscoveriesChange.swift */; };
C6ED86D41BA955DB00C9B70B /* BKDiscovery.swift in Sources */ = {isa = PBXBuildFile; fileRef = C66888AC1B978181003C8DBB /* BKDiscovery.swift */; };
C6ED86D51BA955DB00C9B70B /* BKPeripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22701B8C7EF300CB74CE /* BKPeripheral.swift */; };
C6ED86D61BA955DB00C9B70B /* BKPeripheralConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C66888B01B984AB7003C8DBB /* BKPeripheralConfiguration.swift */; };
C6ED86D71BA955DB00C9B70B /* BKPeripheralStateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22741B8C83D900CB74CE /* BKPeripheralStateMachine.swift */; };
C6ED86D81BA955DB00C9B70B /* BKRemoteCentral.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A22791B8CDC7D00CB74CE /* BKRemoteCentral.swift */; };
C6ED86D91BA955DB00C9B70B /* BKRemotePeripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3AC1B8B4A2800B702D8 /* BKRemotePeripheral.swift */; };
C6ED86DA1BA955DB00C9B70B /* BKScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C687E3AE1B8B4A2800B702D8 /* BKScanner.swift */; };
C6ED86DB1BA955DB00C9B70B /* BKSendDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67A227B1B8CECB400CB74CE /* BKSendDataTask.swift */; };
C6ED86DC1BA9567A00C9B70B /* BluetoothKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C687E3C31B8B4CF100B702D8 /* BluetoothKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -52,6 +72,7 @@
C687E3C31B8B4CF100B702D8 /* BluetoothKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BluetoothKit.h; sourceTree = "<group>"; };
C6BFB2911B95885D00AB5CAE /* BKDiscoveriesChange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BKDiscoveriesChange.swift; sourceTree = "<group>"; };
C6BFB2931B959C8800AB5CAE /* BKContinuousScanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BKContinuousScanner.swift; sourceTree = "<group>"; };
C6ED86C11BA955A600C9B70B /* BluetoothKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BluetoothKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -62,6 +83,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C6ED86BD1BA955A600C9B70B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -79,6 +107,7 @@
isa = PBXGroup;
children = (
C687E3981B8B496400B702D8 /* BluetoothKit.framework */,
C6ED86C11BA955A600C9B70B /* BluetoothKit.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -136,12 +165,20 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C6ED86BE1BA955A600C9B70B /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
C6ED86DC1BA9567A00C9B70B /* BluetoothKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
C687E3971B8B496400B702D8 /* BluetoothKit */ = {
C687E3971B8B496400B702D8 /* BluetoothKit iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = C687E3A01B8B496400B702D8 /* Build configuration list for PBXNativeTarget "BluetoothKit" */;
buildConfigurationList = C687E3A01B8B496400B702D8 /* Build configuration list for PBXNativeTarget "BluetoothKit iOS" */;
buildPhases = (
C687E3931B8B496400B702D8 /* Sources */,
C687E3941B8B496400B702D8 /* Frameworks */,
Expand All @@ -152,11 +189,29 @@
);
dependencies = (
);
name = BluetoothKit;
name = "BluetoothKit iOS";
productName = BluetoothKit;
productReference = C687E3981B8B496400B702D8 /* BluetoothKit.framework */;
productType = "com.apple.product-type.framework";
};
C6ED86C01BA955A600C9B70B /* BluetoothKit OSX */ = {
isa = PBXNativeTarget;
buildConfigurationList = C6ED86C61BA955A600C9B70B /* Build configuration list for PBXNativeTarget "BluetoothKit OSX" */;
buildPhases = (
C6ED86BC1BA955A600C9B70B /* Sources */,
C6ED86BD1BA955A600C9B70B /* Frameworks */,
C6ED86BE1BA955A600C9B70B /* Headers */,
C6ED86BF1BA955A600C9B70B /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "BluetoothKit OSX";
productName = BluetoothKit;
productReference = C6ED86C11BA955A600C9B70B /* BluetoothKit.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -171,6 +226,9 @@
C687E3971B8B496400B702D8 = {
CreatedOnToolsVersion = 7.0;
};
C6ED86C01BA955A600C9B70B = {
CreatedOnToolsVersion = 7.1;
};
};
};
buildConfigurationList = C687E3921B8B496400B702D8 /* Build configuration list for PBXProject "BluetoothKit" */;
Expand All @@ -185,7 +243,8 @@
projectDirPath = "";
projectRoot = "";
targets = (
C687E3971B8B496400B702D8 /* BluetoothKit */,
C687E3971B8B496400B702D8 /* BluetoothKit iOS */,
C6ED86C01BA955A600C9B70B /* BluetoothKit OSX */,
);
};
/* End PBXProject section */
Expand All @@ -198,6 +257,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C6ED86BF1BA955A600C9B70B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -227,6 +293,32 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C6ED86BC1BA955A600C9B70B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C6ED86C91BA955DB00C9B70B /* BKAvailability.swift in Sources */,
C6ED86CA1BA955DB00C9B70B /* BKCBCentralManagerDelegateProxy.swift in Sources */,
C6ED86CB1BA955DB00C9B70B /* BKCBPeripheralDelegateProxy.swift in Sources */,
C6ED86CC1BA955DB00C9B70B /* BKCBPeripheralManagerDelegateProxy.swift in Sources */,
C6ED86CD1BA955DB00C9B70B /* BKCental.swift in Sources */,
C6ED86CE1BA955DB00C9B70B /* BKCentralStateMachine.swift in Sources */,
C6ED86CF1BA955DB00C9B70B /* BKConfiguration.swift in Sources */,
C6ED86D01BA955DB00C9B70B /* BKConnectionAttempt.swift in Sources */,
C6ED86D11BA955DB00C9B70B /* BKConnectionPool.swift in Sources */,
C6ED86D21BA955DB00C9B70B /* BKContinuousScanner.swift in Sources */,
C6ED86D31BA955DB00C9B70B /* BKDiscoveriesChange.swift in Sources */,
C6ED86D41BA955DB00C9B70B /* BKDiscovery.swift in Sources */,
C6ED86D51BA955DB00C9B70B /* BKPeripheral.swift in Sources */,
C6ED86D61BA955DB00C9B70B /* BKPeripheralConfiguration.swift in Sources */,
C6ED86D71BA955DB00C9B70B /* BKPeripheralStateMachine.swift in Sources */,
C6ED86D81BA955DB00C9B70B /* BKRemoteCentral.swift in Sources */,
C6ED86D91BA955DB00C9B70B /* BKRemotePeripheral.swift in Sources */,
C6ED86DA1BA955DB00C9B70B /* BKScanner.swift in Sources */,
C6ED86DB1BA955DB00C9B70B /* BKSendDataTask.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -270,6 +362,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = BluetoothKit;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -311,6 +404,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = BluetoothKit;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -330,8 +424,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wallmob.BluetoothKit;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = com.rasmusth.BluetoothKit;
SKIP_INSTALL = YES;
};
name = Debug;
Expand All @@ -347,8 +440,47 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wallmob.BluetoothKit;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = com.rasmusth.BluetoothKit;
SKIP_INSTALL = YES;
};
name = Release;
};
C6ED86C71BA955A600C9B70B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Resources/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.rasmusth.BluetoothKit;
SDKROOT = macosx;
SKIP_INSTALL = YES;
};
name = Debug;
};
C6ED86C81BA955A600C9B70B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Resources/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.rasmusth.BluetoothKit;
SDKROOT = macosx;
SKIP_INSTALL = YES;
};
name = Release;
Expand All @@ -365,7 +497,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C687E3A01B8B496400B702D8 /* Build configuration list for PBXNativeTarget "BluetoothKit" */ = {
C687E3A01B8B496400B702D8 /* Build configuration list for PBXNativeTarget "BluetoothKit iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C687E3A11B8B496400B702D8 /* Debug */,
Expand All @@ -374,6 +506,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C6ED86C61BA955A600C9B70B /* Build configuration list for PBXNativeTarget "BluetoothKit OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C6ED86C71BA955A600C9B70B /* Debug */,
C6ED86C81BA955A600C9B70B /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = C687E38F1B8B496400B702D8 /* Project object */;
Expand Down
16 changes: 12 additions & 4 deletions Source/BKRemotePeripheral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ public class BKRemotePeripheral: BKCBPeripheralDelegate, Equatable {
if peripheral == nil {
return .Shallow
}
#if os(iOS)
switch peripheral!.state {
case .Disconnected: return .Disconnected
case .Connecting: return .Connecting
case .Connected: return .Connected
case .Disconnecting: return .Disconnecting
case .Disconnected: return .Disconnected
case .Connecting: return .Connecting
case .Connected: return .Connected
case .Disconnecting: return .Disconnecting
}
#else
switch peripheral!.state {
case .Disconnected: return .Disconnected
case .Connecting: return .Connecting
case .Connected: return .Connected
}
#endif
}

/// The name of the remote peripheral, derived from an underlying CBPeripheral object.
Expand Down
2 changes: 1 addition & 1 deletion Umbrella/BluetoothKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// THE SOFTWARE.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

//! Project version number for BluetoothKit.
FOUNDATION_EXPORT double BluetoothKitVersionNumber;
Expand Down

0 comments on commit fd139ac

Please sign in to comment.