6

I build an app successfully. After changing a bit, the build and run on simulator works still fine as expected, but the build and run with my physical device fails unexpected:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.build/Debug-iphoneos/WhagooAppFramework.build/Script-26D4B954E53A2CB72C219E1A.sh cd "/Users/oliverapel/Dropbox/WhaGoO/Project WhaGoO/App.iOS/development" /bin/sh -c /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Intermediates/WhagooAppFramework.build/Debug-iphoneos/WhagooAppFramework.build/Script-26D4B954E53A2CB72C219E1A.sh

mkdir -p /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/Alamofire/Alamofire.framework" "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks" building file list ... done Alamofire.framework/

sent 147 bytes received 26 bytes 346.00 bytes/sec total size is 1073519 speedup is 6205.31 Code Signing /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework with Identity iPhone Developer: Oliver Apel (W65P7YG9ZK) /usr/bin/codesign --force --sign B68B8D50CF4B9D2517527291D6F3D051423B194F --preserve-metadata=identifier,entitlements "/Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework" /Users/oliverapel/Library/Developer/Xcode/DerivedData/WhagooAppFramework-ckcaymayjufpexdicjfdawwbkeht/Build/Products/Debug-iphoneos/BerlinCapitalClub.app/Frameworks/Alamofire.framework: User canceled the operation. Command /bin/sh failed with exit code 1

In the last line I see user canceled the operation. but I do nothing like this.

I already cleaned build folder, removed derived data and now I don´t know what to do.

Oliver Apel
  • 1,808
  • 3
  • 19
  • 31
  • B68B8D50CF4B9D2517527291D6F3D051423B194F This is your device UDID and i think there is something with you provising profile . Did you added your device in your profile??? – Chanchal Warde May 20 '17 at 11:51
  • Yes I did. We have multiple devices registered and the issue comes up on all devices. – Oliver Apel May 20 '17 at 11:54
  • Did you add those devices in your provising profile. Why its showing Embed\ Pods\ Frameworks . Did you added any framework by drag and drop in your project?? – Chanchal Warde May 20 '17 at 12:09
  • If you added any framework by drag and drop , then you must know there are 3 type of framework 1) Simulator 2) Device 3) Universal. Follow this link. http://stackoverflow.com/questions/29634466/how-to-export-fat-cocoa-touch-framework-for-simulator-and-device – Chanchal Warde May 20 '17 at 12:20
  • 1
    You might want to try this out - http://stackoverflow.com/a/4132121/46297 – lostInTransit May 22 '17 at 06:23

3 Answers3

15

lock add unlock keychain solve the problem, it' weird.

responser
  • 432
  • 4
  • 7
  • 2
    I had Keychain opened and closing it resolved my problem – Artem Deviatov Mar 27 '18 at 21:33
  • That actually worked for me too, but its because the first time I archived, I denied the permission to the keystore – Nir Hartmann May 26 '18 at 12:54
  • Yes, "me too"s are verbotten on SO, but this was such a source of confusion to me that applying this simple solution came as a great relief. Upvoted and should be checked. – Phil Apr 28 '19 at 20:20
7

Try updating Certificates from Preference -> Accounts -> Choose developer account and Proper Team -> View Details -> Download all profiles.

Also, try doing Deep clean using Cmd+Shift+Alt+K. Make sure you have selected correct developer team in your general settings.

Also, Change Provisioning to Automatic. So that it will automatically fetch proper certificates.

After that, Goto Build Phases ->Link Binary frameworks-> Add Frameworks you want. Do this for all targets that you have.

Try this and let me know if error still occurs.

Hope it helps..

Balaji Ramakrishnan
  • 1,909
  • 11
  • 22
2

I just simply restarted my MacBook Pro. I found this solution here.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54