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

IOS openid4vc example app - No such module shared #877

Open
c0ball opened this issue Jan 12, 2025 · 10 comments
Open

IOS openid4vc example app - No such module shared #877

c0ball opened this issue Jan 12, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@c0ball
Copy link

c0ball commented Jan 12, 2025

Hey everyone,

when I try to run the IOS openid4vc example app in Xcode, I receive an error in the ContentView, that the import of the shared library can not be resolved with the following error: No such module shared.

I've tried running pod install, which resulted in the following error: Analyzing dependencies [!] No podspec found for 'shared' in '../shared/build/cocoapods/publish/debug/shared.podspec'

Therefore I would like to know, how I can build the required shared library for the ios app.

To Reproduce

Steps to reproduce the behavior:

  1. git clone https://github.com/walt-id/waltid-identity.git
  2. Open iosApp.xcodeproj in Xcode
  3. Press the "Run" button

Thanks for your help🙏

@c0ball c0ball added the bug Something isn't working label Jan 12, 2025
@alegomes
Copy link
Contributor

Hi @c0ball

do this and try again.

$ cd waltid-identity 
$ ./gradlew -PenableIosBuild=true :waltid-applications:waltid-openid4vc-ios-testApp:shared:generateDummyFramework
$ cd waltid-applications/waltid-openid4vc-ios-testApp/iosApp/
$ pod install

Let me know if you need any further help.

Best
Ale

@c0ball
Copy link
Author

c0ball commented Jan 14, 2025

Hey @alegomes

thanks for the quick reply, unfortunately this does not solve my issue.

I was able to do run the gradlew build using your command,
but when running pod install in the waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/iosApp
directory I receive the same error as before:

➜  iosApp git:(main) pod install
Analyzing dependencies
[!] No podspec found for `shared` in `../shared/build/cocoapods/publish/debug/shared.podspec`

@alegomes
Copy link
Contributor

Could you, please share with me the result of these 3 commands?

$ ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp
$ ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/share
$ ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/iosApp
$ ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/iosApp/iosApp

thanks

@alegomes alegomes reopened this Jan 14, 2025
@c0ball
Copy link
Author

c0ball commented Jan 14, 2025

Thanks again for the quick reply.

Desktop ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp
total 0
drwxr-xr-x  7 c0ball  staff  224 Jan 14 09:44 iosApp
drwxr-xr-x  6 c0ball  staff  192 Jan 14 09:43 shared
Desktop ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/shared
total 16
drwxr-xr-x  3 c0ball  staff    96 Jan 14 09:43 build
-rw-r--r--  1 c0ball  staff  1992 Jan 14 09:43 build.gradle.kts
-rw-r--r--  1 c0ball  staff  2381 Jan 14 09:43 shared.podspec
drwxr-xr-x  3 c0ball  staff    96 Jan 14 09:43 src
Desktop ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/iosApp
total 16
-rw-r--r--  1 c0ball  staff  309 Jan 14 09:43 Podfile
-rw-r--r--  1 c0ball  staff  498 Jan 14 09:43 Podfile.lock
drwxr-xr-x  5 c0ball  staff  160 Jan 14 09:44 Pods
drwxr-xr-x  7 c0ball  staff  224 Jan 14 09:43 iosApp
drwxr-xr-x@ 5 c0ball  staff  160 Jan 14 09:47 iosApp.xcodeproj
Desktop ls -l waltid-identity/waltid-applications/waltid-openid4vc-ios-testApp/iosApp/iosApp
total 24
drwxr-xr-x  5 c0ball  staff   160 Jan 14 09:43 Assets.xcassets
-rw-r--r--  1 c0ball  staff  2144 Jan 14 09:43 ContentView.swift
-rw-r--r--  1 c0ball  staff   286 Jan 14 09:43 Info.plist
drwxr-xr-x  3 c0ball  staff    96 Jan 14 09:43 Preview Content
-rw-r--r--  1 c0ball  staff   221 Jan 14 09:43 iosAppApp.swift

*In the second command, I changed share to shared.

@alegomes
Copy link
Contributor

In the second command, I changed share to shared.

Ooops. Sure. My mistake.

This command completed successfully?

cd waltid-identity && ./gradlew -PenableIosBuild=true :waltid-applications:waltid-openid4vc-ios-testApp:shared:generateDummyFramework

image

Can you share the output?

thanks
Ale

@c0ball
Copy link
Author

c0ball commented Jan 14, 2025

Sure, here it is.

Desktop cd waltid-identity && ./gradlew -PenableIosBuild=true :waltid-applications:waltid-openid4vc-ios-testApp:shared:generateDummyFramework 

> Configure project :
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-applications:waltid-cli
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols

w: 'java' Gradle plugin is not compatible with 'org.jetbrains.kotlin.multiplatform' plugin.

Consider adding a new subproject with 'java' plugin where the KMP project is added as a dependency.

w: 'application' (also applies 'java' plugin) Gradle plugin is not compatible with 'org.jetbrains.kotlin.multiplatform' plugin.

Consider adding a new subproject with 'application' plugin where the KMP project is added as a dependency.


> Configure project :waltid-libraries:waltid-core-wallet
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:waltid-did
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:waltid-java-compat
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:waltid-library-commons
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-e2e-tests
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-issuer-api
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-service-commons
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-service-commons-test
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-verifier-api
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-services:waltid-wallet-api
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-applications:waltid-openid4vc-ios-testApp:shared
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:auth:waltid-idpkit
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:auth:waltid-ktor-authnz
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:auth:waltid-permissions
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:credentials:waltid-dif-definitions-parser
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:credentials:waltid-mdoc-credentials
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:credentials:waltid-verifiable-credentials
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:credentials:waltid-verification-policies
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:crypto:waltid-crypto
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:crypto:waltid-crypto-aws
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:crypto:waltid-crypto-ios
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:crypto:waltid-crypto-oci
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:crypto:waltid-target-ios
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:protocols:waltid-openid4vc
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:sdjwt:waltid-sdjwt
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


> Configure project :waltid-libraries:sdjwt:waltid-sdjwt-ios
w: The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
For more details, see: https://kotl.in/gradle/internal-compiler-symbols


Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

@alegomes
Copy link
Contributor

Ok. So, let's do this:

In the file waltid-applications/waltid-openid4vc-ios-testApp/iosApp/Podfile,

change

../shared/build/cocoapods/publish/debug/shared.podspec

to

../shared/shared.podspec

and try pod install again.

[]s

@c0ball
Copy link
Author

c0ball commented Jan 14, 2025

So after changing the path, I was able to run pod install

iosApp git:(main) ✗ pod install
Analyzing dependencies
Downloading dependencies
Installing JOSESwift (3.0.0)
Installing shared (1.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `iosApp.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.

[!] The `iosApp [Debug]` target overrides the `ENABLE_USER_SCRIPT_SANDBOXING` build setting defined in `Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `iosApp [Release]` target overrides the `ENABLE_USER_SCRIPT_SANDBOXING` build setting defined in `Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

After opening the iosApp.xcworkspace and trying to compile the app, I receive the error Cannot find 'Uuid' in scope which is caused by line 30 of ContentView.swift

kid = Uuid.random().uuidString

to fix this error, I replaced it like so:

kid = UUID().uuidString

But now I do receive the following error:
image

Line 34 of ContentView.swift

@alegomes
Copy link
Contributor

Cool. We are moving forward.

Give me some time to investigate this (I'm not a Swift dev).

@c0ball
Copy link
Author

c0ball commented Feb 13, 2025

Hey @alegomes, I just wanted to ask if there is an update yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants