Select to view content in your preferred language

ArcGIS - No such module error

1248
4
07-05-2023 07:01 AM
mprogers
Emerging Contributor

I am attempting to run ArcGIS on Swift (having temporarily given up on .NET MAUI). I downloaded the Display a Map sample project, clicked run and got an error -- "No such module" -- on this line:

import ArcGIS

This is with Xcode Version 15.0 beta 2 (15A5161b), which might explain the problem, but I've read discussions of this problem back to 2017, so possibly not.

Any suggestions as to how to resolve this would be most appreciated!

Tags (2)
0 Kudos
4 Replies
NimeshJarecha
Esri Regular Contributor

Hi @mprogers,

Have you added the ArcGIS package as per step 3 of  `Create a new Xcode project`?


3. Add a reference to the API using Swift Package Manager.



Regards,

Nimesh

0 Kudos
Ting
by Esri Contributor
Esri Contributor

Also, please double check if ArcGIS exists under the project file's "General > Frameworks, Libraries, and Embedded Content" section. Sometimes if it is a legacy project or the Swift package isn't added correctly, the framework isn't embedded, thus cause the "No such module" error.

KavishGhime3
Emerging Contributor

Thanks @Ting . This worked for me. Even though the package dependency was added, the value was empty for General > Frameworks, Libraries, and Embedded Content" section. I only had to click the "+" sign, and select "ArcGIS", and then the build succeeded.

0 Kudos
Ting
by Esri Contributor
Esri Contributor

Glad it works for you! Sometimes Xcode behaves unexpectedly and we have to adapt to it…

0 Kudos