Remote Build problems using Visual Studio 2017. Error code 65 - ios

Our project is failing to run on iOS simulator in the new Visual Studio. This is the following error I get:
Severity Code Description Project File Line Suppression State
Error Remote build error from the build server http://<MY_IP>:3000/cordova - Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,/Users/developer/.taco_home/remote-builds/taco-remote/builds/46767/cordovaApp/platforms/ios/cordova/build-release.xcconfig,-workspace,Announce.xcworkspace,-scheme,Announce,-configuration,Release,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/developer/.taco_home/remote-builds/taco-remote/builds/46767/cordovaApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/developer/.taco_home/remote-builds/taco-remote/builds/46767/cordovaApp/platforms/ios/build/sharedpch ApbClient 1
It might have to do with the Cordova version. On new VS2017 the default Cordova version is 6.3.1 or Global Cordova 6.5.0. On VS2015 we were using Cordova 5.4.1.
Any ideas on what is causing this error? I have tried a bunch of things suggested in old StackOverflow questions but none of it seems to work. It was working fine on 2015, we have development team and everything set up. Could it be something I need to do on xCode? Any help is appreciated.

since xcode 8 they change the deploy politics, not sure it related to emulators but with actual device I had the same issue. It happened because provisioning profile is not set up properly.
- https://dpogue.ca/articles/cordova-xcode8.html, everything you need is configure the build.json file
my file is:
{
"ios": {
"debug": {
"developmentTeam": "XXXXXXXXXX",
"provisioningProfile": "ProfileName"
},
"release": {
"codeSignIdentity": "XXXXXXXx",
"developmentTeam": "XXXXX",
"packageType": "ad-hoc",
"provisioningProfile": "ProfileName"
}
}
}
anyway right now I got the 72 error,
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH

Related

Why do I get an error signing ionic-cordova ios app from the command line if it works perfectly in the gui version of xcode?

I'm trying to build an Ionic - Cordova iOs app from the command line (to use an azure devops build and deployment agent), but from the last updates (certificates, xcode, OS, etc), i have no success anymore.
After trying a lot of options, i'm some lost with xcode command line. A 'few updates' before, this command where working perfectly, so I don't know what are happening with the profiles and certificates.
This is the command lines that I'm using:
security unlock-keychain -p **** [keychainpath]
ionic build --prod
ionic cordova build ios --no-build --release --device --provisioningProfile="*****" -- --buildFlag="-UseModernBuildSystem=0" --developmentTeam=***** --codeSignIdentity="iPhone Developer" --packageType=app-store
And this this is the result (I omitting all the log before the "archive succeded"):
** ARCHIVE SUCCEEDED **
2019-11-15 08:01:36.413 xcodebuild[32327:470732] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/jg/06xlqgms5n54qgh0mcj3tkvw0000gp/T/******_2019-11-15_08-01-36.412.xcdistributionlogs'.
error: exportArchive: No profiles for '*********' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for '*****' were found" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=No profiles for '******' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching '******'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}
** EXPORT FAILED **
(node:31915) UnhandledPromiseRejectionWarning: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,*******.xcarchive,-exportOptionsPlist,/Users/*****/*****/_work/1/s/platforms/ios/exportOptions.plist,-exportPath,/Users/*****/*****/_work/1/s/platforms/ios/build/device
(node:31915) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31915) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have tryied to build the app with the GUI of XCode (and the same user) without problems, so I guess that certificates and provisioning profiles there must be allright.
Any clue on what are happening with the command line?
I finally found the answer: It was a bad combination of distribution profile and development profile parameters.
I found it using the --verbose mode in cordova build
I changed the way to define the parameters to build the ios package using a "build.json" definition file:
build.json
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "*******",
"packageType: development,
"provisioningProfile": "*******"
},
"release": {
"codeSignIdentity": "iPhone Distribution",
"developmentTeam": "******",
"packageType": "app-store",
"provisioningProfile": "*******"
}
}
}
Which can used with the command line as follows:
ionic cordova build ios --no-build --prod --release --device --buildConfig build.json
Thanks to this I was able to see where the problem was and finally a was able to get the ipa file well signed.

Remotebuilderror with visual studio + cordova (error code 65)

I am trying to build (remotebuild) an IOs App with Visual Studio 2017 (Cordova) on Windows 10 but getting a build error: "Build failed with error Error Code 65 for command: xcodebild with args".
When I take a closer look at the build.log file on my Mac it shows me a Code signing error:
Code Signing Error:
[Application] requires a provisioning profile. Select a provisioning profile for the "Release" build configuration in the project editor. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'
I've already created an provisioning Profile manually via https://developer.apple.com/account/ios/profile/create but how can I include that file in my build configurations, if I am not building the application with Xcode directly.
You'll need to include the details in your build.json file, something like this:
"ios": {
"debug": {
"packageType": "development",
"developmentTeam": "YOUR_DEV_TEAM_ID",
"codeSignIdentity": "iPhone Developer",
"provisioningProfile": "PROVISIONING_PROFILE_UUID"
},
"release": {
"developmentTeam": "YOUR_DEV_TEAM_ID",
"codeSignIdentity": "iPhone Developer",
"provisioningProfile": "PROVISIONING_PROFILE_UUID",
"packageType": "enterprise"
}
}
Check that the app id that you used to create your provisioning profile matches the id that's specified at the top of your config.xml file.
Add --buildFlag="-UseModernBuildSystem=0" to your build.json file.

