How To Create Custom iOS Frameworks


kodmunki™

Finding a means to create custom iOS frameworks, though not impossible, is not the easiest thing to find on the web. Here is what I did, and the resulting frameworks have been working very well me.

To Create the project

  1. Install iOS-Universal-Framework
  2. Restart Xcode
  3. Create your project
  4. Add a “Run” script to the Unit Test Target and copy and paste the following into the Shell content:
    "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out
  5. In your Build Settings, set Deployment -> Skip Install = YES for both Debug and Release
  6. Update Test Target Build Settings ‘Framework Search Paths’ to include
    $(inherited)
    

    and

    "$(SRCROOT)/${PRODUCT_NAME}.framework"
  7. In your project Target Build Phases, Disable the Second Run Script by adding the following lines to the beginning of the Shell content:
    # Disable this script exit…
  8. In your project Target Build Phases, add a Run Script to the build process:
    rsync --delete -a "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework" "${PROJECT_FILE_PATH}/../_Artifacts/"

To Install the Custom Framework

View original post 102 more words