Why is Ionic ios cordova build failing - xcode

When creating an ios build with the ionic command:
ionic cordova build ios --prod --buildFlag='-UseModernBuildSystem=0'
I keep getting the following code signing error:
Code Signing Error: No profiles for 'mybundleid' were found: Xcode
couldn't find any iOS App Development provisioning profiles matching 'mybundleid'.
Automatic signing is disabled and unable to generate a profile.
To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

While there are plenty of good answers (e.g. https://stackoverflow.com/a/44102979/4553162), my issue was actually because of an incorrect entry in my config.xml file where I was configuring the cordova branch plugin:
<branch-config>
<branch-key value="my-live-key" />
<uri-scheme value="my-scheme" />
<link-domain value="myapp.app.link" />
<ios-team-release value="INCORRECT_APP_PREFIX" />
</branch-config>
The INCORRECT_APP_PREFIX actually overwrites what you had in your build.json and is the source of the code signing error.
By changing it to the correct app prefix, the build completed correctly

Related

AD-Hoc option is not coming in my project in xamarin

I added it manually in app.iOS.csproj file in tag and in the main solution file. Now it is showing and I am successfully able to archive my project and iPA file is made. But the problem is that I am unable to install my app on device when installing through diawi.
I solved the problem by adding "aps-environment" key with value as
"production" in Entitlements.plist in my iOS project
Previously there was "development" as value. I changed it to "production"

Error when building application using cordova

I am using cordova 6.5.0 and when I run "cordova build ios" the build failed with error "No profile for team **** matching ***** found"
but when I open the project in Xcode I am able to build and archive using the same provision profile
How do I solve this?
1) Do you have any Embedded Frameworks in your project?
Go to Build Phases > Under Embed Frameworks
Tick the checkbox for Code Sign On Copy
And try to build again
2) Try to double check your certificate and your provisioning profile if it is selected correctly
Hope it helps!

Xamarin: VSTS to generate ipa and apk files

Is it possible to use VSTS release generate ipa and apk files and release to the stores ?
There should be Build Definitions to create an .apk and .ipa in VSTS. You can see the Build Steps here:
Xamarin.Android:
https://www.visualstudio.com/en-us/docs/build/apps/mobile/xamarin#build-steps
Inside the Build: Xamarin.Android step, there is a note saying that the project needs a PackageForAndroid target.
Note: The projects must have a PackageForAndroid target.
i.e. /t:PackageForAndroid
https://www.visualstudio.com/en-us/docs/build/steps/build/xamarin-android
Xamarin.iOS:
https://www.visualstudio.com/en-us/docs/build/apps/mobile/xamarin#build-steps-1
Inside the Build: Xamarin.iOS step, there is an Create App Package argument you can use:
https://www.visualstudio.com/en-us/docs/build/steps/build/xamarin-ios
I would highly advise that you read through each Build Steps on both Xamarin.Android and Xamarin.iOS to get a better idea of what's going on!

Deployment error in xamarin project "InstallPackageAssemblies" -- FAILED

In Xamarin project I got deployment errors those are below
"InstallPackageAssemblies" -- FAILED.
"_Upload" in project "LiUpHandy.csproj" -- FAILED.
Done building project "LiUpHandy.csproj" -- FAILED.
Can anyone help me ?
Ultimately I found the solution to this problem
Follow these steps :
> Go to settings on your device
> Application Manager
> Find 'All' or 'Running' Tab's apps
> Find your own app's package name like com.packagename
> Uninstall that package name i.e. app
> Hit the Debug in your VS2015 to run Xamarin.Android App on your real device
Had same thing.
Try running vs as Admin.
I had some more issues after.
try new sdk, ndk, jdk.
The one from unreal engine nvidia pack worked for me. Make sure you change path in tools->options->Xamarin

CLI Cordova change ios build target

I added in my iOS project 3 targets (with different provisioning, different plist and specific configurations).
Target 1 --> MyApp-Info.plist
Target 2 --> MyApp-2-Info.plist
Target 3 --> MyApp-3-Info.plist
However, when I execute the command cordova build ios I can not choose the target to compile. It is always the target by default (Target 1).
In the logs of the Terminal, I have always the following line:
ProcessInfoPlistFile build/emulator/MyApp.app/Info.plist MyApp/MyApp-Info.plist
Is there a way to choose the target to compile? or a Xcode project configuration?
Use a before_build hook in combination with a shell variable to dynamically copy/rename the required .plist file to MyApp-Info.plist. Eg: BUILD_TARGET=1 cordova build ios. The before hook should then of course take BUILD_TARGET into account.

Resources