I just moved from one Mac to another. This one runs Sierra and I just set up all the NativeScript components on it. I copied the code (app directory and everything related, NOT the Xcode files) from my old machine to this one, ran it - all OK in the simulator. Now, I try to publish a build and the process fails, as follows:
=== BUILD TARGET myappname OF PROJECT myappname WITH CONFIGURATION Release ===
Code Signing Error: Signing for "myappname" requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
Warning: Multiple build commands for output file /Users/apple/Library/Developer/Xcode/DerivedData/myappname-cdlhzpsgzserlxbesufbjmnlkeyt/Build/Intermediates.noindex/ArchiveIntermediates/myappname/InstallationBuildProductsLocation/Applications/myappname.app/Frameworks/TelerikAppFeedback.framework
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
So I edited build.xcconfig and added in my Team ID there, as the value for DEVELOPMENT_TEAM. Now, when I run the same command (tns publish ios
=== BUILD TARGET myappname OF PROJECT myappname WITH CONFIGURATION Release ===
error: open /Users/apple/Library/Developer/Xcode/DerivedData/myappname-cdlhzpsgzserlxbesufbjmnlkeyt/Build/Intermediates.noindex/ArchiveIntermediates/myappname/InstallationBuildProductsLocation/Applications/myappname.app/Frameworks/TelerikAppFeedback.framework/_CodeSignature/CodeResources: No such file or directory
** ARCHIVE FAILED **
Command xcodebuild failed with exit code 65
What can I do to fix this? I don't want to go back to using Xcode. I assume there's a way to edit some files somewhere to make all this work OK. Any help appreciated!
Yes, I've looked on StackOverflow and on discussions here. There are peripheral references to the xcconfig file, etc. But nothing even close to my problem.
I went online and revoked the certificate to the other Mac, just in case tns was being network-aware. Made no difference.
I also tried tns variations like building an ipa (tns prepare ios -provision). All comes back to same issue: can't code-sign (I guess).
OS X 10.13.1 (High Sierra)
For iOS
This is what I have as far as the environment goes:
Component│Current version
------------|----------------
nativescript | 3.2.0
tns-core-modules | 3.3.0
tns-android│ 3.2.0
tns-ios│ 3.2.0
tns | 3.2.0
As described above.
No, it all works OK, just the publishing fails.
Hi @nmandyam
What version of Xcode you use and what is the exact command you run?
Can you please try to tns build ios --release --for-device --provision, it will list all available provisioning profiles on your machines, then you can select one and rerun command specifying the provision you want.
@dtopuzov, thank you for that pointer - I tried that unsuccessfully, but finally did the following, to make it all work:
tns build ios --release --for-device --provision, got the provision IDs (there were two), identified the one I wanted to usetns platform remove iostns platform add iostns run ios --provision <my provision uuid>tns publish ios <my Apple Dev ID> <my Apple Dev password>.Of course, if there's a better way to do this, would love to hear. Also, would love to see the tns script filling out the workspace file more in line with Xcode's expectations, but maybe I'm asking for too much.
Regardless, this all worked out. Thanks!
I am having a similar issue. But when I run tns build ios --release --for-device --provision I get:
ENOENT: no such file or directory, scandir '/Users/charlesdupont/Library/MobileDevice/Provisioning Profiles/'
@cadupont23 have you downloaded your provisioning profiles? (here)
Closing this one as the reported issue is resolved.
Most helpful comment
@dtopuzov, thank you for that pointer - I tried that unsuccessfully, but finally did the following, to make it all work:
tns build ios --release --for-device --provision, got the provision IDs (there were two), identified the one I wanted to usetns platform remove iostns platform add iostns run ios --provision <my provision uuid>tns publish ios <my Apple Dev ID> <my Apple Dev password>.Of course, if there's a better way to do this, would love to hear. Also, would love to see the tns script filling out the workspace file more in line with Xcode's expectations, but maybe I'm asking for too much.
Regardless, this all worked out. Thanks!