Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

● ❌❌❌ ❌❌❌ ● ●

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

● ● ● ●

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

⏲ ☕

Slide 7

Slide 7 text

● ⏲ ● ●

Slide 8

Slide 8 text

● ● Cmd + Shift + K ● ● ⏲ ● ● $ rm -rf ~/Library/Developer/Xcode/DerivedData ● ● ⏲ ●

Slide 9

Slide 9 text

● ● ● ●

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

● ● ● ● ●

Slide 14

Slide 14 text

● ● ● ● ●

Slide 15

Slide 15 text

Slide 16

Slide 16 text

Slide 17

Slide 17 text

Slide 18

Slide 18 text

● ● ●

Slide 19

Slide 19 text

● ● ● ○ ○ ○ ○ ○ ○

Slide 20

Slide 20 text

● ● ● //Pods:AppDevKit ● // ● // : ● :

Slide 21

Slide 21 text

● ● BUCK

Slide 22

Slide 22 text

● ○ ○

Slide 23

Slide 23 text

● ● ● ● $ buck build --config cache.mode=dir //project/somewhere

Slide 24

Slide 24 text

● ○ /artifacts/key/{key} ○ /artifacts/key ☁ PUT GET GET

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

● ○ ○ ● ○ ● ● ○ ○

Slide 27

Slide 27 text

● .buckconfig ● BUCK

Slide 28

Slide 28 text

● [cxx] [swift] [apple]

Slide 29

Slide 29 text

[cxx] default_platform = iphonesimulator-x86_64 cflags = -g -fmodules -fobjc-arc cxxflags = -fobjc-arc -std=c++14 combind_preprecess_and_compile = true pch_enabled = false [swift] compiler_flags = -whole-module-optimization use_filelist = true

Slide 30

Slide 30 text

[apple] use_swift_delegate = false use_header_maps_in_xcode = false generate_missing_umbrella_headers = true iphonesimulator_target_sdk_version = 11.0 iphoneos_target_sdk_version = 11.0 provisioning_profile_read_command = security cms -Di xctool_default_destination_specifier = platform=iOS Simulator,OS=latest xctool_path = tools/xctool/bin/xctool

Slide 31

Slide 31 text

● apple_package apple_bundle apple_binary apple_library apple_resource apple_asset_catalog apple_resource apple_asset_catalog

Slide 32

Slide 32 text

● ● ● ● ○ //App: $project_root/App apple_asset_catelog( name = “QCourseAssets”, visibility = [ “//App:”, ], app_icon = “AppIcon”, dirs = [ “Assets.xcassets” ] )

Slide 33

Slide 33 text

● ● glob apple_resource( name = “QCourseResource”, visibility = [“ “//App:”, ”], files = glob([“**/*.storyboard”]) )

Slide 34

Slide 34 text

● ● srcs ● ● ● apple_binary( name = “QCourseAppBinary”, visibility: [ “//App:”, “//App/...” ], swift_version = “5”, configs = app_binary_config(“QCourse”), srcs = [ “AppDelegate.swift”, “ViewController.swift”, ], deps: [ “:QCourseAppResource”, “:QCourseAssets” ] )

Slide 35

Slide 35 text

● ○ IPHONEOS_DEPLOYMENT_TARGET ○ SDKROOT ○ GCC_OPTIMIZATION_LEVEL ○ DEVELOPMENT_LANGUAGE ○ PRODUCT_BUNDLE_IDENTIFIER ○ ...

Slide 36

Slide 36 text

● def app_binary_config(name): conifg = { IPHONEOS_DEPLOYMENT_TARGET : “11.0”, PRODUCT_BUNDLE_IDENTIFIER: bundle_identifier(name), ... } # do something return { “Debug”: config, “Profile”: config, “Release”: config }

Slide 37

Slide 37 text

● BUCK load(‘utils.bzl’, ‘app_binary_config’) apple_binary( ... conifg = app_binary_config(“QCourse”), ... )

Slide 38

Slide 38 text

● srcs ● headers ● bridging_header apple_binary( ... srcs = [ "GeoUtils.m", ], bridging_header = "QCourse-Bridging-Header.h", headers = [ "GeoUtils.h" ], ... )

Slide 39

Slide 39 text

● ● info.plist apple_bundle( name = "QCourse", visibility = ["//App:"], extension = "app", binary = ":QCourseAppBinary", product_name = "QCourseApp", info_plist = "Info.plist", info_plist_substitutions = info_plist_substitutions("QCourseApp"), )

Slide 40

Slide 40 text

● ● apple_bundle ● apple_package( name = "QCoursePackage", bundle = ":QCourse" )

Slide 41

Slide 41 text

BUCK

Slide 42

Slide 42 text

● $ buck build //App:QCourse ● $ buck build //App:QCoursePackage ● $ buck install //App:QCourse --run --simulator-name ‘iPhone Xs’ ● /buck-out

Slide 43

Slide 43 text

● cache .buckconfig [cache] mode = http http_url = http://buck-cache.i0S.app:9527 cache_mode = readwrite ●

Slide 44

Slide 44 text

● ● integerate_targets false ● BUCK platform :ios, '11.0' install! 'cocoapods', integrate_targets: false target 'QCourse' do pod 'AppDevKit/AppDevCommonKit' end

Slide 45

Slide 45 text

● apple_libiary() ● modular True ● exported_headers ● srcs ● apple_library( name = “AppDevKit”, visibility = [“PUBLIC”], modular = True, exported_headers = glob([“AppDevKit/**/*.h”]), srcs = glob([“AppDevKit/**/*.m”]), configs = library_configs(), )

Slide 46

Slide 46 text

● prebuilt_apple_framework( name = "AFNetworking", framework = "Build/iOS/AFNetworking.framework", preferred_linkage = "shared", visibility = ["PUBLIC"], )

Slide 47

Slide 47 text

● BCUK ● BUCK apple_binary( name = “QCourseAppBinary”, deps: [ “:QCourseAppResource”, “:QCourseAssets”, # Pods “//Pods:AppDevKit”, ] )

Slide 48

Slide 48 text

● ● apple_bundle( ... test: [ “:QCourseUnitTest”, ]. ) apple_test( name = “QCourseUnitTest”, visibility = [“PUBLIC”], info_plist = “UnitTests/Info.plist”, info_plist_substitutions = { … }, is_ui_test = False, frameworks = [ “$PLATFORM_DIR/Developer/Library/Fram eworks/XCTest.framework" ], srcs = [“UnitTests/QCourseTests.swift”] )

Slide 49

Slide 49 text

● ● ○ ○ ○ ● ● ○ ○

Slide 50

Slide 50 text

● ● src_target $ buck project //App:QCourseWorkspace xcode_workspace_config( name = "QCourseWorkspace", workspace_name = "QCourse", src_target = ":QCourse", )

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

● ● ●

Slide 53

Slide 53 text

● ● ● ●

Slide 54

Slide 54 text

● ○ ● ● ●

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

● ● ● ●

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

● ○ ● ○

Slide 60

Slide 60 text

● ● ○ ● ● ●