PhoneNumberKit icon indicating copy to clipboard operation
PhoneNumberKit copied to clipboard

`No such file or directory: '~/DerivedData`

Open d-warfield opened this issue 1 year ago • 9 comments

The following error occurs when running my app on an actual phone (not the simulator):

No such file or directory: '~/DerivedData/apple-client-kjiouewknasoiuqwelk/Build/Products/Debug-iphoneos/PackageFrameworks/PhoneNumberKit-Dynamic.framework/PhoneNumberKit-Dynamic'

It does, however, run fine on the simulator. Any ideas what's going on?

iPhone Model: iPhone 14 Pro Max iOS Version: 17.3 Xcode Version: 15.2

d-warfield avatar Feb 07 '24 16:02 d-warfield

Same issue with me

mfan0425 avatar Mar 02 '24 20:03 mfan0425

It looks like a version issue. It might have been resolved. I updated the package to the latest version (3.7.9) and the issue disappeared.

mfan0425 avatar Mar 02 '24 20:03 mfan0425

Don't add the dynamic library.

ibrahim-alzant avatar Mar 09 '24 23:03 ibrahim-alzant

Don't add the dynamic library.

This did not work.

ashoukr avatar Apr 18 '24 22:04 ashoukr

Same issue with me too

workhitesh avatar Apr 24 '24 18:04 workhitesh

Solution is to compile the project via command line.

ashoukr avatar Apr 26 '24 00:04 ashoukr

Solution is to compile the project via command line.

When I try to build project via command line I did get this error

The following build commands failed: Copy /Users/UserName/Documents/MyApp/MyApp/build/Release-iphoneos/MyApp.app/PhoneNumberKit_PhoneNumberKit.bundle /Users/UserName/Documents/MyApp/MyApp/build/Release-iphoneos/PhoneNumberKit_PhoneNumberKit.bundle (in target 'MyApp' from project 'MyApp')

Mohamed-Khaterr avatar Apr 26 '24 03:04 Mohamed-Khaterr

what I did exactly was remove the package, remove the derived data, reinstall the package, build via Xcode cli.

Solution is to compile the project via command line.

When I try to build project via command line I did get this error

The following build commands failed: Copy /Users/UserName/Documents/MyApp/MyApp/build/Release-iphoneos/MyApp.app/PhoneNumberKit_PhoneNumberKit.bundle /Users/UserName/Documents/MyApp/MyApp/build/Release-iphoneos/PhoneNumberKit_PhoneNumberKit.bundle (in target 'MyApp' from project 'MyApp')

ashoukr avatar Apr 26 '24 03:04 ashoukr

Follow this same steps and same version it will solve this issue on real device

From Xcode 11+ :

Select File > Swift Packages > Add Package Dependency. Enter https://github.com/marmelroy/PhoneNumberKit.git in the "Choose Package Repository" dialog. In the next page, specify the version resolving rule as "Up to Next Major" from "3.7.0". After Xcode checked out the source and resolving the version, you can choose the "PhoneNumberKit" library and add it to your app target.

NOTE: Don't include Dynamic library only PhoneNumberKit

iosdeviguru avatar May 02 '24 09:05 iosdeviguru

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 02 '24 03:07 github-actions[bot]