Skip to content

Commit 63ea65d

Browse files
committed
fix iosSimulatorArm64 run
1 parent c45f0ed commit 63ea65d

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

sample/ios-app/Podfile.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PODS:
22
- FloatingPanel (2.6.1)
3-
- moko-widgets-bottomsheet (0.2.0):
3+
- moko-widgets-bottomsheet (0.2.4):
44
- FloatingPanel (~> 2.6.1)
5-
- moko-widgets-collection (0.1.0)
6-
- moko-widgets-datetime-picker (0.2.0):
5+
- moko-widgets-collection (0.2.4)
6+
- moko-widgets-datetime-picker (0.2.4):
77
- FloatingPanel (~> 2.6.1)
8-
- moko-widgets-image-network (0.1.0):
8+
- moko-widgets-image-network (0.2.4):
99
- SDWebImage (~> 5.0)
1010
- mppLibraryIos (0.1.0)
1111
- MultiPlatformLibrary (0.1.0)
@@ -42,14 +42,14 @@ EXTERNAL SOURCES:
4242

4343
SPEC CHECKSUMS:
4444
FloatingPanel: de6bb891912ede28da7b1140f7b583c474fec28a
45-
moko-widgets-bottomsheet: 45cb9eec56ad3d44f0f3f81421f1ae81b671cfdb
46-
moko-widgets-collection: 722c6fca0b0dcab0b54fdb674b4638d4f715434c
47-
moko-widgets-datetime-picker: d25eb6926078eae46a311af26294c78b09f0058d
48-
moko-widgets-image-network: 074870717767dfcc1a0e942a0a070ad183c01195
45+
moko-widgets-bottomsheet: abb96c213d5b219a43fa46c6c84285595dadd999
46+
moko-widgets-collection: 2706cbb674e17ff312df48150ede3fe28c117152
47+
moko-widgets-datetime-picker: b09d5a69f2f30fdfa679b8889765ab442bfead10
48+
moko-widgets-image-network: 9a712636b4d6962f810c2ae8ebf1ed07efcc9f97
4949
mppLibraryIos: 72c3984fbaa53978d678e62096fd613e67839f0c
50-
MultiPlatformLibrary: 176fb8ade516666cd47e93de1b71ba0441a541bb
50+
MultiPlatformLibrary: 91d3837ea2c0943e0713f98671a36913470ef412
5151
SDWebImage: 7edb9c3ea661e77a66661f7f044de8c1b55d1120
5252

5353
PODFILE CHECKSUM: dd6f9b7e6c038aff8581037bf3a09cf3c1c947f9
5454

55-
COCOAPODS: 1.12.0
55+
COCOAPODS: 1.12.1

sample/mpp-library/MultiPlatformLibrary.podspec

+27-10
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,45 @@ Pod::Spec.new do |spec|
1111
spec.libraries = "c++"
1212
spec.module_name = "#{spec.name}_umbrella"
1313

14+
spec.ios.deployment_target = '11.0'
15+
1416
spec.pod_target_xcconfig = {
15-
'MPP_LIBRARY_NAME' => 'MultiPlatformLibrary',
16-
'GRADLE_TASK[sdk=iphonesimulator*][config=*ebug]' => 'syncMultiPlatformLibraryDebugFrameworkIosX64',
17-
'GRADLE_TASK[sdk=iphonesimulator*][config=*elease]' => 'syncMultiPlatformLibraryReleaseFrameworkIosX64',
18-
'GRADLE_TASK[sdk=iphoneos*][config=*ebug]' => 'syncMultiPlatformLibraryDebugFrameworkIosArm64',
19-
'GRADLE_TASK[sdk=iphoneos*][config=*elease]' => 'syncMultiPlatformLibraryReleaseFrameworkIosArm64'
17+
'KOTLIN_FRAMEWORK_BUILD_TYPE[config=*ebug]' => 'debug',
18+
'KOTLIN_FRAMEWORK_BUILD_TYPE[config=*elease]' => 'release',
19+
'CURENT_SDK[sdk=iphoneos*]' => 'iphoneos',
20+
'CURENT_SDK[sdk=iphonesimulator*]' => 'iphonesimulator',
2021
}
2122

2223
spec.script_phases = [
2324
{
2425
:name => 'Compile Kotlin/Native',
2526
:execution_position => :before_compile,
2627
:shell_path => '/bin/sh',
27-
#:output_files => ['$TARGET_BUILD_DIR/$PRODUCT_NAME.framework/$PRODUCT_NAME'],
2828
:script => <<-SCRIPT
29-
MPP_PROJECT_ROOT="$SRCROOT/../../mpp-library"
29+
if [ "$KOTLIN_FRAMEWORK_BUILD_TYPE" == "debug" ]; then
30+
CONFIG="Debug"
31+
else
32+
CONFIG="Release"
33+
fi
3034
31-
MPP_OUTPUT_DIR="$MPP_PROJECT_ROOT/build/cocoapods/framework"
32-
MPP_OUTPUT_NAME="$MPP_OUTPUT_DIR/#{spec.name}.framework"
35+
if [ "$CURENT_SDK" == "iphoneos" ]; then
36+
TARGET="Ios"
37+
ARCH="Arm64"
38+
else
39+
if [ "$NATIVE_ARCH" == "arm64" ]; then
40+
TARGET="IosSimulator"
41+
ARCH="Arm64"
42+
else
43+
TARGET="Ios"
44+
ARCH="X64"
45+
fi
46+
fi
47+
48+
MPP_PROJECT_ROOT="$SRCROOT/../../mpp-library"
49+
GRADLE_TASK="syncMultiPlatformLibrary${CONFIG}Framework${TARGET}${ARCH}"
3350
3451
"$MPP_PROJECT_ROOT/../gradlew" -p "$MPP_PROJECT_ROOT" "$GRADLE_TASK"
3552
SCRIPT
3653
}
3754
]
38-
end
55+
end

0 commit comments

Comments
 (0)