wantedly / ios_night

Let's talk about iOS development -- iOS Night 📱🌙 You might apply to this meetup from
https://www.wantedly.com/companies/wantedly/projects
18 stars 0 forks source link

2019/05/07 19:00~20:00 #48

Closed ngtk closed 5 years ago

ngtk commented 5 years ago

Why

Where

Pearl Jam (Subject to change)

5F, MG Shirokanedai Building (Wantedly, Inc. Tokyo HQ)

Who

You are working for Wantedly? Sure, you can join anytime. If not, you need to contact us first. Or, you can "want to visit" the meetup, which you can find in www.wantedly.com/companies/wantedly/projects.

What

You write topics like below contents and we talk about these on the meetup.

Also, you can find new topics from the newsletters:

How

         ・・・

開催までに話したいことをコメントしましょう。 より多くの学びを得るためにどんな内容でもアウトプットを歓迎します!😊

cc/ @wantedly/ios

Edit this template

hiranodept commented 5 years ago

BitriseのCacheについて

最近ちゃんとテストがBitriseで走るようになった 🎉(遅い 💦) でも、各ブランチのテストのビルドに30min強かかってる 😨 一番の原因は、新しいブランチをpushした場合にはcacheが効かず 毎回Carthage bootstrapまたはpod installがBitrise上で走っていた

スクリーンショット 2019-04-25 11 36 43

もともとBitriseのstep Cache:PushCache:Pull というキャッシュ機能を使っていた

image https://blog.bitrise.io/2-5x-faster-cache-steps-update-now

🎉 新しいブランチでもcacheを効かせる方法があった

ちゃんとドキュメントを読んでみた

If a build runs on a branch which doesn’t have a cache yet, 
it’ll get the cache of the main/default branch

https://devcenter.bitrise.io/caching/about-caching/

つまりBitraise/Settingsのdefault branchをmasterではなくメインの作業ブランチ(例えばdevelopとか)に設定しておけば、新しいブランチも毎回cacheが効くようになった 🎉🎉🎉

スクリーンショット 2019-04-25 11 46 59

※ 他のチームに迷惑をかけないよう心がけます 🙇

kubode commented 5 years ago

めっちゃ改善されてる 👀 ちなみにAndroidはキャッシュすると逆に遅くなるのでキャッシュ切ってたりします。 ライブラリがバイナリで配布されるからコンパイルが不要って点が違うので、CarthageのバイナリをGit管理するならキャッシュいらなくなるかもしれないですね。

ShotaKashihara commented 5 years ago

ほんと助かりました! 感謝 @hiranodept

すべてのCarthage のライブラリ公開元がちゃんとバイナリもサポートして --no-use-binary をつけなくてもいい世界になったらいいのにな

ShotaKashihara commented 5 years ago

怪しいやつ定期

Kotlin Xcode Plugin

https://github.com/touchlab/xcode-kotlin

https://medium.com/@kpgalligan/kotlin-xcode-plugin-64f52ff8dc2a

Live Demo(見てない): https://zoom.us/recording/play/NU6FdGAHeaDTsoYhLR5t39Zbx3Wx5uKPYVBfCwKlKNARZoH8xwGoo9CUb-5-7RPt?continueMode=true&startTime=1556305716000&autoplay=true

ShotaKashihara commented 5 years ago

Move Relays to separate framework - RxRelay · Issue #1924 · ReactiveX/RxSwift · GitHub

https://github.com/ReactiveX/RxSwift/pull/1924

ngtk commented 5 years ago

Practice for generating accessibility identifiers

Regarding this topic https://github.com/wantedly/ios_night/issues/47#issuecomment-485722103, I've tried that. but, I have faced some problems:

So, I've solved these problems with the below code:


import UIKit

