Skip to content

Commit

Permalink
Add instructions for using Carthage to build a universal framework
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Jul 30, 2018
1 parent 50ea58a commit 91dd38b
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ android/.idea/modules.xml
android/.idea/scopes/scope_settings.xml
android/.idea/vcs.xml
*.iml
/iphone/TitaniumKit/Carthage
11 changes: 8 additions & 3 deletions iphone/TitaniumKit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ and challenges are described below.
## About this Project

### Reasons

- Improved compile-time (78+ headers will be precompiled)
- Swift module-support (Swift requires [module-based](https://clang.llvm.org/docs/Modules.html) Obj-C sources)

### Challenges

- Decouple circular dependencies
- Migrate precompile-macros
- Migrate `extern NSString * const` to use shared-config
- Need to remove TiJSCore + Kroll-Thread

### Current State

- [x] All relevant headers have been ported to the framework
- [x] TiJSCore has been removed completely, using JSCore now
- [x] Kroll-Thread has been removed completely, using Main-Thread now
- [x] Some public headers (`TiProxy`, `TiViewProxy`, `TiModule`, ...) have been exposed for testing
- [ ] Migrating precompile-macros (in progress)
- [x] Migrating precompile-macros

## Build from Source
Either build through Xcode using the "Distribution" target, or go to `scripts/` and call
`sh build-universal-framework.sh` directly. The framework will be built to `dist/`.
Either build through Xcode using the "Distribution" target, or use Carthage to build a zipped version of the framework:
```sh
carthage build --archive
```

## Authors
[@hansemannn](https://github.com/hansemannn), Axway
Expand Down
2 changes: 1 addition & 1 deletion iphone/TitaniumKit/TitaniumKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Run the universal build script\n./TitaniumKit/Scripts/build-universal-framework.sh";
shellScript = "# Run the universal build script\n./TitaniumKit/Scripts/build-universal-framework.sh\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB9635BE1F0AB4AC00C41B20"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB9635BE1F0AB4AC00C41B20"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB9635BE1F0AB4AC00C41B20"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB258CCC1F09757E000D0D8D"
BuildableName = "TitaniumKit.framework"
BlueprintName = "TitaniumKit"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB258CCC1F09757E000D0D8D"
BuildableName = "TitaniumKit.framework"
BlueprintName = "TitaniumKit"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB258CCC1F09757E000D0D8D"
BuildableName = "TitaniumKit.framework"
BlueprintName = "TitaniumKit"
ReferencedContainer = "container:TitaniumKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

0 comments on commit 91dd38b

Please sign in to comment.