compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

App Store verification fails with "The app references non-public symbols"

Open sergei-mikhailovskii-idf opened this issue 8 months ago • 35 comments

Describe the bug I implemented a library which uses Compose Multiplatform to display logs and added it to the iOS project. It builds fine, but when I upload the app to the App Store, lane fails with the following error:

ERROR: [ContentDelivery.Uploader] Asset validation failed (11) The app references non-public symbols in Payload/AppName.app/AppName: _ubidi_close, _ubidi_getDirection, _ubidi_getLength, _ubidi_getLevelAt, _ubidi_openSized, _ubidi_reorderVisual, _ubidi_setPara, _ubrk_clone, _ubrk_current, _ubrk_first, _ubrk_getRuleStatus, _ubrk_next, _uloc_getDefault, _uloc_toLanguageTag, _uscript_getScript (ID: b685f704-5d49-42c6-b138-5d9237029ac2)

I googled this problem and it seems that there's some problem with SKIA library (https://groups.google.com/g/skia-discuss/c/eY229SYmHbA)

So there's a question - how can I fix this issue? Thanks in advance for the answer!

Affected platforms

  • iOS

Versions

  • Kotlin version*: 1.9.10
  • Compose Multiplatform version*: 1.5.3
  • OS version(s)* (required for Desktop and iOS issues): any
  • OS architecture (x86 or arm64): arm64

To Reproduce

  1. Try to upload the app to the App Store
  2. See result

Expected behavior Successfull upload of the IPA to the App Store

Additional context XCode version - 15.0 Here are libs I used

val commonMain by getting {
            dependencies {
                implementation(compose.runtime)
                implementation(compose.material3)
                implementation(compose.materialIconsExtended)
                implementation("io.realm.kotlin:library-base:1.11.0")
                implementation("com.arkivanov.decompose:extensions-compose-jetbrains:2.1.2-compose-experimental")
                implementation("com.arkivanov.decompose:decompose:2.1.2")
                implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
            }
        }
        val androidMain by getting {
            dependencies {
                implementation("androidx.activity:activity-compose:1.8.0")
            }
        }
        val iosSimulatorArm64Main by getting
        val iosMain by getting {
            dependsOn(commonMain)
            iosSimulatorArm64Main.dependsOn(this)
        }

it seems that there's some problem with SKIA library

Yes, Compose relies on skia library under the hood. SKIA uses ICU library for Unicode support, but it's built with reference to a non-system library.

Is it reproducible on our template project for you? Or is it just about your own project with this set of dependencies?

MatkovIvan avatar Oct 20 '23 08:10 MatkovIvan

@MatkovIvan thanks for the support, unfortunately I cannot test with the template app, since I cannot upload it to the AppStore and check

I checked validation process of empty template with Xcode 15 All fine

image

dima-avdeev-jb avatar Oct 26 '23 17:10 dima-avdeev-jb

@sergei-mikhailovskii-idf Can you please check validation in Xcode when building archive?

To do so you need folow these steps:

  • Go to Product -> Archive
image
  • Don't use Xcode Cloud and start proccess of Archive again.

  • Wait some time while archiving

  • Choose Validate App

image

dima-avdeev-jb avatar Oct 26 '23 17:10 dima-avdeev-jb

@dima-avdeev-jb hi! I did in the way u described and received the same error after the validation

Screenshot 2023-10-30 at 13 17 37

Here's the failure in logs

Asset validation failed
The app references non-public symbols in Payload/appname.app/appname: _ubidi_close, _ubidi_getDirection, _ubidi_getLength, _ubidi_getLevelAt, _ubidi_openSized, _ubidi_reorderVisual, _ubidi_setPara, _ubrk_clone, _ubrk_current, _ubrk_first, _ubrk_getRuleStatus, _ubrk_next, _uloc_getDefault, _uloc_toLanguageTag, _uscript_getScript (ID: 0f90461d-3a4e-40a5-9b29-c92115d578d1)
2023-10-30 13:14:08.796  INFO: [ContentDelivery.Uploader] 
=============
VERIFY FAILED with 1 error.
=============

@sergei-mikhailovskii-idf Thanks! It is good, because now we can check your problem without full AppStore publication process.

Can you please provide a minimal reproducible sample of this Issue? You need to remove all sentence(secret) information from your project. Simplify code as much as possible. But bug still needs to appear! And share this project on GitHub. It will help us for better understanding of this Issue.

dima-avdeev-jb avatar Oct 30 '23 15:10 dima-avdeev-jb

@dima-avdeev-jb sorry for the delay, here's the sample https://github.com/SergeiMikhailovskii/log-view-app

and here's the library which uses compose-multiplatform https://github.com/sergei-mikhailovskii-idf/kmm-debug-view

@dima-avdeev-jb hello! any updates here or not yet?

@sergei-mikhailovskii-idf Sorry, not yet. I will check your samples little bit later

dima-avdeev-jb avatar Nov 20 '23 14:11 dima-avdeev-jb

