Giter Site home page Giter Site logo

daviwiki / xcode-script-cross_platform_framework Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.13 MB

A script for creating a cross-platfrom framework for xcode 8.

License: MIT License

Shell 71.68% Swift 4.72% Objective-C 23.59%
xcode8 xcodebuild framework script

xcode-script-cross_platform_framework's Introduction

xcode-script-cross_platform_framework

A script for creating a cross-platfrom framework for xcode 8.

Instructions

A. Include the script into my framework target

  1. Click on the project file

  2. Select your framework target into target column

  3. Go to Build Phases

  4. Click on '+' icon and select "New run script phase"

    a new entry called 'Run Script' will appear:

  5. Copy and paste the script into the 'Run Script' box and replace <Put_your_target_name_here> with $(TARGET_NAME)

  6. Compile this target

B. Include the script into an Aggregate

Suppose that 'nonscript_framework' already exists (and it hasn't the script define previously)

  1. Click on the project file

  2. Create the aggregate clicking into '+' of Project and Targets column

  3. In the new window select 'cross-platform' and the 'Aggregate'

  4. Choose a name for your aggregate and click on "Finish"

  5. Go to Build Phases in your aggregate

  6. In "Target Dependencies" select '+' and add the base framework

  7. Click on '+' icon and select "New run script phase"

  8. Copy and paste the script into the 'Run Script' box and replace <Put_your_target_name_here> with your framework name, in our example 'nonscript_framework'

  9. Compile this target

Notes:

  • English commented script here
  • Spanish commented script here
  • Make sure the selected 'shell' is /bin/sh in your Run Script
  • If you want a Debug framework -> compile with an iphonesimulator into scheme (or any debug scheme)
  • If you want a Release framework -> archive target or select any release scheme
  • You could find an example here. The xcode example include how to add Objective-C and Swift files into the framework.
  • Remember you could replace the <Put_your_target_name_here> alias with $(TARGET_NAME) when no using aggregates. Example:
TARGET="${TARGET_NAME}"
  • You can check the architectures with:
lipo -info <framework_name>.framework/<framework_name>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.