SlideShare a Scribd company logo
Create an iOS 
Framework, document it 
and not die trying 
by @alexruperez
• Fast iterative builds when developing the 
framework. We may have a simple application that 
has the .framework as a dependency and we 
want to quickly iterate on development of 
the .framework. 
• Infrequent distribution builds of the .framework. 
• Resource distribution should be intuitive and not 
bloat the application. 
• Setup for third-party developers using 
the .framework should be easy.
Uncheck “Create git repository on…” option.
• Developers expect to be able to import your framework by importing the 
<YourFramework/YourFramework.h> header. Ensure that your project has such a 
header (if you created a new static library then there should already be a 
YourFramework.h and YourFramework.m file; you can delete the .m). 
• Add Build Phases from the menu. Click on Editor > Add Build Phase -> Add Copy 
Headers Build Phase. Note: If the menu options are grayed out, you'll need to click 
on the whitespace below the Build Phases to regain focus and retry. 
• You'll see 3 sections for Public, Private, and Project headers. To modify the scope of 
any header, drag and drop the header files between the sections. Alternatively you 
can open the Project Navigator and select the header. Next expand the Utilities 
pane for the File Inspector (Cmd+Option+0). 
• Look at the "Target Membership" group and ensure that the checkbox next to the .h 
file is checked. Change the scope of the header from "Project" to "Public". You might 
have to uncheck and check the box to get the dropdown list. This will ensure that 
the header gets copied to the correct location in the copy headers phase.
• By default the static library project will copy private and 
public headers to the same folder: /usr/local/include. To 
avoid mistakenly copying private headers to our framework 
we want to ensure that our public headers are copied to a 
separate directory, e.g. Headers. 
• To change this setting, select the project in the Project 
Navigator and then click the "Build Settings" tab. Search for 
"public headers" and then set the "Public Headers Folder 
Path" to "Headers" for all configurations. If you are working 
with multiple Frameworks make sure that this folder is 
unique.
• We do not want to strip any code from the library; 
we leave this up to the application that is linking 
to the framework. To disable code stripping we 
must modify the following configuration settings. 
• "Dead Code Stripping" => No (for all settings) 
• "Strip Debug Symbols During Copy" => No (for 
all settings) 
• "Strip Style" => Non-Global Symbols (for all 
settings)
• Select Editor menu > Add Build Phase > Add 
Run Script Build Phase 
set -e! 
! 
mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"! 
! 
# Link the "Current" version to "A"! 
/bin/ln -sfh A "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/Current"! 
/bin/ln -sfh Versions/Current/Headers "${BUILT_PRODUCTS_DIR}/$ 
{PRODUCT_NAME}.framework/Headers"! 
/bin/ln -sfh "Versions/Current/${PRODUCT_NAME}" "${BUILT_PRODUCTS_DIR}/$ 
{PRODUCT_NAME}.framework/${PRODUCT_NAME}"! 
! 
# The -a ensures that the headers maintain the source modification date so that we don't 
constantly! 
# cause propagating rebuilds of files that import these headers.! 
/bin/cp -a "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/" "$ 
{BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"
Gigigo Workshop - Create an iOS Framework, document it and not die trying
• Add the static library target to the "Target 
Dependencies”. 
• Set “Arquitectures” and “Valid arquitectures” in 
the Build Settings to i386, x86_64, armv7, 
armv7s and arm64. 
• Select Editor menu > Add Build Phase > Add 
Run Script Build Phase
set -e! 
set +u! 
# Avoid recursively calling this script.! 
if [[ $SF_MASTER_SCRIPT_RUNNING ]]! 
then! 
exit 0! 
fi! 
set -u! 
export SF_MASTER_SCRIPT_RUNNING=1! ! 
SF_TARGET_NAME=${PROJECT_NAME}! 
SF_EXECUTABLE_PATH="lib${SF_TARGET_NAME}.a"! 
SF_WRAPPER_NAME="${SF_TARGET_NAME}.framework"! 
SF_BUNDLE_NAME="${SF_TARGET_NAME}.bundle"! !# 
The following conditionals come from! 
# https://github.com/kstenerud/iOS-Universal-Framework! ! 
if [[ "$SDK_NAME" =~ ([A-Za-z]+) ]]! 
then! 
SF_SDK_PLATFORM=${BASH_REMATCH[1]}! 
else! 
echo "Could not find platform name from SDK_NAME: $SDK_NAME"! 
exit 1! 
fi! ! 
if [[ "$SDK_NAME" =~ ([0-9]+.*$) ]]! 
then! 
SF_SDK_VERSION=${BASH_REMATCH[1]}! 
else! 
echo "Could not find sdk version from SDK_NAME: $SDK_NAME"! 
exit 1! 
fi! ! 
if [[ "$SF_SDK_PLATFORM" = "iphoneos" ]]! 
then! 
SF_OTHER_PLATFORM=iphonesimulator! 
else! 
SF_OTHER_PLATFORM=iphoneos! 
fi! ! 
if [[ "$BUILT_PRODUCTS_DIR" =~ (.*)$SF_SDK_PLATFORM$ ]]! 
then! 
SF_OTHER_BUILT_PRODUCTS_DIR="${BASH_REMATCH[1]}${SF_OTHER_PLATFORM}"! 
else! 
echo "Could not find platform name from build products directory: $BUILT_PRODUCTS_DIR"! 
exit 1! 
fi!!# 
Build the other platform.! 
xcrun xcodebuild -project "${PROJECT_FILE_PATH}" -target "${TARGET_NAME}" -configuration "${CONFIGURATION}" -sdk ${SF_OTHER_PLATFORM}$ 
{SF_SDK_VERSION} BUILD_DIR="${BUILD_DIR}" OBJROOT="${OBJROOT}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" $ACTION! !# 
Smash the two static libraries into one fat binary and store it in the .framework! 
xcrun lipo -create "${BUILT_PRODUCTS_DIR}/${SF_EXECUTABLE_PATH}" "${SF_OTHER_BUILT_PRODUCTS_DIR}/${SF_EXECUTABLE_PATH}" -output "$ 
{BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}"! !# 
Copy the binary to the other architecture folder to have a complete framework in both.! 
cp -a "${BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}" "${SF_OTHER_BUILT_PRODUCTS_DIR}/$ 
{SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}"! ! 
rm -rf "${PROJECT_DIR}/Framework/"! 
mkdir "${PROJECT_DIR}/Framework/"! 
cp -rf "${BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}" "${PROJECT_DIR}/Framework/"! 
cp -rf "${BUILT_PRODUCTS_DIR}/${SF_BUNDLE_NAME}" "${PROJECT_DIR}/Framework/" 2>/dev/null || :
• Add the Framework Project to your Application 
Project 
• Select your project in the Project Navigator and 
open the "Build Phases" tab. Expand the "Target 
Dependencies" group and click the + button. 
Select the static library target and click “Add". 
• Expand the "Link Binary With Libraries" phase 
and click the + button. Select the .a file that's 
exposed by your framework's project and then 
click add.
• git clone git://github.com/tomaz/appledoc.git 
• sudo sh install-appledoc.sh 
• Select Editor menu > Add Build Phase > Add Run Script 
Build Phase 
#appledoc Xcode script! 
# Start constants! 
company="alexruperez";! 
companyID="com.alexruperez";! 
companyURL="http://alexruperez.com";! 
target="iphoneos";! 
outputPath="~/help";! 
# End constants! 
/usr/local/bin/appledoc ! 
--project-name "${PROJECT_NAME}" ! 
--project-company "${company}" ! 
--company-id "${companyID}" ! 
--docset-atom-filename "${company}.atom" ! 
--docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" ! 
--docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" ! 
--docset-fallback-url "${companyURL}/${company}" ! 
--output "${outputPath}" ! 
--ignore "Private" ! 
--publish-docset ! 
--docset-platform-family "${target}" ! 
--logformat xcode ! 
--keep-intermediate-files ! 
--no-repeat-first-par ! 
--no-warn-invalid-crossref ! 
--exit-threshold 2 ! 
"${PROJECT_DIR}"! 
rm -rf "${PROJECT_DIR}/Documentation/"! 
mkdir "${PROJECT_DIR}/Documentation/"! 
cp -rf ~/help/html/ "${PROJECT_DIR}/Documentation/"
/// Simple description 
! 
! 
! 
/** 
* Description. 
* 
* @warning Warning 
* @param Param A 
* @param Param B 
* @return Return 
*/
Addendum 
• alexruperez/FrameworkExample 
• jverkoey/iOS-Framework 
• tomaz/appledoc
Ad

More Related Content

What's hot (18)

Selenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingSelenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testing
Isaac Murchie
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notifications
Keith Moore
 
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Paulraj Pappaiah
 
KKBOX WWDC17 UIKit Drag and Drop - Mario
KKBOX WWDC17  UIKit Drag and Drop - MarioKKBOX WWDC17  UIKit Drag and Drop - Mario
KKBOX WWDC17 UIKit Drag and Drop - Mario
Liyao Chen
 
Hello windows 10
Hello windows 10Hello windows 10
Hello windows 10
Gill Cleeren
 
monkeyTalk
monkeyTalkmonkeyTalk
monkeyTalk
Md Samsul Kabir
 
Integrate Jenkins with S3
Integrate Jenkins with S3Integrate Jenkins with S3
Integrate Jenkins with S3
devopsjourney
 
Aleksey_Demedetskiy_Jenkins
Aleksey_Demedetskiy_JenkinsAleksey_Demedetskiy_Jenkins
Aleksey_Demedetskiy_Jenkins
Ciklum
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
cgack
 
iOS Remote Notifications
iOS Remote NotificationsiOS Remote Notifications
iOS Remote Notifications
LeeHericks
 
Create or Modify Virtual system Patterns using IBM Cloud Orchestrator v2.5
Create or Modify Virtual system Patterns using  IBM Cloud Orchestrator v2.5Create or Modify Virtual system Patterns using  IBM Cloud Orchestrator v2.5
Create or Modify Virtual system Patterns using IBM Cloud Orchestrator v2.5
Paulraj Pappaiah
 
Henry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets privateHenry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets private
Henry Been
 
DevOpsDays Austin - Configuration Management Evolution
DevOpsDays Austin - Configuration Management EvolutionDevOpsDays Austin - Configuration Management Evolution
DevOpsDays Austin - Configuration Management Evolution
joehack3r
 
Iteratively Develop Microservices with Speed on Kubernetes
Iteratively Develop Microservices with Speed on KubernetesIteratively Develop Microservices with Speed on Kubernetes
Iteratively Develop Microservices with Speed on Kubernetes
Microsoft Tech Community
 
Building Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App CenterBuilding Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App Center
SharePoint Saturday New Jersey
 
KKBOX WWDC17 WatchOS - Dada
KKBOX WWDC17  WatchOS  - DadaKKBOX WWDC17  WatchOS  - Dada
KKBOX WWDC17 WatchOS - Dada
Liyao Chen
 
PlayFab multiplayer_party
PlayFab multiplayer_partyPlayFab multiplayer_party
PlayFab multiplayer_party
Crystin Cox
 
PlayFab and unity gdc2019
PlayFab and unity gdc2019PlayFab and unity gdc2019
PlayFab and unity gdc2019
Crystin Cox
 
Selenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingSelenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testing
Isaac Murchie
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notifications
Keith Moore
 
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Simple ways to deploy VM Images from Self Service UI in IBM Cloud Orchestrato...
Paulraj Pappaiah
 
KKBOX WWDC17 UIKit Drag and Drop - Mario
KKBOX WWDC17  UIKit Drag and Drop - MarioKKBOX WWDC17  UIKit Drag and Drop - Mario
KKBOX WWDC17 UIKit Drag and Drop - Mario
Liyao Chen
 
Integrate Jenkins with S3
Integrate Jenkins with S3Integrate Jenkins with S3
Integrate Jenkins with S3
devopsjourney
 
Aleksey_Demedetskiy_Jenkins
Aleksey_Demedetskiy_JenkinsAleksey_Demedetskiy_Jenkins
Aleksey_Demedetskiy_Jenkins
Ciklum
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
cgack
 
iOS Remote Notifications
iOS Remote NotificationsiOS Remote Notifications
iOS Remote Notifications
LeeHericks
 
Create or Modify Virtual system Patterns using IBM Cloud Orchestrator v2.5
Create or Modify Virtual system Patterns using  IBM Cloud Orchestrator v2.5Create or Modify Virtual system Patterns using  IBM Cloud Orchestrator v2.5
Create or Modify Virtual system Patterns using IBM Cloud Orchestrator v2.5
Paulraj Pappaiah
 
Henry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets privateHenry Been - Secure development: keeping your application secrets private
Henry Been - Secure development: keeping your application secrets private
Henry Been
 
DevOpsDays Austin - Configuration Management Evolution
DevOpsDays Austin - Configuration Management EvolutionDevOpsDays Austin - Configuration Management Evolution
DevOpsDays Austin - Configuration Management Evolution
joehack3r
 
Iteratively Develop Microservices with Speed on Kubernetes
Iteratively Develop Microservices with Speed on KubernetesIteratively Develop Microservices with Speed on Kubernetes
Iteratively Develop Microservices with Speed on Kubernetes
Microsoft Tech Community
 
Building Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App CenterBuilding Mobile Apps With Xamarin and Visual Studio App Center
Building Mobile Apps With Xamarin and Visual Studio App Center
SharePoint Saturday New Jersey
 
KKBOX WWDC17 WatchOS - Dada
KKBOX WWDC17  WatchOS  - DadaKKBOX WWDC17  WatchOS  - Dada
KKBOX WWDC17 WatchOS - Dada
Liyao Chen
 
PlayFab multiplayer_party
PlayFab multiplayer_partyPlayFab multiplayer_party
PlayFab multiplayer_party
Crystin Cox
 
PlayFab and unity gdc2019
PlayFab and unity gdc2019PlayFab and unity gdc2019
PlayFab and unity gdc2019
Crystin Cox
 

Similar to Gigigo Workshop - Create an iOS Framework, document it and not die trying (20)

"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
Fabio Milano
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
Drupalcon Paris
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
家榮 吳
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
Richard Martens
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
Cavelle Benjamin
 
FLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 FrankfurtFLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 Frankfurt
Robert Lemke
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
Kellyn Pot'Vin-Gorman
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-sem
Sagun Baijal
 
Gnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-semGnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-sem
Sagun Baijal
 
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Erich Beyrent
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
Nuvole
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
Robert Lemke
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
Pavan Kumar N
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
Andres Almiray
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
Bastian Feder
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
Dashamir Hoxha
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
Mike Slinn
 
"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
Fabio Milano
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
Drupalcon Paris
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
家榮 吳
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
Richard Martens
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
Cavelle Benjamin
 
FLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 FrankfurtFLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 Frankfurt
Robert Lemke
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
Kellyn Pot'Vin-Gorman
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-sem
Sagun Baijal
 
Gnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-semGnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-sem
Sagun Baijal
 
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Erich Beyrent
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
Nuvole
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
Robert Lemke
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
Pavan Kumar N
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
Andres Almiray
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
Bastian Feder
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
Dashamir Hoxha
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
Mike Slinn
 
Ad

More from Alex Rupérez (7)

Iterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFestIterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFest
Alex Rupérez
 
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Alex Rupérez
 
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
Alex Rupérez
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
Alex Rupérez
 
Gigigo Ruby Workshop
Gigigo Ruby WorkshopGigigo Ruby Workshop
Gigigo Ruby Workshop
Alex Rupérez
 
iOS Sync Libraries
iOS Sync LibrariesiOS Sync Libraries
iOS Sync Libraries
Alex Rupérez
 
Magister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social DevelopmentMagister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social Development
Alex Rupérez
 
Iterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFestIterando arquitecturas, creando herramientas | T3chFest
Iterando arquitecturas, creando herramientas | T3chFest
Alex Rupérez
 
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Desarrollando mogollón de apps a la vez... ¿en qué lío me he metido?
Alex Rupérez
 
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
MADBike – Destapando la seguridad de BiciMAD (T3chFest 2017)
Alex Rupérez
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
Alex Rupérez
 
Gigigo Ruby Workshop
Gigigo Ruby WorkshopGigigo Ruby Workshop
Gigigo Ruby Workshop
Alex Rupérez
 
Magister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social DevelopmentMagister of Entrepreneurship - Social Development
Magister of Entrepreneurship - Social Development
Alex Rupérez
 
Ad

Recently uploaded (20)

THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Bidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdfBidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdf
ISGF - International Scout and Guide Fellowship
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdfMicrosoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
MinniePfeiffer
 
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
patricialago3459
 
The Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdfThe Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdf
RDinuRao
 
Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025
Noraini Yunus
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.
NeoRakodu
 
NASIG ISSN 2025 updated for the_4-30meeting.pptx
NASIG ISSN 2025 updated for the_4-30meeting.pptxNASIG ISSN 2025 updated for the_4-30meeting.pptx
NASIG ISSN 2025 updated for the_4-30meeting.pptx
reine1
 
Effects of physical activity, exercise and sedentary behaviors to
Effects of physical activity, exercise and sedentary behaviors toEffects of physical activity, exercise and sedentary behaviors to
Effects of physical activity, exercise and sedentary behaviors to
DancanNyabuto
 
fundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptxfundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptx
Sunkod
 
kurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptxkurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptx
TayyabaSiddiqui12
 
2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx
aschenakidawit1
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
816111728-IELTS-WRITING test óft-PPT.pptx
816111728-IELTS-WRITING test óft-PPT.pptx816111728-IELTS-WRITING test óft-PPT.pptx
816111728-IELTS-WRITING test óft-PPT.pptx
787mianahmad
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdfMicrosoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
MinniePfeiffer
 
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
patricialago3459
 
The Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdfThe Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdf
RDinuRao
 
Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025Speech 3-A Vision for Tomorrow for GE2025
Speech 3-A Vision for Tomorrow for GE2025
Noraini Yunus
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.
NeoRakodu
 
NASIG ISSN 2025 updated for the_4-30meeting.pptx
NASIG ISSN 2025 updated for the_4-30meeting.pptxNASIG ISSN 2025 updated for the_4-30meeting.pptx
NASIG ISSN 2025 updated for the_4-30meeting.pptx
reine1
 
Effects of physical activity, exercise and sedentary behaviors to
Effects of physical activity, exercise and sedentary behaviors toEffects of physical activity, exercise and sedentary behaviors to
Effects of physical activity, exercise and sedentary behaviors to
DancanNyabuto
 
fundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptxfundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptx
Sunkod
 
kurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptxkurtlewin theory of motivation -181226082203.pptx
kurtlewin theory of motivation -181226082203.pptx
TayyabaSiddiqui12
 
2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx
aschenakidawit1
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
816111728-IELTS-WRITING test óft-PPT.pptx
816111728-IELTS-WRITING test óft-PPT.pptx816111728-IELTS-WRITING test óft-PPT.pptx
816111728-IELTS-WRITING test óft-PPT.pptx
787mianahmad
 

Gigigo Workshop - Create an iOS Framework, document it and not die trying

  • 1. Create an iOS Framework, document it and not die trying by @alexruperez
  • 2. • Fast iterative builds when developing the framework. We may have a simple application that has the .framework as a dependency and we want to quickly iterate on development of the .framework. • Infrequent distribution builds of the .framework. • Resource distribution should be intuitive and not bloat the application. • Setup for third-party developers using the .framework should be easy.
  • 3. Uncheck “Create git repository on…” option.
  • 4. • Developers expect to be able to import your framework by importing the <YourFramework/YourFramework.h> header. Ensure that your project has such a header (if you created a new static library then there should already be a YourFramework.h and YourFramework.m file; you can delete the .m). • Add Build Phases from the menu. Click on Editor > Add Build Phase -> Add Copy Headers Build Phase. Note: If the menu options are grayed out, you'll need to click on the whitespace below the Build Phases to regain focus and retry. • You'll see 3 sections for Public, Private, and Project headers. To modify the scope of any header, drag and drop the header files between the sections. Alternatively you can open the Project Navigator and select the header. Next expand the Utilities pane for the File Inspector (Cmd+Option+0). • Look at the "Target Membership" group and ensure that the checkbox next to the .h file is checked. Change the scope of the header from "Project" to "Public". You might have to uncheck and check the box to get the dropdown list. This will ensure that the header gets copied to the correct location in the copy headers phase.
  • 5. • By default the static library project will copy private and public headers to the same folder: /usr/local/include. To avoid mistakenly copying private headers to our framework we want to ensure that our public headers are copied to a separate directory, e.g. Headers. • To change this setting, select the project in the Project Navigator and then click the "Build Settings" tab. Search for "public headers" and then set the "Public Headers Folder Path" to "Headers" for all configurations. If you are working with multiple Frameworks make sure that this folder is unique.
  • 6. • We do not want to strip any code from the library; we leave this up to the application that is linking to the framework. To disable code stripping we must modify the following configuration settings. • "Dead Code Stripping" => No (for all settings) • "Strip Debug Symbols During Copy" => No (for all settings) • "Strip Style" => Non-Global Symbols (for all settings)
  • 7. • Select Editor menu > Add Build Phase > Add Run Script Build Phase set -e! ! mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"! ! # Link the "Current" version to "A"! /bin/ln -sfh A "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/Current"! /bin/ln -sfh Versions/Current/Headers "${BUILT_PRODUCTS_DIR}/$ {PRODUCT_NAME}.framework/Headers"! /bin/ln -sfh "Versions/Current/${PRODUCT_NAME}" "${BUILT_PRODUCTS_DIR}/$ {PRODUCT_NAME}.framework/${PRODUCT_NAME}"! ! # The -a ensures that the headers maintain the source modification date so that we don't constantly! # cause propagating rebuilds of files that import these headers.! /bin/cp -a "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/" "$ {BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"
  • 9. • Add the static library target to the "Target Dependencies”. • Set “Arquitectures” and “Valid arquitectures” in the Build Settings to i386, x86_64, armv7, armv7s and arm64. • Select Editor menu > Add Build Phase > Add Run Script Build Phase
  • 10. set -e! set +u! # Avoid recursively calling this script.! if [[ $SF_MASTER_SCRIPT_RUNNING ]]! then! exit 0! fi! set -u! export SF_MASTER_SCRIPT_RUNNING=1! ! SF_TARGET_NAME=${PROJECT_NAME}! SF_EXECUTABLE_PATH="lib${SF_TARGET_NAME}.a"! SF_WRAPPER_NAME="${SF_TARGET_NAME}.framework"! SF_BUNDLE_NAME="${SF_TARGET_NAME}.bundle"! !# The following conditionals come from! # https://github.com/kstenerud/iOS-Universal-Framework! ! if [[ "$SDK_NAME" =~ ([A-Za-z]+) ]]! then! SF_SDK_PLATFORM=${BASH_REMATCH[1]}! else! echo "Could not find platform name from SDK_NAME: $SDK_NAME"! exit 1! fi! ! if [[ "$SDK_NAME" =~ ([0-9]+.*$) ]]! then! SF_SDK_VERSION=${BASH_REMATCH[1]}! else! echo "Could not find sdk version from SDK_NAME: $SDK_NAME"! exit 1! fi! ! if [[ "$SF_SDK_PLATFORM" = "iphoneos" ]]! then! SF_OTHER_PLATFORM=iphonesimulator! else! SF_OTHER_PLATFORM=iphoneos! fi! ! if [[ "$BUILT_PRODUCTS_DIR" =~ (.*)$SF_SDK_PLATFORM$ ]]! then! SF_OTHER_BUILT_PRODUCTS_DIR="${BASH_REMATCH[1]}${SF_OTHER_PLATFORM}"! else! echo "Could not find platform name from build products directory: $BUILT_PRODUCTS_DIR"! exit 1! fi!!# Build the other platform.! xcrun xcodebuild -project "${PROJECT_FILE_PATH}" -target "${TARGET_NAME}" -configuration "${CONFIGURATION}" -sdk ${SF_OTHER_PLATFORM}$ {SF_SDK_VERSION} BUILD_DIR="${BUILD_DIR}" OBJROOT="${OBJROOT}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" $ACTION! !# Smash the two static libraries into one fat binary and store it in the .framework! xcrun lipo -create "${BUILT_PRODUCTS_DIR}/${SF_EXECUTABLE_PATH}" "${SF_OTHER_BUILT_PRODUCTS_DIR}/${SF_EXECUTABLE_PATH}" -output "$ {BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}"! !# Copy the binary to the other architecture folder to have a complete framework in both.! cp -a "${BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}" "${SF_OTHER_BUILT_PRODUCTS_DIR}/$ {SF_WRAPPER_NAME}/Versions/A/${SF_TARGET_NAME}"! ! rm -rf "${PROJECT_DIR}/Framework/"! mkdir "${PROJECT_DIR}/Framework/"! cp -rf "${BUILT_PRODUCTS_DIR}/${SF_WRAPPER_NAME}" "${PROJECT_DIR}/Framework/"! cp -rf "${BUILT_PRODUCTS_DIR}/${SF_BUNDLE_NAME}" "${PROJECT_DIR}/Framework/" 2>/dev/null || :
  • 11. • Add the Framework Project to your Application Project • Select your project in the Project Navigator and open the "Build Phases" tab. Expand the "Target Dependencies" group and click the + button. Select the static library target and click “Add". • Expand the "Link Binary With Libraries" phase and click the + button. Select the .a file that's exposed by your framework's project and then click add.
  • 12. • git clone git://github.com/tomaz/appledoc.git • sudo sh install-appledoc.sh • Select Editor menu > Add Build Phase > Add Run Script Build Phase #appledoc Xcode script! # Start constants! company="alexruperez";! companyID="com.alexruperez";! companyURL="http://alexruperez.com";! target="iphoneos";! outputPath="~/help";! # End constants! /usr/local/bin/appledoc ! --project-name "${PROJECT_NAME}" ! --project-company "${company}" ! --company-id "${companyID}" ! --docset-atom-filename "${company}.atom" ! --docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" ! --docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" ! --docset-fallback-url "${companyURL}/${company}" ! --output "${outputPath}" ! --ignore "Private" ! --publish-docset ! --docset-platform-family "${target}" ! --logformat xcode ! --keep-intermediate-files ! --no-repeat-first-par ! --no-warn-invalid-crossref ! --exit-threshold 2 ! "${PROJECT_DIR}"! rm -rf "${PROJECT_DIR}/Documentation/"! mkdir "${PROJECT_DIR}/Documentation/"! cp -rf ~/help/html/ "${PROJECT_DIR}/Documentation/"
  • 13. /// Simple description ! ! ! /** * Description. * * @warning Warning * @param Param A * @param Param B * @return Return */
  • 14. Addendum • alexruperez/FrameworkExample • jverkoey/iOS-Framework • tomaz/appledoc