No 'teamID' specified and no team ID found in the archive in ionic

Working in Ionic 2, then upgrading to 3 to try to fix this error. It began when I was trying to figure out a cordova plugin. The archive doesnt appear to be signed correctly.
** ARCHIVE SUCCEEDED **
2017-10-03 14:40:10.745 xcodebuild[4293:73077] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/12/9djblkvn1_7g0_41crqy9ht00000gn/T/Omnidispatch_2017-10-03_14-40-10.744.xcdistributionlogs'.
2017-10-03 14:40:10.965 xcodebuild[4293:73077] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa1dde9d300>: Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
error: exportArchive: No 'teamID' specified and no team ID found in the archive
Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,Omnidispatch.xcarchive,-exportOptionsPlist,/Developer/omnisolutions/omni-ionic/platforms/ios/exportOptions.plist,-exportPath,/Developer/omnisolutions/omni-ionic/platforms/ios/build/device
There have been a few solutions that suggest that its not the team id, but rather a certificate error. I'm not very good with mac certificates, but they seem to be in place and I've not changed them since this broke.
I have gone into xcode a time or two and the team was not saved, I've fixed that every time I've seen it and it seems to be staying there now, but its still not changing anything when i run ionic build ios
What else can I check?
I should add, that it builds in xcode 8, but not in vscode or on the commandline as it did previously.
I faced the same issue during a ionic cordova build without signature (for
pro MDM):
ionic build ios --release --device
--buildFlag="-UseModernBuildSystem=0"
finally I smash it using a build.json at the root folder with only the developmentTeam Info filled
{
"ios": {
"debug": {
"codeSignIdentity": "Apple Development: BLa BLa (XXXXXXX)",
"provisioningProfile": "<XXXXXX-XXXXXX-XXXXX>",
"provisioningProfileFile": "embedded.mobileprovision",
"certificateFile": "blabla.p12",
"developmentTeam": "<TEAMID>"
},
"release": {
"codeSignIdentity": "",
"provisioningProfile": "",
"provisioningProfileFile": "",
"certificateFile": "",
"developmentTeam": "<TEAMID>"
}
}
}
Hope it's help you
Unfortunately I did not find a great solution for this error. I was forced to rm -rf my directory, uninstall ionic and cordova and bring it all down from git and set it up again.

Missing Build.json file in Cordova App

I am trying to run my Ionic Cordova Mobile App on an iPhone from Visual Studio using remotebuild remote device on a Mac.
The issue I am facing is that my Visual Studio project is missing a build.json file which I have since created and entered the following:
{
"ios": {
"debug": {
"developmentTeam": "XXXXX"
},
"release": {
"developmentTeam": "XXXXX",
"codeSignIdentity": "iPhone Developer"
}
}
}
I keep receiving the following error:
Error:Remote build error from the build server Build failed with error Unexpected token in JSON at position 0 -1
I am using XCode 8 and Cordova CLI 6.2.0
Any advice as to what I am doing wrong?

Newbie: Signing Error while deploying to iOS Device

I am new to NativeScript and iOS development and trying to do a demo project as mentioned in tutorial video.
Able to use iOS emulator and make it work Connected new iOS iPad and trying to run against it using tns run ios device 1 I verified device id using tns device ios
Do I need Apple Developer Paid account to deploy to iOS device? Or do i need to setup device first ??? any steps which I am missing?
Log:
Project successfully prepared Build settings from command line:
ARCHS = armv7 arm64
CONFIGURATION_BUILD_DIR = /Users/demo/platforms/ios/build/device
SDKROOT = iphoneos9.1
SHARED_PRECOMPS_DIR = /Users/demo/platforms/ios/build/sharedpch
VALID_ARCHS = armv7 arm64
=== BUILD TARGET demo OF PROJECT demo WITH CONFIGURATION Debug ===
Check dependencies build-debug.xcconfig line 2: Unable to find
included file "Pods/Target Support Files/Pods/Pods.debug.xcconfig"
build-debug.xcconfig line 3: Unable to find included file
"../plugins-debug.xcconfig" Code Sign error: No code signing
identities found: No valid signing identities (i.e. certificate and
private key pair) were found.
** BUILD FAILED **
The following build commands failed:
Check dependencies (1 failure) Command xcodebuild failed with exit code 65
Here is my packages.json:
{
"nativescript": {
"id": "org.nativescript.demo",
"tns-ios": {
"version": "1.5.0"
},
"tns-android": {
"version": "1.5.0"
}
},
"dependencies": {
"tns-core-modules": "1.5.0"
}
}

Resources