@dima-avdeev-jb no problems, it's ok

@sergei-mikhailovskii-idf have you found any solution?

Kashif-E avatar Nov 24 '23 08:11 Kashif-E

@Kashif-E hi! not yet. seems that the issue is in compatibility with some other dependency

having the same issue. @sergei-mikhailovskii-idf Do you mean to confirm that the problem is not with the Compose framework or skia library? It's because of some other dependency of your own.

xiangning17 avatar Nov 27 '23 07:11 xiangning17

@xiangning17 i think its some skia dependency

Kashif-E avatar Nov 27 '23 07:11 Kashif-E

@Kashif-E Thanks for the reply, I also saw the Rect-Native related issue you associated with it, and over there the issue was resolved, but there seems to be no official movement on the Compose side, so is there anything else that can be done at the moment?

I think it's a bit strange, if this is the issue that's causing it to not pass the App Store, then the amount of feedback on the issue shouldn't be so low, or is there actually no one actually using Compose for iOS for development at all yet 😂

xiangning17 avatar Nov 27 '23 07:11 xiangning17

having the same issue. @sergei-mikhailovskii-idf Do you mean to confirm that the problem is not with the Compose framework or skia library? It's because of some other dependency of your own.

Hi, I think that the problem is in compatability of the Compose and some other dependency

Sure, I will check sample https://github.com/SergeiMikhailovskii/log-view-app on this week. And try to locally verify it. I hope it helps to find root of the problem

dima-avdeev-jb avatar Nov 27 '23 12:11 dima-avdeev-jb

@sergei-mikhailovskii-idf Can you please check validation in Xcode when building archive?

To do so you need folow these steps:

  • Go to Product -> Archive
image * Don't use Xcode Cloud and start proccess of Archive again. * Wait some time while archiving * Choose Validate App image

@dima-avdeev-jb I select "Validate App" in the third step and it also fine, but when I select "Distribute App" I get an email from Apple telling me the same error message! I hope this helps.

xiangning17 avatar Nov 28 '23 12:11 xiangning17

The issue was with Facebook SDK and another analytic sdk that we were using @xiangning17 @sergei-mikhailovskii-idf

Kashif-E avatar Nov 29 '23 08:11 Kashif-E

The issue was with Facebook SDK and another analytic sdk that we were using @xiangning17 @sergei-mikhailovskii-idf

@Kashif-E Are you saying that you have a Facebook SDK dependency on cocapods in Kotlin Multiplatform that is causing this issue? Or are you saying that you are relying on the Facebook SDK in the Podfile of iosApp? I am locally reducing the dependencies in Kotlin Multiplatform to only compose related ones still reporting the error.

xiangning17 avatar Nov 29 '23 08:11 xiangning17

I had the facebook sdk as cocoapod on the native side. After the removal of fb sdk and another analytics sdk the error went away.

Kashif-E avatar Nov 30 '23 05:11 Kashif-E

@sergei-mikhailovskii-idf I reproduced the problem. But I have less problems in error description:

image

I will try to solve it

dima-avdeev-jb avatar Dec 02 '23 17:12 dima-avdeev-jb

@sergei-mikhailovskii-idf One of possible solution is to use dynamic frameworks To apply isStatic = false (or simply remove this line) in 2 gradle files:

But in this case was problems with CocoaPods dependencies in your project. Don't know much about this case of usage CocoaPods in Kotlin project.

I will continue research...

dima-avdeev-jb avatar Dec 02 '23 18:12 dima-avdeev-jb

@sergei-mikhailovskii-idf Also, I found that problem disappears after removing pod 'FirebaseDatabase' from iosApp/Podfile even with static=true https://github.com/SergeiMikhailovskii/log-view-app/blob/4f5ff82d45a04a81c7c17b571ae66c84335c31d3/iosApp/Podfile#L9

dima-avdeev-jb avatar Dec 02 '23 20:12 dima-avdeev-jb

Made minial reproducible sample here: https://github.com/dima-avdeev-jb/issue-3840-ios-pods-verification

dima-avdeev-jb avatar Dec 03 '23 06:12 dima-avdeev-jb

Hi @dima-avdeev-jb Is there any progress on this issue?

xiangning17 avatar Dec 14 '23 06:12 xiangning17

@xiangning17 For now you can use dynamic framework (isStatic = false in build.gradle.kts, or simple remove this line because it is false by default) Or do not use pod 'FirebaseDatabase'

dima-avdeev-jb avatar Dec 15 '23 05:12 dima-avdeev-jb

@sergei-mikhailovskii-idf Can you please try some of solutions what I mentioned before?

dima-avdeev-jb avatar Dec 15 '23 05:12 dima-avdeev-jb

But I depend on other libraries that are static and are required for Firebase integration😂

xiangning17 avatar Dec 15 '23 05:12 xiangning17

@sergei-mikhailovskii-idf Can you please try some of solutions what I mentioned before?

hello, sorry, didn't find a time yet( I'll try to do it approximately 23-24 December