diff --git a/.gitignore b/.gitignore index bde2c1c..2e7a0a4 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,5 @@ fastlane/Preview.html fastlane/screenshots fastlane/test_output +nRFBlinky.xcodeproj/project.xcworkspace/xcshareddata +nRFBlinky.xcodeproj/xcshareddata/xcschemes diff --git a/CHANGELOG b/CHANGELOG index 575767a..d962099 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +- **1.1.0**: + - Improvement: New Nordic look & feel + - Improvement: Localisatino support with Spanish, Italian, Norwegian, French, Russian, Ukrainian, Romanian, Polish, German and Korean + - Bugfix: FIxed hint positioning after orientation change + - **1.0.2**: - Improvement: Blinky peripheral name is now used as the title of the view instead of the default name - Improvement: Empty peripherals view resizes and animates better with orientation change diff --git a/README.md b/README.md index ff2fb21..d55700c 100644 --- a/README.md +++ b/README.md @@ -14,28 +14,30 @@ A simplified proprietary service by Nordic Semiconductor, containing two charact - UUID: **`00001524-1212-EFDE-1523-785FEABCD123`** - Value: **`1`** => Button Pressed - Value: **`0`** => Button Released + + For full specification, check out + [documentation](https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_app_blinky). -### Requirements: +## Requirements: - An iOS device with BLE capabilities -- A [nRF52](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52-DK) or [nRF51](https://www.nordicsemi.com/eng/Products/nRF51-DK) Dev Kit -- The Blinky example firmware to flash on the Development Kit, there are a few places to acquire that: -- For your conveninence, we have bundled two firmwares in this project under the Firmwares directory. +- A [Development Kit](https://www.nordicsemi.com/Software-and-Tools/Development-Kits) +- The Blinky example firmware to flash on the Development Kit. For your conveninence, we have bundled two firmwares in this project under the Firmwares directory. - To get the latest firmwares and check the source code, you may go directly to our [Developers website](http://developer.nordicsemi.com/nRF5_SDK/) and download the SDK version you need, then you can find the source code and hex files to the blinky demo in the directory `/examples/ble_peripheral/ble_app_blinky/` -- More information about the nRFBlinky example firmware can be found in the [Info center](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.1.0%2Fble_sdk_app_blinky.html) +- More information about the nRFBlinky example firmware can be found in the [documentation](https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_app_blinky). -### Installation and usage: +## Installation and usage: - Prepare your Development kit. - Plug in the Development Kit to your computer via USB. - Power On the Development Kit. - The Development Kit will now appear as a Mass storage device. - Drag (or copy/paste) the appropriate HEX file onto that new device. - - The Development Kit lEDS will flash and it will disconnect and reconnect. + - The Development Kit LEDs will flash and it will disconnect and reconnect. - The Development Kit is now ready and flashed with the nRFBlinky example firmware. - Start Xcode and run build the project against your target iOS Device (**Note:** BLE is not available in the iOS simulator, so the iOS device is a requirement to test the application). - Launch the nRFBlinky app on your iOS device. - The app will start scanning for nearby peripherals. - - Select the nRF_Blinky peripheral that appears on screen (**Note:** if the peripheral does not show up, ensure that it's powered on and functional). + - Select the Nordic_Blinky peripheral that appears on screen (**Note:** if the peripheral does not show up, ensure that it's powered on and functional). - Your iOS device will now connect to the peripheral and state is displayed on the screen. - Changing the value of the Toggle switch will turn LED 3 on or off. - Pressing Button 1 on the Development Kit will show the button state as Pressed on the app. diff --git a/nRFBlinky.xcodeproj/project.pbxproj b/nRFBlinky.xcodeproj/project.pbxproj index 9d9cec0..ec17632 100644 --- a/nRFBlinky.xcodeproj/project.pbxproj +++ b/nRFBlinky.xcodeproj/project.pbxproj @@ -18,6 +18,9 @@ 30B664851FCDA0FC003C8B55 /* BlinkyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B664841FCDA0FC003C8B55 /* BlinkyTableViewCell.swift */; }; 30B664881FCDA2E0003C8B55 /* BlinkyPeripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B664871FCDA2E0003C8B55 /* BlinkyPeripheral.swift */; }; 30B6648B1FD1590A003C8B55 /* BlinkyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B6648A1FD1590A003C8B55 /* BlinkyViewController.swift */; }; + 52A637C0220DDECD00F5308D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52A637C2220DDECD00F5308D /* Localizable.strings */; }; + 52A637C5220DE11200F5308D /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A637C4220DE11200F5308D /* String+Localization.swift */; }; + 52FB0AF022131B7D00B1E575 /* UIColor+Nordic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FB0AEF22131B7D00B1E575 /* UIColor+Nordic.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -38,7 +41,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 304F42E61FDECF050010A446 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; 30B664411FCD6E65003C8B55 /* nRFBlinky.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nRFBlinky.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30B664441FCD6E65003C8B55 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30B664491FCD6E65003C8B55 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -56,6 +58,40 @@ 30B664841FCDA0FC003C8B55 /* BlinkyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlinkyTableViewCell.swift; sourceTree = ""; }; 30B664871FCDA2E0003C8B55 /* BlinkyPeripheral.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlinkyPeripheral.swift; sourceTree = ""; }; 30B6648A1FD1590A003C8B55 /* BlinkyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlinkyViewController.swift; sourceTree = ""; }; + 52037F882211BCE300BDEAEE /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = ""; }; + 52037F8A2211BD5B00BDEAEE /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Main.strings; sourceTree = ""; }; + 52A637BB220DD9AD00F5308D /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Main.strings; sourceTree = ""; }; + 52A637BD220DDD2600F5308D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; + 52A637C1220DDECD00F5308D /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + 52A637C3220DDEDF00F5308D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 52A637C4220DE11200F5308D /* String+Localization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Localization.swift"; sourceTree = ""; }; + 52FB0AE12211CBE600B1E575 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = ""; }; + 52FB0AE22211CBE700B1E575 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AE32211CDCC00B1E575 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = ""; }; + 52FB0AE42211CDCD00B1E575 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AE52212CFC400B1E575 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/Main.strings; sourceTree = ""; }; + 52FB0AE62212CFC400B1E575 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AE72212D2F700B1E575 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Main.strings; sourceTree = ""; }; + 52FB0AE82212D2F800B1E575 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AE92212D67100B1E575 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = ""; }; + 52FB0AEA2212D67100B1E575 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AEB2212D6EB00B1E575 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = ""; }; + 52FB0AEC2212D6EC00B1E575 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AED2212FEB000B1E575 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Main.strings; sourceTree = ""; }; + 52FB0AEE2212FEB000B1E575 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AEF22131B7D00B1E575 /* UIColor+Nordic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Nordic.swift"; sourceTree = ""; }; + 52FB0AF12214208800B1E575 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Main.strings; sourceTree = ""; }; + 52FB0AF22214208800B1E575 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AF32214251700B1E575 /* mr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mr; path = mr.lproj/Main.strings; sourceTree = ""; }; + 52FB0AF42214251700B1E575 /* mr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mr; path = mr.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AF522145D6700B1E575 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Main.strings; sourceTree = ""; }; + 52FB0AF622145D6800B1E575 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = ""; }; + 52FB0AF72214632700B1E575 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Main.strings"; sourceTree = ""; }; + 52FB0AF82214632700B1E575 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = ""; }; + 52FB0AFB221ADE7000B1E575 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; }; + 52FB0AFC221ADE7000B1E575 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + AA92C5CC2211A4A40011164C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Main.strings; sourceTree = ""; }; + AA92C5CE2211A4A40011164C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -109,9 +145,12 @@ 30B664861FCDA2C5003C8B55 /* Models */, 30B664791FCD722A003C8B55 /* ViewControllers */, 30B664441FCD6E65003C8B55 /* AppDelegate.swift */, + 52A637C4220DE11200F5308D /* String+Localization.swift */, + 52FB0AEF22131B7D00B1E575 /* UIColor+Nordic.swift */, 30B664481FCD6E65003C8B55 /* Main.storyboard */, - 30B6644B1FCD6E65003C8B55 /* Assets.xcassets */, 30B6644D1FCD6E65003C8B55 /* LaunchScreen.storyboard */, + 52A637C2220DDECD00F5308D /* Localizable.strings */, + 30B6644B1FCD6E65003C8B55 /* Assets.xcassets */, 30B664501FCD6E65003C8B55 /* Info.plist */, ); path = nRFBlinky; @@ -233,20 +272,23 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Nordic Semiconductor ASA"; TargetAttributes = { 30B664401FCD6E65003C8B55 = { CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; 30B664541FCD6E65003C8B55 = { CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; TestTargetID = 30B664401FCD6E65003C8B55; }; 30B6645F1FCD6E65003C8B55 = { CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; TestTargetID = 30B664401FCD6E65003C8B55; }; @@ -259,6 +301,20 @@ knownRegions = ( en, Base, + es, + nb, + de, + it, + ro, + uk, + ru, + fr, + ko, + vi, + mr, + fi, + "pt-BR", + "zh-Hans", ); mainGroup = 30B664381FCD6E65003C8B55; productRefGroup = 30B664421FCD6E65003C8B55 /* Products */; @@ -278,6 +334,7 @@ buildActionMask = 2147483647; files = ( 30B6644F1FCD6E65003C8B55 /* LaunchScreen.storyboard in Resources */, + 52A637C0220DDECD00F5308D /* Localizable.strings in Resources */, 30B6644C1FCD6E65003C8B55 /* Assets.xcassets in Resources */, 30B6644A1FCD6E65003C8B55 /* Main.storyboard in Resources */, ); @@ -309,6 +366,8 @@ 30B664881FCDA2E0003C8B55 /* BlinkyPeripheral.swift in Sources */, 30B664801FCD9638003C8B55 /* RootViewController.swift in Sources */, 30B664451FCD6E65003C8B55 /* AppDelegate.swift in Sources */, + 52A637C5220DE11200F5308D /* String+Localization.swift in Sources */, + 52FB0AF022131B7D00B1E575 /* UIColor+Nordic.swift in Sources */, 30B6648B1FD1590A003C8B55 /* BlinkyViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -349,7 +408,22 @@ isa = PBXVariantGroup; children = ( 30B664491FCD6E65003C8B55 /* Base */, - 304F42E61FDECF050010A446 /* en */, + 52A637BB220DD9AD00F5308D /* pl */, + 52A637BD220DDD2600F5308D /* en */, + AA92C5CC2211A4A40011164C /* es */, + 52037F8A2211BD5B00BDEAEE /* nb */, + 52FB0AE12211CBE600B1E575 /* de */, + 52FB0AE32211CDCC00B1E575 /* it */, + 52FB0AE52212CFC400B1E575 /* ro */, + 52FB0AE72212D2F700B1E575 /* uk */, + 52FB0AE92212D67100B1E575 /* ru */, + 52FB0AEB2212D6EB00B1E575 /* fr */, + 52FB0AED2212FEB000B1E575 /* ko */, + 52FB0AF12214208800B1E575 /* vi */, + 52FB0AF32214251700B1E575 /* mr */, + 52FB0AF522145D6700B1E575 /* fi */, + 52FB0AF72214632700B1E575 /* pt-BR */, + 52FB0AFB221ADE7000B1E575 /* zh-Hans */, ); name = Main.storyboard; sourceTree = ""; @@ -362,6 +436,29 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; + 52A637C2220DDECD00F5308D /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 52A637C1220DDECD00F5308D /* pl */, + 52A637C3220DDEDF00F5308D /* en */, + AA92C5CE2211A4A40011164C /* es */, + 52037F882211BCE300BDEAEE /* nb */, + 52FB0AE22211CBE700B1E575 /* de */, + 52FB0AE42211CDCD00B1E575 /* it */, + 52FB0AE62212CFC400B1E575 /* ro */, + 52FB0AE82212D2F800B1E575 /* uk */, + 52FB0AEA2212D67100B1E575 /* ru */, + 52FB0AEC2212D6EC00B1E575 /* fr */, + 52FB0AEE2212FEB000B1E575 /* ko */, + 52FB0AF22214208800B1E575 /* vi */, + 52FB0AF42214251700B1E575 /* mr */, + 52FB0AF622145D6800B1E575 /* fi */, + 52FB0AF82214632700B1E575 /* pt-BR */, + 52FB0AFC221ADE7000B1E575 /* zh-Hans */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -369,6 +466,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -379,6 +477,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -386,6 +485,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -426,6 +526,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -436,6 +537,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -443,6 +545,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -483,7 +586,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nordicsemi.nrf-blinky"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -499,7 +602,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nordicsemi.nrf-blinky"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -515,7 +618,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFBlinkyTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nRFBlinky.app/nRFBlinky"; }; @@ -532,7 +635,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFBlinkyTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nRFBlinky.app/nRFBlinky"; }; @@ -548,7 +651,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFBlinkyUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = nRFBlinky; }; @@ -564,7 +667,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nordicsemi.nRFBlinkyUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = nRFBlinky; }; diff --git a/nRFBlinky/AppDelegate.swift b/nRFBlinky/AppDelegate.swift index d2fa2c8..af799af 100644 --- a/nRFBlinky/AppDelegate.swift +++ b/nRFBlinky/AppDelegate.swift @@ -12,37 +12,12 @@ import CoreBluetooth @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { + // Required for the Storyboard to show up. var window: UIWindow? - public var centralManager: CBCentralManager? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - centralManager = CBCentralManager() - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + return true } - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - } diff --git a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-1.png b/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-1.png deleted file mode 100644 index 06a96d6..0000000 Binary files a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-1.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-2.png b/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-2.png deleted file mode 100644 index 0b7902f..0000000 Binary files a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo-2.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo.png b/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo.png deleted file mode 100644 index 71bea1c..0000000 Binary files a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/nordic_logo.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic.png b/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic.png deleted file mode 100644 index 560e5bc..0000000 Binary files a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@2x.png b/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@2x.png deleted file mode 100644 index 1066177..0000000 Binary files a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@2x.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@3x.png b/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@3x.png deleted file mode 100644 index 09d5ad4..0000000 Binary files a/nRFBlinky/Assets.xcassets/byNordic.imageset/byNordic@3x.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/Contents.json b/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/Contents.json deleted file mode 100644 index 42a7130..0000000 --- a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "filename": "ic_bluetooth_searching_48pt.png", - "idiom": "universal", - "scale": "1x" - }, - { - "filename": "ic_bluetooth_searching_48pt_2x.png", - "idiom": "universal", - "scale": "2x" - }, - { - "filename": "ic_bluetooth_searching_48pt_3x.png", - "idiom": "universal", - "scale": "3x" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt.png b/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt.png deleted file mode 100644 index c1d6b93..0000000 Binary files a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_2x.png b/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_2x.png deleted file mode 100644 index 2fc2be2..0000000 Binary files a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_2x.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_3x.png b/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_3x.png deleted file mode 100644 index 0cada1a..0000000 Binary files a/nRFBlinky/Assets.xcassets/ic_bluetooth_searching_48pt.imageset/ic_bluetooth_searching_48pt_3x.png and /dev/null differ diff --git a/nRFBlinky/Assets.xcassets/byNordic.imageset/Contents.json b/nRFBlinky/Assets.xcassets/scanning.imageset/Contents.json similarity index 70% rename from nRFBlinky/Assets.xcassets/byNordic.imageset/Contents.json rename to nRFBlinky/Assets.xcassets/scanning.imageset/Contents.json index fcbc88e..9379b66 100644 --- a/nRFBlinky/Assets.xcassets/byNordic.imageset/Contents.json +++ b/nRFBlinky/Assets.xcassets/scanning.imageset/Contents.json @@ -2,17 +2,17 @@ "images" : [ { "idiom" : "universal", - "filename" : "byNordic.png", + "filename" : "scanning.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "byNordic@2x.png", + "filename" : "scanning@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "byNordic@3x.png", + "filename" : "scanning@3x.png", "scale" : "3x" } ], diff --git a/nRFBlinky/Assets.xcassets/scanning.imageset/scanning.png b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning.png new file mode 100644 index 0000000..4ca1050 Binary files /dev/null and b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning.png differ diff --git a/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@2x.png b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@2x.png new file mode 100644 index 0000000..909cfd8 Binary files /dev/null and b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@2x.png differ diff --git a/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@3x.png b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@3x.png new file mode 100644 index 0000000..29b64d0 Binary files /dev/null and b/nRFBlinky/Assets.xcassets/scanning.imageset/scanning@3x.png differ diff --git a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/Contents.json b/nRFBlinky/Assets.xcassets/splashscreen.imageset/Contents.json similarity index 69% rename from nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/Contents.json rename to nRFBlinky/Assets.xcassets/splashscreen.imageset/Contents.json index 243ffb1..694bfd2 100644 --- a/nRFBlinky/Assets.xcassets/Nordic_Logo.imageset/Contents.json +++ b/nRFBlinky/Assets.xcassets/splashscreen.imageset/Contents.json @@ -2,17 +2,15 @@ "images" : [ { "idiom" : "universal", - "filename" : "nordic_logo-1.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "nordic_logo-2.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "nordic_logo.png", + "filename" : "splashscreen.png", "scale" : "3x" } ], diff --git a/nRFBlinky/Assets.xcassets/splashscreen.imageset/splashscreen.png b/nRFBlinky/Assets.xcassets/splashscreen.imageset/splashscreen.png new file mode 100644 index 0000000..b255243 Binary files /dev/null and b/nRFBlinky/Assets.xcassets/splashscreen.imageset/splashscreen.png differ diff --git a/nRFBlinky/Base.lproj/LaunchScreen.storyboard b/nRFBlinky/Base.lproj/LaunchScreen.storyboard index 66b7efa..c202146 100644 --- a/nRFBlinky/Base.lproj/LaunchScreen.storyboard +++ b/nRFBlinky/Base.lproj/LaunchScreen.storyboard @@ -1,11 +1,11 @@ - - + + - + @@ -15,37 +15,29 @@ - + - - - - - - - - + + - - - - - + + + + - + - + - - + diff --git a/nRFBlinky/Base.lproj/Main.storyboard b/nRFBlinky/Base.lproj/Main.storyboard index 72440c6..e80983f 100644 --- a/nRFBlinky/Base.lproj/Main.storyboard +++ b/nRFBlinky/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - - + + - + @@ -15,10 +15,10 @@ - + - - + + @@ -27,25 +27,10 @@ - - - - - - - - - - - - - - - @@ -54,25 +39,25 @@ - + - - + + - + - + - - - + + @@ -104,11 +89,11 @@ - + - + @@ -122,44 +107,49 @@ - - + - - + + - + - - + - - - - + + + - - + + - - + + + @@ -198,17 +188,17 @@ - + - - + + - + @@ -218,15 +208,15 @@ - - + - + @@ -247,11 +237,11 @@ - - + + - + @@ -262,7 +252,7 @@ - + @@ -297,11 +287,10 @@ - - - - - + + + + - + diff --git a/nRFBlinky/Info.plist b/nRFBlinky/Info.plist index 6845c03..2e814e6 100644 --- a/nRFBlinky/Info.plist +++ b/nRFBlinky/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.2 + 1.1.0 CFBundleVersion - 5 + 6 LSRequiresIPhoneOS NSBluetoothPeripheralUsageDescription diff --git a/nRFBlinky/Models/BlinkyPeripheral.swift b/nRFBlinky/Models/BlinkyPeripheral.swift index f072716..f31a0f9 100644 --- a/nRFBlinky/Models/BlinkyPeripheral.swift +++ b/nRFBlinky/Models/BlinkyPeripheral.swift @@ -3,141 +3,197 @@ // nRFBlinky // // Created by Mostafa Berg on 28/11/2017. +// Modified by Aleksander Nowakowski on 13/02/2019 // Copyright © 2017 Nordic Semiconductor ASA. All rights reserved. // import UIKit import CoreBluetooth -class BlinkyPeripheral: NSObject, CBPeripheralDelegate { - //MARK: - Blinky services and charcteristics Identifiers - // +protocol BlinkyDelegate { + func blinkyDidConnect(ledSupported: Bool, buttonSupported: Bool) + func blinkyDidDisconnect() + func buttonStateChanged(isPressed: Bool) + func ledStateChanged(isOn: Bool) +} + +class BlinkyPeripheral: NSObject, CBPeripheralDelegate, CBCentralManagerDelegate { + + // MARK: - Blinky services and charcteristics Identifiers + public static let nordicBlinkyServiceUUID = CBUUID.init(string: "00001523-1212-EFDE-1523-785FEABCD123") public static let buttonCharacteristicUUID = CBUUID.init(string: "00001524-1212-EFDE-1523-785FEABCD123") public static let ledCharacteristicUUID = CBUUID.init(string: "00001525-1212-EFDE-1523-785FEABCD123") - //MARK: - Properties - // - public private(set) var basePeripheral : CBPeripheral - public private(set) var advertisedName : String? - public private(set) var RSSI : NSNumber - public private(set) var advertisedServices : [CBUUID]? - - //MARK: - Callback handlers - private var ledCallbackHandler : ((Bool) -> (Void))? - private var buttonPressHandler : ((Bool) -> (Void))? - - //MARK: - Services and Characteristic properties - // - private var blinkyService : CBService? - private var buttonCharacteristic: CBCharacteristic? - private var ledCharacteristic : CBCharacteristic? - - init(withPeripheral aPeripheral: CBPeripheral, advertisementData anAdvertisementDictionary: [String : Any], andRSSI anRSSI: NSNumber) { - basePeripheral = aPeripheral - RSSI = anRSSI - super.init() - (advertisedName, advertisedServices) = parseAdvertisementData(anAdvertisementDictionary) - basePeripheral.delegate = self - } - public func setLEDCallback(aCallbackHandler: @escaping (Bool) -> (Void)){ - ledCallbackHandler = aCallbackHandler - } - - public func setButtonCallback(aCallbackHandler: @escaping (Bool) -> (Void)) { - buttonPressHandler = aCallbackHandler - } + // MARK: - Properties - public func removeButtonCallback() { - buttonPressHandler = nil - } + private let centralManager : CBCentralManager + private let basePeripheral : CBPeripheral + public private(set) var advertisedName : String? + public private(set) var RSSI : NSNumber - public func removeLEDCallback() { - ledCallbackHandler = nil + public var delegate: BlinkyDelegate? + + // MARK: - Computed variables + + public var isConnected: Bool { + return basePeripheral.state == .connected } - public func discoverBlinkyServices() { - print("Discovering blinky service") + // MARK: - Characteristic properties + + private var buttonCharacteristic: CBCharacteristic? + private var ledCharacteristic : CBCharacteristic? + + // MARK: - Public API + + /// Creates teh BlinkyPeripheral based on the received peripheral and advertisign data. + /// The device name is obtaied from the advertising data, not from CBPeripheral object + /// to avoid caching problems. + init(withPeripheral peripheral: CBPeripheral, advertisementData advertisementDictionary: [String : Any], andRSSI currentRSSI: NSNumber, using manager: CBCentralManager) { + centralManager = manager + basePeripheral = peripheral + RSSI = currentRSSI + super.init() + advertisedName = parseAdvertisementData(advertisementDictionary) basePeripheral.delegate = self - basePeripheral.discoverServices([BlinkyPeripheral.nordicBlinkyServiceUUID]) } - public func discoverCharacteristicsForBlinkyService(_ aService: CBService) { - basePeripheral.discoverCharacteristics([BlinkyPeripheral.buttonCharacteristicUUID, - BlinkyPeripheral.ledCharacteristicUUID], - for: aService) + /// Connects to the Blinky device. + public func connect() { + centralManager.delegate = self + print("Connecting to Blinky device...") + centralManager.connect(basePeripheral, options: nil) } - public func enableButtonNotifications(_ buttonCharacteristic: CBCharacteristic) { - print("Enabling notifications for button characteristic") - basePeripheral.setNotifyValue(true, for: buttonCharacteristic) + /// Cancels existing or pending connection. + public func disconnect() { + print("Cancelling connection...") + centralManager.cancelPeripheralConnection(basePeripheral) } + // MARK: - Blinky API + + /// Reads value of LED Characteristic. If such characteristic was not + /// found, this method does nothing. If it was found, but does not have + /// read property, the delegate will be notified with isOn = false. public func readLEDValue() { if let ledCharacteristic = ledCharacteristic { - basePeripheral.readValue(for: ledCharacteristic) + if ledCharacteristic.properties.contains(.read) { + print("Reading LED characteristic...") + basePeripheral.readValue(for: ledCharacteristic) + } else { + print("Can't read LED state") + delegate?.ledStateChanged(isOn: false) + } } } + /// Reads value of Button Characteristic. If such characteristic was not + /// found, this method does nothing. If it was found, but does not have + /// read property, the delegate will be notified with isPressed = false. public func readButtonValue() { if let buttonCharacteristic = buttonCharacteristic { - basePeripheral.readValue(for: buttonCharacteristic) + if buttonCharacteristic.properties.contains(.read) { + print("Reading Button characteristic...") + basePeripheral.readValue(for: buttonCharacteristic) + } else { + print("Can't read Button state") + delegate?.buttonStateChanged(isPressed: false) + } } } - - public func didWriteValueToLED(_ aValue: Data) { - print("LED value written \(aValue[0])") - if aValue[0] == 1 { - ledCallbackHandler?(true) - } else { - ledCallbackHandler?(false) - } + + /// Sends a request to turn the LED on. + public func turnOnLED() { + writeLEDCharcateristic(withValue: Data([0x1])) + } + + /// Sends a request to turn the LED off. + public func turnOffLED() { + writeLEDCharcateristic(withValue: Data([0x0])) } - public func didReceiveButtonNotificationWithValue(_ aValue: Data) { - print("Button value changed to: \(aValue[0])") - if aValue[0] == 1 { - buttonPressHandler?(true) + // MARK: - Implementation + + /// Starts service discovery, only for LED Button Service. + private func discoverBlinkyServices() { + print("Discovering LED Button service...") + basePeripheral.delegate = self + basePeripheral.discoverServices([BlinkyPeripheral.nordicBlinkyServiceUUID]) + } + + /// Starts characteristic discovery for LED and Button Characteristics. + private func discoverCharacteristicsForBlinkyService(_ service: CBService) { + print("Discovering LED and Button characteristrics...") + basePeripheral.discoverCharacteristics( + [BlinkyPeripheral.buttonCharacteristicUUID, BlinkyPeripheral.ledCharacteristicUUID], + for: service) + } + + /// Enables notification for given characteristic. + /// If the characteristic does not have notify property, this method will + /// call delegate's blinkyDidConnect method and try to read values + /// of LED and Button. + private func enableNotifications(for characteristic: CBCharacteristic) { + if characteristic.properties.contains(.notify) { + print("Enabling notifications for characteristic...") + basePeripheral.setNotifyValue(true, for: characteristic) } else { - buttonPressHandler?(false) + delegate?.blinkyDidConnect(ledSupported: ledCharacteristic != nil, buttonSupported: true) + readButtonValue() + readLEDValue() } } - public func turnOnLED() { - writeLEDCharcateristicValue(Data([0x1])) + /// Writes the value to the LED characteristic. Acceptable value + /// is 1-byte long, with 0x00 to disable and 0x01 to enable the LED. + /// If there is no LED characteristic, this method does nothing. + /// If the characteristic does not have any of write properties + /// this method also does nothing. + private func writeLEDCharcateristic(withValue value: Data) { + if let ledCharacteristic = ledCharacteristic { + if ledCharacteristic.properties.contains(.write) { + print("Writing LED value (with response)...") + basePeripheral.writeValue(value, for: ledCharacteristic, type: .withResponse) + } else if ledCharacteristic.properties.contains(.writeWithoutResponse) { + print("Writing LED value... (without response)") + basePeripheral.writeValue(value, for: ledCharacteristic, type: .withoutResponse) + // peripheral(_:didWriteValueFor,error) will not be called after write without response + // we are caling the delegate here + didWriteValueToLED(value) + } else { + print("LED Characteristic is not writable") + } + } } - public func turnOffLED() { - writeLEDCharcateristicValue(Data([0x0])) + /// A callback called when the LED value has been written. + private func didWriteValueToLED(_ value: Data) { + print("LED value written \(value[0])") + delegate?.ledStateChanged(isOn: value[0] == 0x1) } - private func writeLEDCharcateristicValue(_ aValue: Data) { - guard let ledCharacteristic = ledCharacteristic else { - print("LED characteristic is not present, nothing to be done") - return - } - basePeripheral.writeValue(aValue, for: ledCharacteristic, type: .withResponse) + /// A callback called when the Button characteristic value has changed. + private func didReceiveButtonNotification(withValue value: Data) { + print("Button value changed to: \(value[0])") + delegate?.buttonStateChanged(isPressed: value[0] == 0x1) } - private func parseAdvertisementData(_ anAdvertisementDictionary: [String : Any]) -> (String?, [CBUUID]?) { + private func parseAdvertisementData(_ advertisementDictionary: [String : Any]) -> String? { var advertisedName: String - var advertisedServices: [CBUUID] - if let name = anAdvertisementDictionary[CBAdvertisementDataLocalNameKey] as? String{ + if let name = advertisementDictionary[CBAdvertisementDataLocalNameKey] as? String{ advertisedName = name } else { - advertisedName = "N/A" - } - if let services = anAdvertisementDictionary[CBAdvertisementDataServiceUUIDsKey] as? [CBUUID] { - advertisedServices = services - } else { - advertisedServices = [CBUUID]() + advertisedName = "Unknown Device".localized } - return (advertisedName, advertisedServices) + return advertisedName } - //MARK: - NSObject protocols + // MARK: - NSObject protocols + override func isEqual(_ object: Any?) -> Bool { if object is BlinkyPeripheral { let peripheralObject = object as! BlinkyPeripheral @@ -150,65 +206,93 @@ class BlinkyPeripheral: NSObject, CBPeripheralDelegate { } } - //MARK: - CBPeripheralDelegate + // MARK: - CBCentralManagerDelegate + + func centralManagerDidUpdateState(_ central: CBCentralManager) { + if central.state != .poweredOn { + print("Central Manager state changed to \(central.state)") + delegate?.blinkyDidDisconnect() + } + } + + func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) { + if peripheral == basePeripheral { + print("Connected to Blinky") + discoverBlinkyServices() + } + } + + func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) { + if peripheral == basePeripheral { + print("Blinky disconnected") + delegate?.blinkyDidDisconnect() + } + } + + // MARK: - CBPeripheralDelegate + func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { if characteristic == buttonCharacteristic { - if let aValue = characteristic.value { - didReceiveButtonNotificationWithValue(aValue) + if let value = characteristic.value { + didReceiveButtonNotification(withValue: value) } } else if characteristic == ledCharacteristic { - if let aValue = characteristic.value { - didWriteValueToLED(aValue) + if let value = characteristic.value { + didWriteValueToLED(value) } } } func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) { - if characteristic.uuid == buttonCharacteristic?.uuid { - print("Notification state is now \(characteristic.isNotifying) for Button characteristic") + if characteristic == buttonCharacteristic { + print("Button notifications enabled") + delegate?.blinkyDidConnect(ledSupported: ledCharacteristic != nil, buttonSupported: buttonCharacteristic != nil) readButtonValue() readLEDValue() - } else { - print("Notification state is now \(characteristic.isNotifying) for an unknown characteristic with UUID: \(characteristic.uuid.uuidString)") } } func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { if let services = peripheral.services { - for aService in services { - if aService.uuid == BlinkyPeripheral.nordicBlinkyServiceUUID { - print("Discovered Blinky service!") + for service in services { + if service.uuid == BlinkyPeripheral.nordicBlinkyServiceUUID { + print("LED Button service found") //Capture and discover all characteristics for the blinky service - blinkyService = aService - discoverCharacteristicsForBlinkyService(blinkyService!) + discoverCharacteristicsForBlinkyService(service) + return } } } + // Blinky service has not been found + delegate?.blinkyDidConnect(ledSupported: false, buttonSupported: false) } func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { - if service == blinkyService { - print("Discovered characteristics for blinky service") - if let characteristics = service.characteristics { - for aCharacteristic in characteristics { - if aCharacteristic.uuid == BlinkyPeripheral.buttonCharacteristicUUID { - print("Discovered Blinky button characteristic") - buttonCharacteristic = aCharacteristic - enableButtonNotifications(buttonCharacteristic!) - } else if aCharacteristic.uuid == BlinkyPeripheral.ledCharacteristicUUID { - print("Discovered Blinky LED characteristic") - ledCharacteristic = aCharacteristic - } + if let characteristics = service.characteristics { + for characteristic in characteristics { + if characteristic.uuid == BlinkyPeripheral.buttonCharacteristicUUID { + print("Button characteristic found") + buttonCharacteristic = characteristic + } else if characteristic.uuid == BlinkyPeripheral.ledCharacteristicUUID { + print("LED characteristic found") + ledCharacteristic = characteristic } } + } + + // If Button caracteristic was found, try to enable notifications on it. + if let buttonCharacteristic = buttonCharacteristic { + enableNotifications(for: buttonCharacteristic) } else { - print("Discovered characteristics for an unnknown service with UUID: \(service.uuid.uuidString)") + // else, notify the delegate and try to read LED state. + delegate?.blinkyDidConnect(ledSupported: ledCharacteristic != nil, buttonSupported: false) + // This method will do nothing if LED characteristics was not found. + readLEDValue() } } func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) { - if characteristic == ledCharacteristic { - peripheral.readValue(for: ledCharacteristic!) - } + // LED value has been written, let's read it to confirm. + readLEDValue() } } diff --git a/nRFBlinky/String+Localization.swift b/nRFBlinky/String+Localization.swift new file mode 100644 index 0000000..d9023c3 --- /dev/null +++ b/nRFBlinky/String+Localization.swift @@ -0,0 +1,21 @@ +// +// String+Localization.swift +// nRFBlinky +// +// Created by Aleksander Nowakowski on 08/02/2019. +// Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +// + +import Foundation + +extension String { + + var localized: String { + return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "") + } + + func localized(withComment:String) -> String { + return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: withComment) + } + +} diff --git a/nRFBlinky/UIColor+Nordic.swift b/nRFBlinky/UIColor+Nordic.swift new file mode 100644 index 0000000..cbf3e9f --- /dev/null +++ b/nRFBlinky/UIColor+Nordic.swift @@ -0,0 +1,17 @@ +// +// UIColor+Nordic.swift +// nRFBlinky +// +// Created by Aleksander Nowakowski on 12/02/2019. +// Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +// + +import UIKit + +extension UIColor { + + static let nordicBlue = #colorLiteral(red: 0, green: 0.7181802392, blue: 0.8448022008, alpha: 1) + + static let nordicRed = #colorLiteral(red: 0.9567440152, green: 0.2853084803, blue: 0.3770255744, alpha: 1) + +} diff --git a/nRFBlinky/ViewControllers/BlinkyView/BlinkyViewController.swift b/nRFBlinky/ViewControllers/BlinkyView/BlinkyViewController.swift index c55c0b5..07dfda9 100644 --- a/nRFBlinky/ViewControllers/BlinkyView/BlinkyViewController.swift +++ b/nRFBlinky/ViewControllers/BlinkyView/BlinkyViewController.swift @@ -9,9 +9,9 @@ import UIKit import CoreBluetooth -class BlinkyViewController: UITableViewController, CBCentralManagerDelegate { +class BlinkyViewController: UITableViewController, BlinkyDelegate { - //MARK: - Outlets and Actions + // MARK: - Outlets and Actions @IBOutlet weak var ledStateLabel: UILabel! @IBOutlet weak var ledToggleSwitch: UISwitch! @@ -21,139 +21,112 @@ class BlinkyViewController: UITableViewController, CBCentralManagerDelegate { handleSwitchValueChange(newValue: ledToggleSwitch.isOn) } - //MARK: - Properties - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } + // MARK: - Properties - private var hapticGenerator : NSObject? //Only available on iOS 10 and above - private var blinkyPeripheral : BlinkyPeripheral! - private var centralManager : CBCentralManager! + private var hapticGenerator: NSObject? // Only available on iOS 10 and above + private var blinkyPeripheral: BlinkyPeripheral! + private var centralManager: CBCentralManager! - //MARK: - Implementation - public func setCentralManager(_ aManager: CBCentralManager) { - centralManager = aManager - centralManager.delegate = self - } + // MARK: - Public API - public func setPeripheral(_ aPeripheral: BlinkyPeripheral) { - let peripheralName = aPeripheral.advertisedName ?? "Unknown Device" - title = peripheralName - blinkyPeripheral = aPeripheral - print("connecting to blinky") - centralManager.connect(blinkyPeripheral.basePeripheral, options: nil) + public func setPeripheral(_ peripheral: BlinkyPeripheral) { + blinkyPeripheral = peripheral + title = peripheral.advertisedName + peripheral.delegate = self } - private func handleSwitchValueChange(newValue isOn: Bool){ - if isOn { - blinkyPeripheral.turnOnLED() - ledStateLabel.text = "ON" - } else { - blinkyPeripheral.turnOffLED() - ledStateLabel.text = "OFF" - } - } - - private func setupDependencies() { - //This will run on iOS 10 or above - //and will generate a tap feedback when the button is tapped on the Dev kit. - prepareHaptics() - - //Set default text to Reading ... - //As soon as peripheral enables notifications the values will be notified - buttonStateLabel.text = "Reading ..." - ledStateLabel.text = "Reading ..." - ledToggleSwitch.isEnabled = false - - print("adding button notification and led write callback handlers") - blinkyPeripheral.setButtonCallback { (isPressed) -> (Void) in - DispatchQueue.main.async { - if isPressed { - self.buttonStateLabel.text = "PRESSED" - } else { - self.buttonStateLabel.text = "RELEASED" - } - self.buttonTapHapticFeedback() - } - } - - blinkyPeripheral.setLEDCallback { (isOn) -> (Void) in - DispatchQueue.main.async { - if !self.ledToggleSwitch.isEnabled { - self.ledToggleSwitch.isEnabled = true - } - - if isOn { - self.ledStateLabel.text = "ON" - if self.ledToggleSwitch.isOn == false { - self.ledToggleSwitch.setOn(true, animated: true) - } - } else { - self.ledStateLabel.text = "OFF" - if self.ledToggleSwitch.isOn == true { - self.ledToggleSwitch.setOn(false, animated: true) - } - } - } - } - } - //MARK: - UITableViewDelegate - override func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool { - return false - } + // MARK: - UIViewController - //MARK: - UIViewController override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - guard blinkyPeripheral.basePeripheral.state != .connected else { - //View is coming back from a swipe, everything is already setup + guard !blinkyPeripheral.isConnected else { + // View is coming back from a swipe, everything is already setup return } - //This is the first time view appears, setup the subviews and dependencies - setupDependencies() + prepareHaptics() + blinkyPeripheral.connect() } override func viewDidDisappear(_ animated: Bool) { - print("removing button notification and led write callback handlers") - blinkyPeripheral.removeLEDCallback() - blinkyPeripheral.removeButtonCallback() - - if blinkyPeripheral.basePeripheral.state == .connected { - centralManager.cancelPeripheralConnection(blinkyPeripheral.basePeripheral) - } + blinkyPeripheral.disconnect() super.viewDidDisappear(animated) } - - //MARK: - CBCentralManagerDelegate - func centralManagerDidUpdateState(_ central: CBCentralManager) { - if central.state != .poweredOn { - dismiss(animated: true, completion: nil) - } - } - - func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) { - if peripheral == blinkyPeripheral.basePeripheral { - print("connected to blinky.") - blinkyPeripheral.discoverBlinkyServices() - } - } - - func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) { - if peripheral == blinkyPeripheral.basePeripheral { - print("blinky disconnected.") - navigationController?.popToRootViewController(animated: true) + + // MARK: - Implementation + + private func handleSwitchValueChange(newValue isOn: Bool){ + if isOn { + blinkyPeripheral.turnOnLED() + ledStateLabel.text = "ON".localized + } else { + blinkyPeripheral.turnOffLED() + ledStateLabel.text = "OFF".localized } } + /// This will run on iOS 10 or above + /// and will generate a tap feedback when the button is tapped on the Dev kit. private func prepareHaptics() { if #available(iOS 10.0, *) { hapticGenerator = UIImpactFeedbackGenerator(style: .heavy) (hapticGenerator as? UIImpactFeedbackGenerator)?.prepare() } } + + /// Generates a tap feedback on iOS 10 or above. private func buttonTapHapticFeedback() { if #available(iOS 10.0, *) { (hapticGenerator as? UIImpactFeedbackGenerator)?.impactOccurred() } } + + // MARK: - Blinky Delegate + + func blinkyDidConnect(ledSupported: Bool, buttonSupported: Bool) { + DispatchQueue.main.async { + self.ledToggleSwitch.isEnabled = ledSupported + + if buttonSupported { + self.buttonStateLabel.text = "Reading...".localized + } + if ledSupported { + self.ledStateLabel.text = "Reading...".localized + } + } + // Not supoprted device? + if !ledSupported && !buttonSupported { + blinkyPeripheral.disconnect() + } + } + + func blinkyDidDisconnect() { + DispatchQueue.main.async { + self.navigationController?.navigationBar.barTintColor = UIColor.nordicRed + self.ledToggleSwitch.onTintColor = UIColor.nordicRed + self.ledToggleSwitch.isEnabled = false + } + } + + func ledStateChanged(isOn: Bool) { + DispatchQueue.main.async { + if isOn { + self.ledStateLabel.text = "ON".localized + self.ledToggleSwitch.setOn(true, animated: true) + } else { + self.ledStateLabel.text = "OFF".localized + self.ledToggleSwitch.setOn(false, animated: true) + } + } + } + + func buttonStateChanged(isPressed: Bool) { + DispatchQueue.main.async { + if isPressed { + self.buttonStateLabel.text = "PRESSED".localized + } else { + self.buttonStateLabel.text = "RELEASED".localized + } + self.buttonTapHapticFeedback() + } + } } diff --git a/nRFBlinky/ViewControllers/RootViewController.swift b/nRFBlinky/ViewControllers/RootViewController.swift index 0588d70..6c393e1 100644 --- a/nRFBlinky/ViewControllers/RootViewController.swift +++ b/nRFBlinky/ViewControllers/RootViewController.swift @@ -9,35 +9,10 @@ import UIKit class RootViewController: UINavigationController { - @IBOutlet var wirelessByNordicView: UIView! + // Make sure the status bar is light in the app. + // The default is set to black, as this one is used in the Launch Screen. override var preferredStatusBarStyle: UIStatusBarStyle { return .lightContent } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - if !view.subviews.contains(wirelessByNordicView) { - view.addSubview(wirelessByNordicView) - wirelessByNordicView.frame = CGRect(x: 0, y: (view.frame.height - wirelessByNordicView.frame.size.height), width: view.frame.width, height: wirelessByNordicView.frame.height) - view.bringSubview(toFront: wirelessByNordicView) - } - } - override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { - super.viewWillTransition(to: size, with: coordinator) - self.wirelessByNordicView.alpha = 0 - if view.subviews.contains(wirelessByNordicView) { - coordinator.animateAlongsideTransition(in: self.view, animation: { (context) in - self.wirelessByNordicView.alpha = 0 - self.wirelessByNordicView.frame = CGRect(x: 0, - y: (context.containerView.frame.size.height - 27), - width: context.containerView.frame.size.width, - height: 27) - }, completion: { (context) in - UIView.animate(withDuration: 0.5, animations: { - self.wirelessByNordicView.alpha = 1 - }) - }) - } - } } diff --git a/nRFBlinky/ViewControllers/ScannerView/BlinkyTableViewCell.swift b/nRFBlinky/ViewControllers/ScannerView/BlinkyTableViewCell.swift index 43c9699..44fec9d 100644 --- a/nRFBlinky/ViewControllers/ScannerView/BlinkyTableViewCell.swift +++ b/nRFBlinky/ViewControllers/ScannerView/BlinkyTableViewCell.swift @@ -10,22 +10,27 @@ import UIKit class BlinkyTableViewCell: UITableViewCell { - static let reuseIdentifier = "blinkyPeripheralCell" - private var lastUpdateTimestamp = Date() + //MARK: - Outlets and Actions + @IBOutlet weak var peripheralName: UILabel! @IBOutlet weak var peripheralRSSIIcon: UIImageView! + + // MARK: - Properties + + static let reuseIdentifier = "blinkyPeripheralCell" + + private var lastUpdateTimestamp = Date() + + // MARK: - Implementation - private var peripheral: BlinkyPeripheral! - - public func setupViewWithPeripheral(_ aPeripheral: BlinkyPeripheral) { - peripheral = aPeripheral + public func setupView(withPeripheral aPeripheral: BlinkyPeripheral) { peripheralName.text = aPeripheral.advertisedName - if peripheral!.RSSI.decimalValue < -60 { + if aPeripheral.RSSI.decimalValue < -60 { peripheralRSSIIcon.image = #imageLiteral(resourceName: "rssi_2") - } else if peripheral!.RSSI.decimalValue < -50 { + } else if aPeripheral.RSSI.decimalValue < -50 { peripheralRSSIIcon.image = #imageLiteral(resourceName: "rssi_3") - } else if peripheral!.RSSI.decimalValue < -30 { + } else if aPeripheral.RSSI.decimalValue < -30 { peripheralRSSIIcon.image = #imageLiteral(resourceName: "rssi_4") } else { peripheralRSSIIcon.image = #imageLiteral(resourceName: "rssi_1") @@ -35,7 +40,7 @@ class BlinkyTableViewCell: UITableViewCell { public func peripheralUpdatedAdvertisementData(_ aPeripheral: BlinkyPeripheral) { if Date().timeIntervalSince(lastUpdateTimestamp) > 1.0 { lastUpdateTimestamp = Date() - setupViewWithPeripheral(aPeripheral) + setupView(withPeripheral: aPeripheral) } } } diff --git a/nRFBlinky/ViewControllers/ScannerView/ScannerTableViewController.swift b/nRFBlinky/ViewControllers/ScannerView/ScannerTableViewController.swift index 7f62613..6ec8e3c 100644 --- a/nRFBlinky/ViewControllers/ScannerView/ScannerTableViewController.swift +++ b/nRFBlinky/ViewControllers/ScannerView/ScannerTableViewController.swift @@ -10,31 +10,50 @@ import UIKit import CoreBluetooth class ScannerTableViewController: UITableViewController, CBCentralManagerDelegate { - @IBOutlet var emptyPeripheralsView: UIView! + + // MARK: - Outlets and Actions + + @IBOutlet weak var emptyPeripheralsView: UIView! @IBOutlet weak var activityIndicator: UIActivityIndicatorView! + // MARK: - Properties + private var centralManager: CBCentralManager! private var discoveredPeripherals = [BlinkyPeripheral]() - private var targetperipheral: BlinkyPeripheral? - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent + + // MARK: - UIViewController + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + discoveredPeripherals.removeAll() + tableView.reloadData() + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + navigationController?.navigationBar.barTintColor = UIColor.nordicBlue + centralManager.delegate = self + if centralManager.state == .poweredOn { + activityIndicator.startAnimating() + centralManager.scanForPeripherals(withServices: [BlinkyPeripheral.nordicBlinkyServiceUUID], + options: [CBCentralManagerScanOptionAllowDuplicatesKey : true]) + } } override func viewDidLoad() { super.viewDidLoad() - centralManager = (((UIApplication.shared.delegate) as? AppDelegate)?.centralManager)! - centralManager.delegate = self + centralManager = CBCentralManager() } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { super.viewWillTransition(to: size, with: coordinator) if view.subviews.contains(emptyPeripheralsView) { coordinator.animate(alongsideTransition: { (context) in - let width = self.emptyPeripheralsView.frame.size.width - let height = self.emptyPeripheralsView.frame.size.height - if context.containerView.frame.size.height > context.containerView.frame.size.width { + let width = self.emptyPeripheralsView.frame.width + let height = self.emptyPeripheralsView.frame.height + if context.containerView.frame.height > context.containerView.frame.width { self.emptyPeripheralsView.frame = CGRect(x: 0, - y: (context.containerView.frame.size.height / 2) - (height / 2), + y: (context.containerView.frame.height / 2) - 180, width: width, height: height) } else { @@ -47,7 +66,8 @@ class ScannerTableViewController: UITableViewController, CBCentralManagerDelegat } } - // MARK: - Table view data source + // MARK: - UITableViewDelegate + override func numberOfSections(in tableView: UITableView) -> Int { return 1 } @@ -63,29 +83,30 @@ class ScannerTableViewController: UITableViewController, CBCentralManagerDelegat override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let aCell = tableView.dequeueReusableCell(withIdentifier: BlinkyTableViewCell.reuseIdentifier, for: indexPath) as! BlinkyTableViewCell - aCell.setupViewWithPeripheral(discoveredPeripherals[indexPath.row]) + let peripheral = discoveredPeripherals[indexPath.row] + aCell.setupView(withPeripheral: peripheral) return aCell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { centralManager.stopScan() activityIndicator.stopAnimating() - targetperipheral = discoveredPeripherals[indexPath.row] tableView.deselectRow(at: indexPath, animated: true) - performSegue(withIdentifier: "PushBlinkyView", sender: nil) + performSegue(withIdentifier: "PushBlinkyView", sender: discoveredPeripherals[indexPath.row]) } // MARK: - CBCentralManagerDelegate - // + func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { - - let newPeripheral = BlinkyPeripheral(withPeripheral: peripheral, advertisementData: advertisementData, andRSSI: RSSI) + let newPeripheral = BlinkyPeripheral(withPeripheral: peripheral, advertisementData: advertisementData, andRSSI: RSSI, using: centralManager) if !discoveredPeripherals.contains(newPeripheral) { discoveredPeripherals.append(newPeripheral) - tableView.reloadData() + tableView.beginUpdates() + tableView.insertRows(at: [IndexPath(row: discoveredPeripherals.count - 1, section: 0)], with: .fade) + tableView.endUpdates() } else { if let index = discoveredPeripherals.index(of: newPeripheral) { - if let aCell = tableView.cellForRow(at: [0,index]) as? BlinkyTableViewCell { + if let aCell = tableView.cellForRow(at: [0, index]) as? BlinkyTableViewCell { aCell.peripheralUpdatedAdvertisementData(newPeripheral) } } @@ -97,32 +118,22 @@ class ScannerTableViewController: UITableViewController, CBCentralManagerDelegat print("Central is not powered on") } else { activityIndicator.startAnimating() - centralManager.scanForPeripherals(withServices: [BlinkyPeripheral.nordicBlinkyServiceUUID], options: [CBCentralManagerScanOptionAllowDuplicatesKey : true]) + centralManager.scanForPeripherals(withServices: [BlinkyPeripheral.nordicBlinkyServiceUUID], + options: [CBCentralManagerScanOptionAllowDuplicatesKey : true]) } } - - // MARK: - UIViewController - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - discoveredPeripherals.removeAll() - tableView.reloadData() - } - override func viewDidAppear(_ animated: Bool) { - super.viewDidDisappear(animated) - centralManager.delegate = self - if centralManager.state == .poweredOn { - activityIndicator.startAnimating() - centralManager.scanForPeripherals(withServices: [BlinkyPeripheral.nordicBlinkyServiceUUID], options: [CBCentralManagerScanOptionAllowDuplicatesKey : true]) - } - } + // MARK: - Implementation private func showEmptyPeripheralsView() { if !view.subviews.contains(emptyPeripheralsView) { view.addSubview(emptyPeripheralsView) emptyPeripheralsView.alpha = 0 - emptyPeripheralsView.frame = CGRect(x: 0, y: (view.frame.height / 2) - (emptyPeripheralsView.frame.size.height / 2), width: view.frame.width, height: emptyPeripheralsView.frame.height) - view.bringSubview(toFront: emptyPeripheralsView) + emptyPeripheralsView.frame = CGRect(x: 0, + y: (view.frame.height / 2) - 180, + width: view.frame.width, + height: emptyPeripheralsView.frame.height) + view.bringSubviewToFront(emptyPeripheralsView) UIView.animate(withDuration: 0.5, animations: { self.emptyPeripheralsView.alpha = 1 }) @@ -133,22 +144,22 @@ class ScannerTableViewController: UITableViewController, CBCentralManagerDelegat if view.subviews.contains(emptyPeripheralsView) { UIView.animate(withDuration: 0.5, animations: { self.emptyPeripheralsView.alpha = 0 - }, completion: { (completed) in + }, completion: { completed in self.emptyPeripheralsView.removeFromSuperview() }) } } // MARK: - Segue and navigation + override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool { return identifier == "PushBlinkyView" } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "PushBlinkyView" { - if let peripheral = targetperipheral { + if let peripheral = sender as? BlinkyPeripheral { let destinationView = segue.destination as! BlinkyViewController - destinationView.setCentralManager(centralManager) destinationView.setPeripheral(peripheral) } } diff --git a/nRFBlinky/de.lproj/Localizable.strings b/nRFBlinky/de.lproj/Localizable.strings new file mode 100644 index 0000000..44131a9 --- /dev/null +++ b/nRFBlinky/de.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Marcus Tacker on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "AN"; +"OFF" = "AUS"; +"PRESSED" = "GEDRÜCKT"; +"RELEASED" = "LOSGELASSEN"; +"Reading..." = "Lese..."; +"Unknown Device" = "Unbekanntes Gerät"; diff --git a/nRFBlinky/de.lproj/Main.strings b/nRFBlinky/de.lproj/Main.strings new file mode 100644 index 0000000..4557158 --- /dev/null +++ b/nRFBlinky/de.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Das Betätigen des Schalters schaltet die LED 3 am Blinky ein bzw. aus."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Betätige den Schalter neben dem Micro-USB-Port um es einzuschalten."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Wenn nicht, verbinde es mit einem Micro-USB-Kabel und einem PC oder einem Ladegerät.
Die Knopfzellen-Batterie befindet sich auf der Unterseite des DevKits."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Stelle sicher, dass es eingeschaltet ist."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "Kannst Du Dein Blinky nicht sehen?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "UNBEKANNT"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Drücken und Loslassen von BUTTON 1 auf dem Blinky zeigt den Zustand des Schalters an dieser Stelle an."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Schalter"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Stelle sicher, dass die Knopfzellenbatterie Spannung hat."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "UNBEKANNT"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/en.lproj/Localizable.strings b/nRFBlinky/en.lproj/Localizable.strings new file mode 100644 index 0000000..8f333d7 --- /dev/null +++ b/nRFBlinky/en.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Aleksander Nowakowski on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ON"; +"OFF" = "OFF"; +"PRESSED" = "PRESSED"; +"RELEASED" = "RELEASED"; +"Reading..." = "Reading..."; +"Unknown Device" = "Unknown Device"; diff --git a/nRFBlinky/en.lproj/Main.strings b/nRFBlinky/en.lproj/Main.strings index d976364..eccab57 100644 --- a/nRFBlinky/en.lproj/Main.strings +++ b/nRFBlinky/en.lproj/Main.strings @@ -5,8 +5,8 @@ /* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ "4YT-Qt-7PG.headerTitle" = "LED"; -/* Class = "UILabel"; text = "Toggle the switch next tot he micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ -"IAE-tV-Psp.text" = "Toggle the switch next tot he micro USB port to switch it on."; +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Toggle the switch next to the micro USB port to switch it on."; /* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ "K05-ZQ-Swb.title" = "Scanner"; @@ -39,7 +39,7 @@ "rmw-BF-cDo.text" = "2. Make sure the coin cell battery has power."; /* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ -"sXe-8K-21Q.text" = "OFF"; +"sXe-8K-21Q.text" = "UNKNOWN"; -/* Class = "UILabel"; text = ""; ObjectID = "ufl-Iw-mhn"; */ -"ufl-Iw-mhn.text" = ""; +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/es.lproj/Localizable.strings b/nRFBlinky/es.lproj/Localizable.strings new file mode 100644 index 0000000..2949399 --- /dev/null +++ b/nRFBlinky/es.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Dinesh Harjani on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ENCENDIDO"; +"OFF" = "APAGADO"; +"PRESSED" = "PULSADO"; +"RELEASED" = "LIBRE"; +"Reading..." = "Leyendo..."; +"Unknown Device" = "Dispositivo Desconocido"; diff --git a/nRFBlinky/es.lproj/Main.strings b/nRFBlinky/es.lproj/Main.strings new file mode 100644 index 0000000..982a77a --- /dev/null +++ b/nRFBlinky/es.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Conmutar el interruptor hará que el LED número 3 en tu periférico Blinky pase a estado ENCENDIDO o APAGADO."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Conmuta el interruptor junto al puerto micro USB para encenderlo."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Escáner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Si no, conéctalo a un PC o cargador utilizando el cable micro USB.
La pila de botón está en la parte inferior de la placa."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Asegúrate de que está encendido."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "¿NO PUEDES VER TU BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "DESCONOCIDO"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Pulsando y liberando el BOTÓN número 1 de tu periférico Blinky actualizará el estado de dicho botón aquí."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Botón"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Asegúrate de que la pila de botón da corriente."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "DESCONOCIDO"; + +/* Class = "UILabel"; text = ""; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/fi.lproj/Localizable.strings b/nRFBlinky/fi.lproj/Localizable.strings new file mode 100644 index 0000000..8eb113e --- /dev/null +++ b/nRFBlinky/fi.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Mikko Lintonen on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "SYTYTÄ"; +"OFF" = "SAMMUTA"; +"PRESSED" = "PAINETTU"; +"RELEASED" = "VAPAUTETTU"; +"Reading..." = "Lukee..."; +"Unknown Device" = "Tuntematon laite"; diff --git a/nRFBlinky/fi.lproj/Main.strings b/nRFBlinky/fi.lproj/Main.strings new file mode 100644 index 0000000..1b063c2 --- /dev/null +++ b/nRFBlinky/fi.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Kytkimen asennon vaihtaminen sytyttää ja sammuttaa Blinky oheislaitteen Ledin 3."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "Ledi"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Micro USB portti käynnistetään vaihtamalla sen vieressä olevan kytkimen tila."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanneri"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Jos ei, niin kytke laite tietokoneeseen tai laturiin micro USB kaapelilla 
 Nappiparisto on dev kitin kääntöpuollle."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Varmista että laite on kytketty päälle."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "Etkö näe BLINKYäsi?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "TUNTEMATON"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Blinky oheislaitteen Napin 1 painaminen ja vapauttaminen päivittää napin tilan täällä."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Nappi"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Tarkista että nappiparistossa on virtaa."; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "TUNTEMATON"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/fr.lproj/Localizable.strings b/nRFBlinky/fr.lproj/Localizable.strings new file mode 100644 index 0000000..31bc17b --- /dev/null +++ b/nRFBlinky/fr.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Leif-Alexandre Aschehoug on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ON"; +"OFF" = "OFF"; +"PRESSED" = "APPUYÉ"; +"RELEASED" = "RELACHÉ"; +"Reading..." = "Lecture en cours..."; +"Unknown Device" = "Appareil Inconnu"; diff --git a/nRFBlinky/fr.lproj/Main.strings b/nRFBlinky/fr.lproj/Main.strings new file mode 100644 index 0000000..cb3cfaa --- /dev/null +++ b/nRFBlinky/fr.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Le basculement de l'interrupteur entraîne l'illumination/extinction de la LED 3 sur le Blinky peripheral"; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Basculez l'interrupteur à côté du port micro USB pour l'allumer."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Sinon, connectez-le à un PC ou un chargeur grâce au câble micro-USB.
Une pile bouton se trouve sur la face inférieure du Dev kit."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Assurez-vous qu'il est allumé."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "VOTRE BLINKY N'EST PAS VISIBLE?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "INCONNU"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Appuyer ou relâcher le BOUTON 1 sur le Blinky peripheral mettra à jour l'état ici."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Bouton"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Assurez-vous que la pile bouton n'est pas déchargée."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "INCONNU"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/it.lproj/Localizable.strings b/nRFBlinky/it.lproj/Localizable.strings new file mode 100644 index 0000000..cfaf05c --- /dev/null +++ b/nRFBlinky/it.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Emanuele Di Santo on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ACCESO"; +"OFF" = "SPENTO"; +"PRESSED" = "PREMUTO"; +"RELEASED" = "ALZATO"; +"Reading..." = "Lettura..."; +"Unknown Device" = "Dispositivo sconosciuto"; diff --git a/nRFBlinky/it.lproj/Main.strings b/nRFBlinky/it.lproj/Main.strings new file mode 100644 index 0000000..8b9a1da --- /dev/null +++ b/nRFBlinky/it.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Attivare l'interruttore farà lampeggiare il LED 3 sul dispositivo Blinky."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Attivare l'interruttore accanto la porta micro USB per accenderlo."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Altrimenti, connetterlo al PC od a un caricatore tramite un cavo micro USB.
La batteria è situata sulla parte inferiore del kit di sviluppo."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Assicurarsi che sia acceso."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "NON RIESCI A VEDERE IL TUO BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "SCONOSCIUTO"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Premere e rilasciare PULSANTE 1 sul dispositivo Blinky aggiornerà lo stato del pulsante mostrato qui."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Pulsante"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Assicurarsi che la batteria sia carica."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "SCONOSCIUTO"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/ko.lproj/Localizable.strings b/nRFBlinky/ko.lproj/Localizable.strings new file mode 100644 index 0000000..5f48b58 --- /dev/null +++ b/nRFBlinky/ko.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Hyojung Seo on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "켜짐"; +"OFF" = "꺼짐"; +"PRESSED" = "활성화됨"; +"RELEASED" = "비활성화됨"; +"Reading..." = "읽는 중..."; +"Unknown Device" = "알 수 없는 기기"; diff --git a/nRFBlinky/ko.lproj/Main.strings b/nRFBlinky/ko.lproj/Main.strings new file mode 100644 index 0000000..e4e4904 --- /dev/null +++ b/nRFBlinky/ko.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "스위치를 전환하면 Blinky 내 LED 3을 끄고 켤 수 있습니다."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "마이크로 USB 포트 옆의 스위치를 전환하세요."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "아니면 PC에 직접 연결 또는 마이크로 USB 케이블을 사용해 충전기에 연결하세요.
Coin cell 배터리는 dev 키트 바닥면에 있습니다."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. 스위치가 켜져 있는지 다시 한 번 확인하세요."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "Blinky를 찾을 수 없습니까?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "알 수 없음"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Blinky 내 Button 1의 활성화 상태를 이곳에서 확인할 수 있습니다"; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Button"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Coin cell의 배터리가 충분한지 확인하세요."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "알 수 없음"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/mr.lproj/Localizable.strings b/nRFBlinky/mr.lproj/Localizable.strings new file mode 100644 index 0000000..7c31282 --- /dev/null +++ b/nRFBlinky/mr.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Omkar Kulkarni on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "चालू"; +"OFF" = "बंद"; +"PRESSED" = "दाबले"; +"RELEASED" = "सोडले"; +"Reading..." = "वाचले जात आहे..."; +"Unknown Device" = "अज्ञात उपकरण"; diff --git a/nRFBlinky/mr.lproj/Main.strings b/nRFBlinky/mr.lproj/Main.strings new file mode 100644 index 0000000..c60438e --- /dev/null +++ b/nRFBlinky/mr.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "कळ दाबल्यास ब्लिंकी परिधीय एल. इ. डी. ३ चालू किंवा बंद करेल."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "एल. इ. डी."; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "चालू करण्यासाठी छोट्या यू. एस. बी. खाचेच्या बाजूची कळ सरकवा."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "क्रमवीक्षक (स्कॅनर)."; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "नाहीतर, त्याला संगणक अथवा यू एस बी चार्जर सोबत तारेने जोडा.
नाण्यासमान विद्युतघट विकास संचाच्या पाठीमागे आहे."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "१. ते चालू आहे याची खात्री करा."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "आपला \"ब्लिंकी\" सपडू शकत नाहीये का?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "एन. आर. एफ़. \"ब्लिंकी\""; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "अज्ञात"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "एन. आर. एफ़. \"ब्लिंकी\""; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "ब्लिंकी परिधीयावरील कळ १ दाबून सोडल्यास येथे कळस्थिती अद्यतनित होइल."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "कळ"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "२. नाण्यासमान विद्युतघटामध्ये पुरेसा विद्युत प्रभार असल्याचे सुनिश्चित करा."; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "अज्ञात"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "नॉर्डिक ब्लिंकी"; diff --git a/nRFBlinky/nb.lproj/Localizable.strings b/nRFBlinky/nb.lproj/Localizable.strings new file mode 100644 index 0000000..f729321 --- /dev/null +++ b/nRFBlinky/nb.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Ketil Erichsen on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. + */ +"ON" = "PÅ"; +"OFF" = "AV"; +"PRESSED" = "NEDTRYKKET"; +"RELEASED" = "INAKTIV"; +"Reading..." = "Leser..."; +"Unknown Device" = "Ukjent Enhet"; diff --git a/nRFBlinky/nb.lproj/Main.strings b/nRFBlinky/nb.lproj/Main.strings new file mode 100644 index 0000000..4eb5489 --- /dev/null +++ b/nRFBlinky/nb.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Klikk på bryteren for å slå LED 3 AV eller PÅ."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Klikk på bryteren ved micro USB tilkoblingen for å slå på."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Skanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Hvis ikke, koble micro USB til en PC eller lader.
Batteriet er på undersiden av utviklingskitet"; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Sørg for at det er slått på."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "KAN DU IKKE SE DIN BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "UKJENT"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Trykk ned og slipp KNAPP 1 på Blinky for å oppdatere tilstanden."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Knapp"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Sørg for at det er strøm i batteriet."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "UKJENT"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/pl.lproj/Localizable.strings b/nRFBlinky/pl.lproj/Localizable.strings new file mode 100644 index 0000000..7036ecb --- /dev/null +++ b/nRFBlinky/pl.lproj/Localizable.strings @@ -0,0 +1,14 @@ +/* + Localizable.strings + nRFBlinky + + Created by Aleksander Nowakowski on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "WŁĄCZONE"; +"OFF" = "WYŁĄCZONE"; +"PRESSED" = "WCIŚNIĘTY"; +"RELEASED" = "ZWOLNIONY"; +"Reading..." = "Pobieranie..."; +"Unknown Device" = "Nieznane urządzenie"; + diff --git a/nRFBlinky/pl.lproj/Main.strings b/nRFBlinky/pl.lproj/Main.strings new file mode 100644 index 0000000..2298e7a --- /dev/null +++ b/nRFBlinky/pl.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Przełączenie włączy lub wyłączy LED 3 na urządzeniu."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Upewnij się, że przełącznik POWER jest w pozycji ON."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Skaner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Jeśli jest, podłącz do źródła prądu przy użyciu kable micro USB.
Bateria znajduje się po spodniej stronie płytki."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Upewnij się, że jest włączone."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "NIE WIDZISZ SWOJEGO BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "NIEZNANY"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Naciskanie i zwalnianie BUTTON 1 na urządzeniu zmieni stan guzika powyżej."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Guzik"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Upewnij się, że bateria nie jest wyczerpana."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "NIEZNANY"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/pt-BR.lproj/Localizable.strings b/nRFBlinky/pt-BR.lproj/Localizable.strings new file mode 100644 index 0000000..1aa8166 --- /dev/null +++ b/nRFBlinky/pt-BR.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Rodrigo Mendes on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "LIGADO"; +"OFF" = "DESLIGADO"; +"PRESSED" = "PRESSIONADO"; +"RELEASED" = "LIBERADO"; +"Reading..." = "Lendo..."; +"Unknown Device" = "Dispositivo desconhecido"; diff --git a/nRFBlinky/pt-BR.lproj/Main.strings b/nRFBlinky/pt-BR.lproj/Main.strings new file mode 100644 index 0000000..6ca8814 --- /dev/null +++ b/nRFBlinky/pt-BR.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Alternando o botão é possível ligar ou desligar o LED 3 do periférico Blinky."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Alterne a chave próxima à porta USB para ligar."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Procurar dispositivos"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Do contrário, conecte-o a um PC ou a um carregador utilizando um cabo micro USB.
A bateria de célula to tipo moeda está localizada na parte de baixo do kit de desenvolvimento."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Certifique-se de que está ligado."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "NÃO CONSEGUE VER O SEU BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "DESCONHECIDO"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Ao pressionar ou soltar o botão 1 no periférico Blinky o estado do botão será atualizado."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Botão"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Certifique-se de que a bateria de célula to tipo moeda está carregada."; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "DESCONHECIDO"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/ro.lproj/Localizable.strings b/nRFBlinky/ro.lproj/Localizable.strings new file mode 100644 index 0000000..2758e4a --- /dev/null +++ b/nRFBlinky/ro.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Remus Barbatei on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "PORNIT"; +"OFF" = "OPRIT"; +"PRESSED" = "APASAT"; +"RELEASED" = "NEAPĂSAT"; +"Reading..." = "Se actualizează starea..."; +"Unknown Device" = "Dispozitiv necunoscut"; diff --git a/nRFBlinky/ro.lproj/Main.strings b/nRFBlinky/ro.lproj/Main.strings new file mode 100644 index 0000000..8178ad9 --- /dev/null +++ b/nRFBlinky/ro.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Comutând întrerupătorul va cauza LED-ul 3 de la perifericul Blinky să fie pornit sau oprit."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Acționează întrerupătorul de lângă conectorul micro USB pentru a porni."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Dacă nu, conectează-l la un calculator sau la un încărcător de telefon folosind cablu micro USB.
Bateria de tip moneda se află pe partea de dedesubt al kit-ului de dezvoltare."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Asigura-te că e pornit."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "NU VEZI BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "NECUNOSCUT"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Apăsând și eliberând BUTTON 1 de la perifericul Blinky va actualiza starea butonului aici."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Buton"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Asigura-te că bateria de tip moneda e încărcată."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "NECUNOSCUT"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/ru.lproj/Localizable.strings b/nRFBlinky/ru.lproj/Localizable.strings new file mode 100644 index 0000000..74899a6 --- /dev/null +++ b/nRFBlinky/ru.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Daryna Akhmedova on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ВКЛЮЧЕНО"; +"OFF" = "ВЫКЛЮЧЕНО"; +"PRESSED" = "НАЖАТА"; +"RELEASED" = "ОТПУЩЕНА"; +"Reading..." = "Чтение..."; +"Unknown Device" = "Неизвестное устройство"; diff --git a/nRFBlinky/ru.lproj/Main.strings b/nRFBlinky/ru.lproj/Main.strings new file mode 100644 index 0000000..bb267cd --- /dev/null +++ b/nRFBlinky/ru.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Изменение позиции переключателя приведет к включению или выключению светодиода 3 на переферийном устройстве Blinky."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "СВЕТОДИОД"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Измените позицию переключателя, который находится рядом с портом micro USB для того, чтобы включить его."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Сканер"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Если нет, то подключите устройство к компьютеру, или к зарядкому устройству, используя кабель micro USB. 
 Таблетка (миниатюрный элемент питания) находится на нижней стороне комплекта разработчика."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Убедитесь, что оно включено."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "НЕ ВИДИТЕ ВАШЕ УСТРОЙСТВО BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "НЕИЗВЕСТНО"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Нажмите и отпустите КНОПКУ 1 на периферийном устройстве Blinky для того, чтобы обновить состояние кнопки."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Кнопка"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Убедитесь, что таблетка (миниатюрный элемент питания) имеет заряд."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "НЕИЗВЕСТНО"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/uk.lproj/Localizable.strings b/nRFBlinky/uk.lproj/Localizable.strings new file mode 100644 index 0000000..c2005d6 --- /dev/null +++ b/nRFBlinky/uk.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Daryna Akhmedova on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "ВВІМКНЕНО"; +"OFF" = "ВИМКНЕНО"; +"PRESSED" = "НАТИСНУТО"; +"RELEASED" = "ВIДПУЩЕНО"; +"Reading..." = "Читання..."; +"Unknown Device" = "Невідомий пристрій"; diff --git a/nRFBlinky/uk.lproj/Main.strings b/nRFBlinky/uk.lproj/Main.strings new file mode 100644 index 0000000..4446fff --- /dev/null +++ b/nRFBlinky/uk.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Зміна позиції перемикача призведе до вмикання або вимикання світлодіода 3 на периферійному пристрої Blinky."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "СВІТЛОДІОД"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Змініть позицію перемикача, який знаходиться поруч з портом micro USB для того, щоб ввімкнути його."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Сканер"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Якщо ні, то підключіть пристрiй до комп'ютера, або до зарядного пристрою, за допомогою кабелю micro USB. 
 Пігулка (мініатюрний елемент живлення) знаходиться на нижньому боці комплекту розробника."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Переконайтеся, що він ввімкнений."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "НЕ БАЧИТЕ ВАШ ПРИСТРІЙ BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "НЕВІДОМО"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Натисніть та відпустіть КНОПКУ 1 на периферійному пристрої Blinky для того, щоб оновити стан кнопки."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Кнопка"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Переконайтеся, що пігулка (мініатюрний елемент живлення) має заряд."; + +/* Class = "UILabel"; text = "OFF"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "НЕВІДОМО"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/vi.lproj/Localizable.strings b/nRFBlinky/vi.lproj/Localizable.strings new file mode 100644 index 0000000..dd47dfb --- /dev/null +++ b/nRFBlinky/vi.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Hung Bui on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "BẬT"; +"OFF" = "TẮT"; +"PRESSED" = "ĐÃ ẤN"; +"RELEASED" = "ĐÃ NHẢ"; +"Reading..." = "Đang đọc..."; +"Unknown Device" = "Thiết bị chưa nhận dạng"; diff --git a/nRFBlinky/vi.lproj/Main.strings b/nRFBlinky/vi.lproj/Main.strings new file mode 100644 index 0000000..8911bf5 --- /dev/null +++ b/nRFBlinky/vi.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "Bật tắt công tắc sẽ bật tắt LED 3 trên board Blinky."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "Bật công tắc cạnh cổng micro USB để bật thiết bị."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "Scanner"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "Nếu không được, hãy kết nối với PC hoặc cục xạc qua cổng micro USB.
Pin cúc áo nằm ở phía dưới của board dev kit."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. Chắc chắn bo mạch đã được bật lên."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "BẠN KHÔNG NHÌN THẤY BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "KHÔNG XÁC ĐỊNH"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "Ấn và nhả BUTTON 1 trên bo mạch Blinky sẽ cập nhật trạng thái của nút bấm trên app."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "Nút bấm"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. Chắc chắn pin cúc áo vẫn còn điện."; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "sXe-8K-21Q"; */ +"sXe-8K-21Q.text" = "KHÔNG XÁC ĐỊNH"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky"; diff --git a/nRFBlinky/zh-Hans.lproj/Localizable.strings b/nRFBlinky/zh-Hans.lproj/Localizable.strings new file mode 100644 index 0000000..0844ece --- /dev/null +++ b/nRFBlinky/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,13 @@ +/* + Localizable.strings + nRFBlinky + + Created by Wei Li on 08/02/2019. + Copyright © 2019 Nordic Semiconductor ASA. All rights reserved. +*/ +"ON" = "开"; +"OFF" = "关"; +"PRESSED" = "按下"; +"RELEASED" = "释放"; +"Reading..." = "读取..."; +"Unknown Device" = "未知设备"; diff --git a/nRFBlinky/zh-Hans.lproj/Main.strings b/nRFBlinky/zh-Hans.lproj/Main.strings new file mode 100644 index 0000000..7f55781 --- /dev/null +++ b/nRFBlinky/zh-Hans.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UITableViewSection"; footerTitle = "Toggling the switch will cause LED 3 on the Blinky peripheral to turn ON or OFF."; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.footerTitle" = "滑动开关将打开或关闭Blinky设备的3号LED灯."; + +/* Class = "UITableViewSection"; headerTitle = "LED"; ObjectID = "4YT-Qt-7PG"; */ +"4YT-Qt-7PG.headerTitle" = "LED"; + +/* Class = "UILabel"; text = "Toggle the switch next to the micro USB port to switch it on."; ObjectID = "IAE-tV-Psp"; */ +"IAE-tV-Psp.text" = "使用Micro USB端口旁的开关将设备打开."; + +/* Class = "UIBarButtonItem"; title = "Scanner"; ObjectID = "K05-ZQ-Swb"; */ +"K05-ZQ-Swb.title" = "扫描"; + +/* Class = "UILabel"; text = "If not, connect it to a PC or a charger using a micro USB cable.
Coin cell battery is on the bottom side of the dev kit."; ObjectID = "MCd-9i-lIO"; */ +"MCd-9i-lIO.text" = "如果开发板不工作, 请用Micro USB电缆将设备连接至PC或是Micro USB充电器.
纽扣电池位于开发板的底部."; + +/* Class = "UILabel"; text = "1. Make sure it's switched on."; ObjectID = "bcI-yv-RmI"; */ +"bcI-yv-RmI.text" = "1. 确定设备已经开启."; + +/* Class = "UILabel"; text = "CAN'T SEE YOUR BLINKY?"; ObjectID = "eor-wV-hOm"; */ +"eor-wV-hOm.text" = "没有发现 BLINKY?"; + +/* Class = "UINavigationItem"; title = "nRF Blinky"; ObjectID = "mCo-A8-H1i"; */ +"mCo-A8-H1i.title" = "nRF Blinky"; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "oaQ-Ex-coH"; */ +"oaQ-Ex-coH.text" = "未知状态"; + +/* Class = "UITableViewController"; title = "nRF Blinky"; ObjectID = "pK8-7d-htc"; */ +"pK8-7d-htc.title" = "nRF Blinky"; + +/* Class = "UITableViewSection"; footerTitle = "Pressing and releasing BUTTON 1 on the Blinky peripheral will update the button state here."; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.footerTitle" = "按下并释放Blinky设备的按钮1将更新此按钮状态."; + +/* Class = "UITableViewSection"; headerTitle = "Button"; ObjectID = "qKS-C3-Jkd"; */ +"qKS-C3-Jkd.headerTitle" = "按钮"; + +/* Class = "UILabel"; text = "2. Make sure the coin cell battery has power."; ObjectID = "rmw-BF-cDo"; */ +"rmw-BF-cDo.text" = "2. 确定电池还有剩余电量."; + +/* Class = "UILabel"; text = "UNKNOWN"; ObjectID = "sXe-8K-21Q"; */ +"oaQ-Ex-coH.text" = "未知状态"; + +/* Class = "UILabel"; text = "Nordic Blinky"; ObjectID = "ufl-Iw-mhn"; */ +"ufl-Iw-mhn.text" = "Nordic Blinky";