ipaファイルを作成する準備として Provisioning Profileを最新版へアップデートする方法
Xcode => Preferences…
左欄のアカウントを選択
右下の View Details… ボタンを押す
Provisioning Profile の右の [Download]ボタンを押す
ipaファイルを作成する準備として Provisioning Profileを最新版へアップデートする方法
Xcode => Preferences…
左欄のアカウントを選択
右下の View Details… ボタンを押す
Provisioning Profile の右の [Download]ボタンを押す
|
1 2 3 4 5 6 7 8 9 10 11 12 |
InetAddress getBroadcastAddress() throws IOException { WifiManager wifi = (WifiManager)this.context.getSystemService(Context.WIFI_SERVICE); DhcpInfo dhcp = wifi.getDhcpInfo(); // handle null somehow int broadcast = (dhcp.ipAddress & dhcp.netmask) | ~dhcp.netmask; byte[] quads = new byte[4]; for (int k = 0; k < 4; k++) quads[k] = (byte) ((broadcast >> k * 8) & 0xFF); return InetAddress.getByAddress(quads); } |
| S0 | 通常稼働時 |
|---|---|
| S1 | CPUがクロックオフ |
| S2 | CPUに給電中止 |
| S3 | メモリ以外の給電停止。いわゆるスリープ |
| S4 | メモリの内容をHDDに写し電源断。いわゆるハイバネーションや休止状態 |
| S5 | OSをシャットダウンして電源断 |
|
1 |
$ git log 69bac23..87ded2d |
コミット 69bac23 は、範囲に含まれ『ない』
|
1 2 3 4 |
class SomeSingletonClass: NSObject { private init() { 省略 } static let sharedInstance = SomeSingletonClass() } |
|
1 |
var someSingletonInstance : SomeSingletonClass = SomeSingletonClass.sharedInstance |
structを使うのは古いコーディングスタイル。代わりにstatic let構文を使う。static func getSharedInstance() メソッドを使うのは、さらに古いコーディングスタイル。
Swift 3
|
1 2 3 |
CGFloat.leastNormalMagnitude // min, 2.2250738585072e-308 CGFloat.leastNonzeroMagnitude // min, 4.94065645841247e-324 CGFloat.greatestFiniteMagnitude // max, 1.79769313486232e+308 |
|
1 2 3 |
Float.leastNormalMagnitude Float.leastNonzeroMagnitude Float.greatestFiniteMagnitude |
|
1 2 3 |
Double.leastNormalMagnitude Double.leastNonzeroMagnitude Double.greatestFiniteMagnitude |
XcodeのユニットテストXCTestのビルドにおいて "Use of unresolved identifier xxxx " とエラーが表示される。
テスト対象のモジュールがイントートされていない。
@testable import xxxxx をテストコードに追記する
xxxTest.swift
|
1 2 3 4 5 6 |
import XCTest + @testable import MyTargetModule class xxxTest: XCTestCase { ... |
|
1 2 3 |
$ git checkout -b branch_xxx $ git push origin branch_xxx |