/**
 `Accessible` provides the way to find the element by a consistent name
 in UI tests.
 `generateAccessibilityIdentifiers()` creates the identifier that forms
 the combination of the class name and the property name that is styled
 like "ClassName.propertyName" and sets it to `accessibilityIdentifier`
 to each property that is UIView.
 e.g.
 - `WelcomeViewController.view`
 - `WelcomeViewController.buttonStackView`
 You can conform `Accessible` to your custom `UIViewController` or `UIView`
 and call `generateAccessibilityIdentifiers()` after all view properties
 are initalized like in the last line of `viewDidLoad()` or an initalizer.
**/

public protocol Accessible {
    func generateAccessibilityIdentifiers()
}

public extension Accessible where Self: NSObject {
    func generateAccessibilityIdentifiers() {
        #if DEBUG
            let mirror = Mirror(reflecting: self)
            generateAccessibilityIdentifiers(mirror)
        #endif
    }

    private func generateAccessibilityIdentifiers(_ mirror: Mirror) {
        // If it has no children, we treat the object as objc implementation.
        if mirror.children.isEmpty {
            generateAccessibilityIdentifiersForObjc(mirror)
        } else {
            for child in mirror.children {
                generateAccessibilityIdentifier(for: child)
            }
        }

        if let superclassMirror = mirror.superclassMirror {
            generateAccessibilityIdentifiers(superclassMirror)
        }
    }

    private func generateAccessibilityIdentifier(for child: Mirror.Child) {
        guard let view = child.value as? UIView else { return }
        guard let label = child.label else { return }

        let property = label.replacingOccurrences(of: ".storage", with: "")
        view.accessibilityIdentifier = "\(type(of: self)).\(property)"
    }

    private func generateAccessibilityIdentifiersForObjc(_ mirror: Mirror) {
        var outCount: UInt32 = 0
        guard let properties = class_copyPropertyList(mirror.subjectType as? AnyClass, &outCount) else { return }

        // swiftlint:disable:next identifier_name
        for i: UInt32 in 0 ..< outCount {
            let property = properties[Int(i)]
            let ignoreProperties = [
                "window", // Weak referenced as the property of a view controller.
                "viewIfLoaded", // `view` has been overridden by this property.
            ]
            if
                let name = property.name(),
                !ignoreProperties.contains(name),
                property.type() is UIView.Type,
                let view = value(forKey: name) as? UIView {
                view.accessibilityIdentifier = "\(type(of: self)).\(name)"
            }
        }
    }
}

private extension objc_property_t {
    func name() -> String? {
        return String(cString: property_getName(self), encoding: .utf8)
    }

    func type() -> AnyClass? {
        guard let attributes = String(cString: property_getAttributes(self)!, encoding: .utf8)
        else { return nil }
        guard let regexp = try? NSRegularExpression(pattern: "T@\"(.*)\"", options: []) else { return nil }

        guard let result = regexp.firstMatch(
            in: attributes,
            options: [],
            range: NSRange(location: 0, length: attributes.count)
        ) else { return nil }

        let range = result.range(at: 1)
        let className = attributes[range]
        return NSClassFromString(className)
    }
}

https://github.com/wantedly/visit-ios/pull/2147

takashings commented 5 years ago

"iOSDC Japan 2019" coming this summer!!

https://blog.iosdc.jp/2019/05/07/2019-launched/

今年の日程は調整中ですが今のところ9月上旬の2.5日開催を予定しています。

hiranodept commented 5 years ago

「iOS 13」の更なる詳細が明らかに

https://taisy0.com/2019/05/06/109964.html

ダークモード用のデザインが必要になるのか?

takashings commented 5 years ago

「watchOS 6」の一部詳細が明らかに

https://taisy0.com/2019/05/06/109952.html

jiro commented 5 years ago

From Animoji to TestFlight: Apple's four WWDC images are bursting with app icons

WWDCの4つの画像の意図の考察

https://appleinsider.com/articles/19/03/15/from-animoji-to-testflight-apples-four-wwdc-invitations-are-bursting-with-app-icons