Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(ios): remove xcodegen usage due to test support issues #3860

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/ios_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ jobs:
uses: actions/checkout@v3
with:
lfs: true
- name: Xcodegen
uses: xavierLowmiller/[email protected]
with:
spec: framework/examples/ios-demo/project.yml
version: '2.32.0'
- name: Demo
working-directory: framework/examples/ios-demo
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/project_artifact_compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,10 @@ jobs:
with:
ref: ${{ matrix.ref }}
lfs: true
- name: Xcodegen
uses: xavierLowmiller/[email protected]
with:
spec: framework/examples/ios-demo/project.yml
version: '2.32.0'
- name: Build
if: ${{ matrix.ref }}
run: |
pushd framework/examples/ios-demo
xcodegen
pod install
xcodebuild build \
-destination 'generic/platform=iOS' \
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ framework/examples/android-demo/src/main/assets/
framework/examples/android-demo/libs/*
framework/examples/android-demo/maven-auth.properties
framework/examples/android-demo/.cxx/
framework/examples/ios-demo/HippyDemo.xcodeproj
framework/examples/ios-demo/HippyDemo.xcworkspace
framework/examples/ios-demo/Pods/*
framework/examples/ios-demo/Podfile.lock
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For iOS, we recommend to use iOS simulator when first try. However, you can chan

3. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo]`.

4. Install Xcodegen with `brew install xcodegen`, install CocoaPods with `brew install cocoapods`, install cmake with `brew install cmake`, then execute `xcodegen` command at `framework/examples/ios-demo` directory, which will create `HippyDemo.xcodeproj` and `HippyDemo.xcworkspace` files and install Cocoapods dependencies.
4. Install CocoaPods with `brew install cocoapods`, install cmake with `brew install cmake`, then execute `pod install` command at `framework/examples/ios-demo` directory, which will create `HippyDemo.xcworkspace` files and install Cocoapods dependencies.

5. Start the Xcode and build the iOS app with opening `framework/examples/ios-demo/HippyDemo.xcworkspace`.

Expand Down
8 changes: 4 additions & 4 deletions docs/development/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Demo的Native工程代码位于framework/examples目录,前端工程代码位
首先,通过Homebrew包管理工具安装git, git-lfs, node(v16) and npm(v7)

```shell
brew install git git-lfs node@16 xcodegen cmake
brew install git git-lfs node@16 cmake
```

#### 编译iOS Demo环境准备
Expand Down Expand Up @@ -82,9 +82,9 @@ git clone https://github.com/Tencent/Hippy.git
```shell
# 进入Hippy源码目录
cd ./framework/examples/ios-demo
# 执行xcodegen生成工程
xcodegen
# 打开workspace,编译运行即可
# 使用 Cocoapods 生成工程
pod install
# 打开 workspace,编译运行即可
open HippyDemo.xcworkspace
```

Expand Down
576 changes: 576 additions & 0 deletions framework/examples/ios-demo/HippyDemo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F7DF50CA19E5E79F64D3D4E6"
BuildableName = "HippyDemo.app"
BlueprintName = "HippyDemo"
ReferencedContainer = "container:HippyDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F7DF50CA19E5E79F64D3D4E6"
BuildableName = "HippyDemo.app"
BlueprintName = "HippyDemo"
ReferencedContainer = "container:HippyDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F7DF50CA19E5E79F64D3D4E6"
BuildableName = "HippyDemo.app"
BlueprintName = "HippyDemo"
ReferencedContainer = "container:HippyDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
22 changes: 22 additions & 0 deletions framework/examples/ios-demo/HippyDemo.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"configurations" : [
{
"id" : "C642C4E4-3340-4058-BCDB-F8D3BE31926A",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {
"targetForVariableExpansion" : {
"containerPath" : "container:HippyDemo.xcodeproj",
"identifier" : "F7DF50CA19E5E79F64D3D4E6",
"name" : "HippyDemo"
}
},
"testTargets" : [

],
"version" : 1
}
8 changes: 5 additions & 3 deletions framework/examples/ios-demo/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
> You need to install cocoapods, cmake and xcodegen before starting HippyDemo
# iOS Demo Running Guide

> You need to install cocoapods and cmake before starting HippyDemo

1.open your Terminal

2.change the current working folder to framework/examples/ios-demo

3.execute 'xcodegen' command to install dependencies
3.execute 'pod install' command to install dependencies and generate 'HippyDemo.xcworkspace'

4.open 'HippyDemo.xcworkspace'
4.open 'HippyDemo.xcworkspace', run demo!
32 changes: 32 additions & 0 deletions framework/examples/ios-demo/hippy-Unit-UnitTests.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"configurations" : [
{
"id" : "EA4E4CF7-9024-4B4A-B911-A0056EF7BAD7",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {
"codeCoverage" : {
"targets" : [
{
"containerPath" : "container:Pods.xcodeproj",
"identifier" : "927329EF8F33B34F7F9A0655F6ABA7C3",
"name" : "hippy"
}
]
}
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Pods.xcodeproj",
"identifier" : "C1E172B01D45B4ADDB866126B685CA58",
"name" : "hippy-Unit-UnitTests"
}
}
],
"version" : 1
}
25 changes: 0 additions & 25 deletions framework/examples/ios-demo/project.yml

This file was deleted.

Loading