TL;DR ①Info.plist にはパラメータとして設定する ②実態はBuild Configurationにて記載する 実際に設定する Build Configurationの設定 [Project]->[Add UserDenined Settings]を選択 任意のプロパティ名を設定 info.plistの設定 最後にinfo.plistに先ほどの…
はじめに Bot Framework Composerが新たにプレビューででてきたので、試してみた。 ChatBotをGUIで作れるらしい。Previewなので注意。 リポジトリ https://github.com/microsoft/BotFramework-Composer 説明など https://github.com/microsoft/BotFramework-…
症状 オーディオ設定のマイクは反応している SkypeやSiriなどでマイクが一切反応しない NVRAM CSMやSMCのリセットをしたが治らない com.apple.assistant.plistを削除したが治らない 対処法 「Audio MIDI 設定」開く 内蔵マイクを選択 フォーマットを4ch から…
English version is below https://hopita.hatenablog.com/entry/2019/01/03/225756 はじめに JupyterNotebookで背景を黒色にしたとき、matplotlibでグラフを描画したら目盛りが見ずらくなってしまいました。 そこで、Pythonのmatplotlibでグラフを描画する…
Introduction This article shows how to change a color of measurement labels in matplotlib. Solution It's a simply way to change a color of measurement labels. import matplotlib.pyplot as plt ax = plt.subplot(111) for item in ax.get_xtickla…
Introduction This article shows how to use "CaseIterable" protocol which introduced in Swift4.2. This protocol can provede all values of enum type. So, I do not need to implement such a property any more. Before Swift4.2 In Swift4.1 or ear…
English version below https://hopita.hatenablog.com/entry/2019/01/02/195204 はじめに オブジェクトの状態を定義など、いろいろと便利な列挙型Enumですが、この度Swift4.2で新しい機能が追加されていました。 この記事にはSwift 4.2からの新機能、列挙型…
Introduction This article shows how to solve the build error related with "CommonCrypto" on Xcode10. After updating the Xcode to version10, I faced on the error messages as below. The CommonCrypto was imported by cocoapods in my case. Rede…
Introduction This article shows how to connect to localhost on Mac from iPhone and some tips. Conditions Mac and iPhone is on the same network. How to connect it Set up the localhost server on a mac Confirm the access to the "localhost:{Po…
English version below https://hopita.hatenablog.com/entry/2018/09/30/154646?_ga=2.108892930.1252126168.1538288528-147310722.1524970173 はじめに Macでテスト用サーバーを立ててiPhoneから簡易的に試したいときのTipsです。 前提 MacとiPhoneは同一…
English version below https://hopita.hatenablog.com/entry/2018/09/30/154646 はじめに Xcode10来ましたね。 早速アップデートしてみると次のようなエラー。 CocoaPodsとかで、モジュールをプロジェクトに組み込んでいると出会いやすいっぽいです。 Redef…
Introduction This article shows how to change a language settings while debugging on the devices. This method is useful for confirming the localized String or text including line breaks. It won't need to change the language from settings a…
English version is below. https://hopita.hatenablog.com/entry/2018/09/12/220856 はじめに 実機でデバッグ時に言語設定したい。 ローカライズがきちんとできているか、改行が正しくできているかなど確認するときに便利な方法です。 いちいちデバイス言語…
English version below https://hopita.hatenablog.com/entry/2018/09/09/091925 はじめに UIPageViewControllerを早送りしたときに次のようなエラーが出ました。 Unbalanced calls to begin/end appearance transitions for そのときのコードはこんな感じで…
Introduction When I tried to transition some pages so rapidly. The Xcode shows an error message as below. Unbalanced calls to begin/end appearance transitions for The code is below. class MyPageViewController: UIPageViewController { var ma…
Introduction It was difficult and complexity to set the autolayout programatically when the AutoLyaout announced in iOS NSLayoutConstraint(item: button, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leadingMargin, …
English version below https://hopita.hatenablog.com/entry/2018/09/06/204428 はじめに AutoLayoutが発表された当初、AutoLayoutをコードから設定するのは面倒でした。 NSLayoutConstraint(item: button, attribute: .leading, relatedBy: .equal, toItem…
Solution let board = UIPasteboard.general board.string = "ABC"
解決方法 ものすごく簡単です。 let board = UIPasteboard.general board.string = "あいうえお"
Introdution This article show the basically usage of Decodable Protocol. What's the Decodable The Decodable give us an easy way to convert the JSON Data type to Class or Struct. Thanks for the Decoable protocol, developer could access each…
English version below https://hopita.hatenablog.com/entry/2018/09/02/110756 はじめに 今回はSwift4 で追加されたDecodableの使い方について紹介します。 Decodableとは API Requestなどで返ってくるJSONのData型を任意のクラスや構造体に変換する際に便…
Introduction This article shows how to wait for an async procedure like API Request or some closure. Solution It is easy to wait an async procedure using "expectation" Sample Code let request = SomeRequest() let expect = expectation(descri…
English version below https://hopita.hatenablog.com/entry/2018/09/01/110533 はじめに タイトル通りです。 APIRequestなどXCTestで疎通確認をした際に、非同期処理の完了を待ちたいことはよくあります。 その方法を簡単に紹介 解決方法 expectationを使…
Introduction This article shows how to solve the error message about “Module was not compiled for testing” on XCTest code. The module was installed by Carthage. Background When I try to do my test code on the XCTest, sometimes I would like…
English version below https://hopita.hatenablog.com/entry/2018/08/29/202132 はじめに XCTestでユニットテストを実行し用としたときにぶつかった問題です。 Carthageでモジュールを導入し、ユニットテストでそのモジュールを使用するときに少しつまづき…
English version below https://hopita.hatenablog.com/entry/2018/08/27/210911 はじめに ForEach文でIndex番号が欲しいことはよくあるので、備忘録です。 解決方法 enumerated()メソッドを利用する for (index, value) in someArray.enumarated() { // な…
Introduction This article shows how to get an index in for each sentence. Solution Using enumarated method. You can get the index of array for (index, value) in someArray.enumarated() { // do something }
Introduction This article shows how to edit a view in debug mode by LLDB Console. Preparation First of all, Build an app on a simulator or device and open the [Debug View Hierarchy] In this article, I'll show you how to change an informati…
English version below. https://hopita.hatenablog.com/entry/2018/08/25/201940 はじめに UIViewControllerにおいて、アプリがバックグラウンドなったときやバックグラウンドに戻ってきたときに処理を行いことはよくあります。 今回はそのやり方を紹介した…
Introduction This article shows hot to detect an entering background and activating from background in UIViewController. Solution As you know, UIViewController doesn't have a delegate which is called when it will go background and come bac…