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?
Related
I have a problem to communicate between my macmini and my iphone 7 (version 11.4) with Appium. My build is successfull on xCode and the version of Appium is the last 1.18.0-1.
My capabilities in Appium are :
{
"platformName": "iOS",
"platformVersion": "11.4",
"bundleId": "com.altran.deltadore.tydom",
"deviceName": "iPhone7",
"udid": "0afc3d4352c3f2d720a9ffca2d971b118b9a7e17",
"xcodeSigningId": "jerome.thomoux#altran.com",
"xcodeOrgId": "WUQ4U559T2",
"automation_name": "XCUITest"
}
The error message in Appium when I start the session is :
An unknown server-side error occurred while processing the command. Original error: App with bundle identifier 'com.altran.deltadore.tydom' unknown
Add one more capability as :
"app" : "Path_to_your_ipa_file";
Secondly, you have to add udid while signing the ipa build for the devices you have to use the build.
ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."
This issue has been plaguing me for the last 3-4 days, I have tried resigning and I am using a build config that looks like this:
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"provisioningProfile":"ID found in myapp.mobileprovision",
"developmentTeam": "VKUC8843LP",
"packageType": "development"
},
"release": {
"codeSignIdentity": "iPhone Developer",
"provisioningProfile":"ID found in myapp.mobileprovision",
"developmentTeam": "VKUC8843LP",
"packageType": "app-store"
}
}
}
I am using cordova and here's the commands I am running to build the app:
cordova build ios --release --buildConfig
cd platforms/ios
pushd "build"
mkdir ./Payload
cp -R "emulator/myapp.app" ./Payload
zip -qyr MyApp.ipa ./Payload
rm -r ./Payload
popd
Then I put it in the ApplicationLoader and everytime I send it off, I get the above message. I have a build.json inside /App (directory before www). When I open the XCode file and checking to sign it says:
Provisioning profile "myapp" doesn't include signing certificate "iPhone Distribution: DEv Name(MYID1234)".
This is a problem with the new XCode 10 build system, which Cordova is not (yet) compatible with. Previous versions of XCode were opt-in for the new build system, but as of XCode 10 it's opt out.
If you're using XCode to do your build, then just go to File > Workspace Settings and select "Legacy Build".
Here are more details from the Cordova team: https://github.com/apache/cordova-ios/issues/407
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.
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.
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