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

XCFrameworksやってみた

 XCFrameworksやってみた

Teruki-Nakano

June 18, 2019
Tweet

More Decks by Teruki-Nakano

Other Decks in Technology

Transcript

  1. 9$'SBNFXPSLT΍ͬͯΈͨ
    5JNFST.FFUVQd88%$"GUFS1BSUZd

    View full-size slide

  2. ࣗݾ঺հ
    w OBNFͳ͔ͷ !OLBOP@U

    w GPPE
    ࠓ೔ͷϥϯν͸͠ΌͿ͠ΌͿ

    w IPCCZ4QMBUPPO

    View full-size slide

  3. "HFOEB
    w9$'SBNF8PSL֓ཁ
    w9$'SBNF8PSLͷ࡞੒
    w·ͱΊ ͱ͓·͚

    View full-size slide

  4. 9$'SBNF8PSLT֓ཁ

    View full-size slide

  5. w 9DPEFͰ௥Ճ͞ΕΔϥΠϒϥϦɾϑϨʔϜϫʔΫͷ഑෍ܗଶ
    w όΠφϦͰ഑෍
    w ֦ுࢠ͸ʮYDGSBNFXPSLʯ
    w ෳ਺ͷϓϥοτϑΥʔϜͷʮGSBNFXPSLʯϑΝΠϧΛόϯυϧͰ͖
    Δ
    w NBD04 J04%FWJDF J044JNVMBUPS 6*,JUGPS.BDFUDʜ
    8IBU`T9$'SBNF8PSLT

    View full-size slide

  6. 9$'SBNF8PSLͷ࡞੒

    View full-size slide

  7. #VJME4FUUJOHT
    w 3FRVJSF
    w #VJME0QUJPOTˠ#VJME-JCSBSJFTGPS%JTUSJCVUJPOΛ:&4ʹઃఆ
    w 0QUJPOBM 4VQQPSU6*,JUGPS.BD

    w 6*,JUGPS.BD%FQMPZNFOUˠ%FSJWF6*,JUGPS.BD1SPEVDU
    #VOEMF*EFOUJpFSΛ:&4ʹઃఆ
    w 6*,JUGPS.BD%FQMPZNFOUˠ4VQQPSUT6*,JUGPS.BDΛ:&4ʹઃ

    View full-size slide

  8. "SDIJWF
    xcodebuild archive -scheme FammUser
    -destination 'generic/platform=iOS'
    -destination '...'
    .
    .
    .
    -destination '...'
    SKIP_INSTALL=NO

    View full-size slide

  9. $SFBUF9$'SBNFXPSL
    xcodebuild -create-xcframework \
    -framework [path]

    -framework [path]

    .
    .
    .

    -framework [path]
    -output XCFrameworksSample.xcframework
    xcodebuild -create-xcframework
    -framework /Users/username/Library/Developer/Xcode/Archives/
    2019-06-17/XCFrameWorkSample\ 2019-06-17\ 21.56.xcarchive/Products/
    Library/Frameworks/XCFrameWorkSample.framework
    -output XCFrameworksSample.xcframework

    View full-size slide

  10. "EE1SPKFDU
    %SBH%SPQ

    View full-size slide

  11. 9DPEFCFUBΛ%-ͯ͠ϦτϥΠ

    View full-size slide

  12. ΞʔΧΠϒͷੜ੒্͕ख͍ͬͯ͘ͳ͍ʁ

    View full-size slide

  13. Ϗϧυͨ͠ϑΝΠϧΛ௚઀ࢦఆͯ͠

    DSFBUFYDGSBNFXPSLͯ͠ΈΔ
    xcodebuild -create-xcframework
    -framework ~/Debug-iphoneos/XCFrameWorkSample.framework
    -framework ~/Debug-iphonesimulator/XCFrameWorkSample.framework
    -framework ~/Debug-uikitformac/XCFrameWorkSample.framework
    -output XCFrameworksSample.xcframework

    View full-size slide

  14. ΞʔΧΠϒͷੜ੒ϦτϥΠ

    View full-size slide

  15. to iOS Device
    xcodebuild archive
    -scheme XCFrameworkSample
    -destination 'generic/platform=iOS'
    -archivePath ./XCFrameworkSample-iOS
    SKIP_INSTALL=NO
    to iOS Simulator
    xcodebuild archive
    -scheme XCFrameWorkSample
    -destination 'generic/platform=iOS Simulator'
    -archivePath ./XCFrameworkSample-iOS-Simulator
    SKIP_INSTALL=NO
    to macOS
    xcodebuild archive
    -scheme XCFrameWorkSample
    -destination 'generic/platform=macOS'
    -archivePath ./XCFrameworkSample-macOS
    SKIP_INSTALL=NO

    View full-size slide

  16. xcodebuild -create-xcframework
    -framework ./XCFrameworkSample-iOS.xcarchive/Products/
    Library/Frameworks/XCFrameWorkSample.framework
    -framework ./XCFrameworkSample-iOS-
    Simulator.xcarchive/Products/Library/Frameworks/
    XCFrameWorkSample.framework
    -framework ./XCFrameworkSample-macOS.xcarchive/
    Products/Library/Frameworks/
    XCFrameWorkSample.framework
    -output XCFrameworkSample.xcframework

    View full-size slide

  17. w #VJME4FUUJOHTˠ#VJME0QUJPOTˠ#VJME-JCSBSJFTGPS
    %JTUSJCVUJPOΛ:&4ʹઃఆ
    w YDPEFCVJMEBSDIJWFˠΞʔΧΠϒΛੜ੒
    w YDPEFCVJMEDSFBUFYDGSBNFXPSLˠYDGSBNFXPSLΛੜ੒
    w ࢖͍͍ͨϓϩδΣΫτʹ௥Ճ͢Δ
    w
    ·ͱΊ

    View full-size slide

  18. w 4XJGU1.Ͱ͸9$'SBNFXPSLT͸αϙʔτ͞Ε͍ͯͳ͍ 4XJGU1.͸
    όΠφϦܗࣜʹରԠ͍ͯ͠ͳ͍

    w ϑΥʔϥϜͰ4XJGU1.ͷόΠφϦରԠ͸ٞ࿦͞Ε͍ͯΔ

    IUUQTGPSVNTTXJGUPSHUTQNTVQQPSUGPSCJOBSJFTEJTUSJCVUJPO

    IUUQTGPSVNTTXJGUPSHUTXJGUQBDLBHFNBOBHFSTVQQPSUGPSFNCFEEFEYDGSBNFXPSL

    w ࢀߟ৘ใ

    #JOBSZ'SBNFXPSLTJO4XJGU 88%$ηογϣϯ

    IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED

    ϦϦʔεϊʔτ

    IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOYDPEF@SFMFBTF@OPUFTYDPEF@@CFUB@SFMFBTF@OPUFT

    View full-size slide