Upgrade to Pro — share decks privately, control downloads, hide ads and more …

XcodeGen超入門

giginet
January 21, 2020

 XcodeGen超入門

try! Swift Tokyo 2020 Meetup!!
https://tryswifttokyo.connpass.com/event/160481/

giginet

January 21, 2020
Tweet

More Decks by giginet

Other Decks in Technology

Transcript

  1. $ xcodegen Loaded project: Name: MyApp Targets: MyApp: iOS application

    Schemes: MyApp ⚙ Generating project... ⚙ Writing project... Created project at MyApp.xcodeproj
  2. XcodeGenࣄྫ • 2018/11 XcodeGenΛಋೖ • 2019/4 XcodeGen঺հهࣄΛॻ͍ͨ • 2019/9 XcodeGenίϛολʔʹ

    XcodeGenʹΑΔ৽࣌୅ͷiOSϓϩδΣΫτ؅ཧ - ΫοΫύου։ ൃऀϒϩά https://techlife.cookpad.com/entry/2019/04/26/110000
  3. Project Spec • ϓϩδΣΫτͷఆٛϑΝΠϧʢproject.ymlʣ • هड़ํ๏͸υΩϡϝϯτ XcodeGen/ProjectSpec.md at master ·

    yonaskolb/XcodeGen https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ ProjectSpec.md
  4. options: deploymentTarget: iOS: "12.0" name: MyApp targets: MyFramework: sources: MyFramework

    platform: iOS type: framework sources: MyFramework MyApp: type: application platform: iOS sources: MyApp settings: base: INFOPLIST_FILE: MyApp/Info.plist PRODUCT_BUNDLE_IDENTIFIER: com.myapp Debug: GCC_PREPROCESSOR_DEFINITIONS: DEBUG=1 dependencies: - target: MyFramework
  5. Target Template • ςϯϓϨʔτ͔ΒλʔήοτΛෳ੡Ͱ͖Δ • ϚϧνϞδϡʔϧԽͳͲʹศརɹ targetTemplates: Framework: platform: iOS

    type: framework sources: - ${frameworkName} targets: MyFramework: templates: - Framework templateAttributes: frameworkName: AwesomeFramework
  6. CocoaPodsΛ࢖͍͍ͨͰ͢ • xcodegenͰੜ੒͔ͯ͠Β pod install ͠·͠ΐ͏ • CocoaPods͸ *.xcodeproj ΛݩʹઃఆΛ஫ೖͯ͠

    *.xcworkspaceΛੜ੒͢ΔͨΊɺຖճ࣮ߦ͕ඞཁ • Shell ScriptͳͲͰbootstrapͷखஈΛ༻ҙ͓ͯ͘͠ $ xcodegen $ pod install