diff --git a/PowerScout.xcodeproj/project.pbxproj b/PowerScout.xcodeproj/project.pbxproj index 27a2c3e..1ad0b42 100644 --- a/PowerScout.xcodeproj/project.pbxproj +++ b/PowerScout.xcodeproj/project.pbxproj @@ -1021,11 +1021,14 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = PowerScoutTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = frcteam525.PowerScoutTests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PowerScout.app/PowerScout"; @@ -1037,11 +1040,14 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = PowerScoutTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = frcteam525.PowerScoutTests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PowerScout.app/PowerScout"; diff --git a/PowerScout/Bluetooth/ServiceStore.swift b/PowerScout/Bluetooth/ServiceStore.swift index 1af49c4..d9839e6 100644 --- a/PowerScout/Bluetooth/ServiceStore.swift +++ b/PowerScout/Bluetooth/ServiceStore.swift @@ -127,14 +127,16 @@ class ServiceStore: NSObject { } func sendData(_ data:Data) { - if(sessionState != .connected) { - print("ERROR: state is not connected -- can't send data!") - return - } - do { - try MatchTransfer.session.send(data, toPeers: MatchTransfer.session.connectedPeers, with: .reliable) - } catch { - print("ERROR: could not send data!") + if transferType == .multipeerConnectivity { + if(sessionState != .connected) { + print("ERROR: state is not connected -- can't send data!") + return + } + do { + try MatchTransfer.session.send(data, toPeers: MatchTransfer.session.connectedPeers, with: .reliable) + } catch { + print("ERROR: could not send data!") + } } }