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

MMKV failed to build on iOS v1.3.5 #1286

Open
Kyle-Ye opened this issue May 7, 2024 · 4 comments
Open

MMKV failed to build on iOS v1.3.5 #1286

Kyle-Ye opened this issue May 7, 2024 · 4 comments

Comments

@Kyle-Ye
Copy link

Kyle-Ye commented May 7, 2024

Note:

An crash issue will be ignored & closed in a week without logs.

The language of MMKV

e.g. Objective-C, Swift, Java, or Kotlin

Objective-C & Swift

The version of MMKV

e.g. v1.2.2
Note: For versions older than the latest version, please upgrade before posting any issue.
We don't have much time for old version tech support.

v1.3.5

The platform of MMKV

e.g. iOS or Android

iOS

The installation of MMKV

e.g. Cocoapods, Maven, or Git clone

Other

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English.
If you have a crash/OOM/ANR on Android, please provide symbolize stack traces. https://developer.android.com/ndk/guides/ndk-stack.html

I maintained a binary distribution of MMKV by running xcodebuild archive and xcodebuild -create-xcframework

Upstream has confirmed that binary support will not not supported or merged. See #866

But this is an issue out of scope of binary product IMO.

Things used to be fine. But when I bump from 1.3.0 to the latest 1.3.5 version. I noticed the CI is failing.

The CI script I'm using can be found here https://github.com/Kyle-Ye/MMKV/blob/master/iOS/archive_xcframework.sh

Cloning the corresponding version locally, I found that MMKV-Static build fine while MMKV can not build now.

Steps to reproduce

  1. git clone https://github.com/Tencent/MMKV.git and switch to version 1.3.5 / master branch
  2. Open MMKV.xcworkspace or iOS/MMKV/MMKV.xcodeproj
  3. Choose MMKV schema and run build or archive
image

Workaround I have tried

I tried to replace -scheme MMKV to -scheme 'MMKV Static'

And then build the xcframework with the following command.

xcodebuild \
-create-xcframework \
-archive archives/MMKV-iOS.xcarchive -library libMMKV.a \
-archive archives/MMKV-macOS.xcarchive -library libMMKV.a \
-archive archives/MMKV-iOS-Simulator.xcarchive -library libMMKV.a \
-output archives/MMKV-Static.xcframework

But since there is no .h or modulemap file produced in the xcarchive folder. I can't import anything on the client side.

xcodebuild archive \
-workspace MMKV.xcworkspace \
-scheme 'MMKV Static' \
-configuration Release \
-destination "generic/platform=iOS Simulator" \
-archivePath "archives/MMKV-iOS-Simulator" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

MMKV-iOS.xcarchive
├── Info.plist
├── Products
│   └── usr
│       └── local
│           └── lib
│               ├── libMMKV.a
│               └── libMMKVCore.a
└── dSYMs

What's the log of MMKV when that happened?

Your detail logs. As much as possible.
For how to forward MMKV's log, you can checkout the wiki on each platform.
An crash issue will be ignored & closed in a week without logs.

None

lingol added a commit that referenced this issue May 7, 2024
@lingol
Copy link
Collaborator

lingol commented May 7, 2024

It's fixed in the dev branch. You can cherry-pick into your local clone. 52963d3

@Kyle-Ye
Copy link
Author

Kyle-Ye commented May 7, 2024

It's fixed in the dev branch. You can cherry-pick into your local clone. 52963d3

Thanks, can we get an expectation timeline for the next release which will contain the fix?

@lingol
Copy link
Collaborator

lingol commented May 7, 2024

Not in any time soon.

Thanks, can we get an expectation timeline for the next release which will contain the fix?

@Kyle-Ye
Copy link
Author

Kyle-Ye commented May 7, 2024

Got it. I'll use a local fork then.

@lingol lingol changed the title MMKV failed to build on 1.3.5 MMKV failed to build on iOS v1.3.5 May 7, 2024
Kyle-Ye pushed a commit to Kyle-Ye/MMKV that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants