How to recover Android key file in Phonegap build? - phonegap-build

So I stopped using Phonegap build and started signing my app in a different way (I'm building using Eclipse and stupidly made a new keystore file), so Google is not letting me upload my most recent APK because it was signed differently. How do I recover the key file from Phonegap build that I have been using, and if I can't do this, how do I replicate the key file exactly as it was?

Signing Your Applications
Android requires that all apps be digitally signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app, and the certificate does not need to be signed by a certificate authority.... More...
http://developer.android.com/tools/publishing/app-signing.html#studio
In your eclipse follow this steps
Package Explorer > Your_project right click > Android Tools > Export Signed Application Package

Related

How to sign and notarize an electron application build using visual studio code for macOS for outside mac app store?

I've created an electron application using visual studio code to publish outside mac app store. Before the macOS 10.14.4 release, my application was build and signed successfully using electron-osx-sign module which uses electron-forge internally. Now after macOS update I'm getting error message while building the application as - "rejected source = Unnotarized Developer ID".
I'm finding solutions available for application build in Xcode all over the internet but there is no specific solution for applications build in visual studio code using javascript.
The command I'm using to create a build for my macOS :
"electron-packager . appName --overwrite --platform=darwin --arch=x64 --electron-verison=5.0.1 -icon=icon.icns --osx-sign"
Kindly provide with your inputs for any possible solution.
TL;DR
For me, changing the password to app specific password resolved this error.
Explanation
App Store Connect now requires two-factor authentication (2FA) on all accounts, so you must create an app-specific password for Notarisations tools also.
How to create app-specific password: https://support.apple.com/en-us/HT204397)
Why you need app-specific password: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc#3087734
(By the way, the “Unnotarized Developer ID” warning will still be showing because electron process checks the staple before notarizing, but then it will continue and the build will complete)

Using VSTS to build and deploy ionic app to both android and IOS

I have a ionic v1 app that I am trying to create both an android and ios version of the app using a Visual Studio Team Services build definition. The app builds out for both ios and android. I am now howerver having trouble with the Xcode IOS build of the app.
ionic cordova build ios --release
The above command creates the ios platform along with the xcode project and workspace file.
I then have the following VSTS XCode tasks to try build the ipa file for the ios app.
I have created both the p12 cert and provisioning profile and added them to the project. Both of which pass when running the build definition.
Here is my Xcode build configuration
The build definition fails at this point with the following erros
Code Signing Error: App has conflicting provisioning settings. App is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
and
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
After trying both manual and automatic signing with no joy, I finally got it to work with a few minor tweaks.
When installing the apple certificate, select temporary keychain and supply a password. If you don't use this the build agent will be waiting for user input to type the keychain password causing the build to timeout.
Switch to manual signing.
In the apple certificate install task and the Xcode build task to set the "Certificate Signing Identity" equal to the full name of the cert including the team name in brackets.
In my case, I was able to build, archive and export the ionic iOS App integrating a build.json file in the project structure, at root level:
{
"ios": {
"release": {
"codeSignIdentitiy": "iPhone Distribution: TEAM_NAME (TEAM_ID)",
"developmentTeam":"TEAM_ID",
"provisioningProfile": "UUID",
"packageType": "ad-hoc"
}
}
}
Notice that in my case I wanted to generate and ad-hoc distribution, but you can generate the app for the store, development or enterprise distribution.
Once the project is prepared and built, an exportOptions.plist file is generated in the iOS Cordova project with all the configuration to export the app and generate the IPA file.
Take a look at the cordova documentation about using build.json here: https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
Then, In the Xcode VSTS task, I followed all the recommendations from #psyco :
Manual signing using the full name for the signing identity and the provisioning profile UUID.
Also take into account that for the provisioning profile name, Xcode 9 (the one used by default on VSTS Mac OS Agents at this moment) does not accept Xcode-generated Provisioning Profile (with "XC iOS" in the name), mine was like that and was weird to find the solution, thanks to Cœur
Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile
With all those things, finally I was able to do it, and also to send the IPA to App Center using another VSTS task, so the IC cycle was completed.

Xamarin.Mac installer not working

I have a Xamarin.Mac solution that runs correctly in Debug or Release build from within Xamarin Studio, but I am struggling to create a working installer for it.
I want to use direct distribution (outside the App Store), so this is the procedure I used to create the installer:
Within the Apple developer portal:
Created "Developer ID" application and installer certificates
Created an App ID for the app
Created a provisioning profile that references the App ID and the
application certificate
Downloaded the 2 certificates and the provision profile
On the development Mac:
Double-clicked the 2 certificates and verified that they were
installed in Keychain Access
Double-clicked the provisioning profile and verified that it was
installed in Profiles
Within Xcode:
Opened Preferences > Accounts and downloaded the provisioning profile
Restarted Xcode to propagate the downloads to Xamarin Studio
Within Xamarin Studio:
Configured the Bundle ID in info.plist (to match the App ID)
Selected the Release build signing identity, as created above
Selected the Release build provisioning profile, as created above
Selected the Release build installer identity, as created above
Rebuilt the solution in Release build configuration
After the build is complete, the bin/Release folder contains everything I would expect, including the .pkg and .app files.
If I double-click the .pkg file, it appears to correctly execute the installation sequence, but the installed app is not listed in Applications or Launchpad. Moreover, if I run the .app file from its bin/Release folder, it executes correctly, but if I manually move it to the Applications folder, it crashes on startup.
Within Utilities > System Information > Software > Applications, I can see that the app was installed and that its source is an "Identified Developer", so this seems to confirm that the signing worked correctly.
I'm puzzled why, if it was correctly installed, I am unable to run it.
Sorry, I am quite new to both Mac and Xamarin.Mac, so I am not completely sure what I should expect to see here, but I assume it's more than I am currently seeing.
Any clues please?
Likely if you are able to run an application locally but not able to via an installed package, you are running into code signing issues.
As noted here you could try running your application from the command line:
Run your application from the command line and look at the output (in
the Terminal app) by using: MyApp.app/Contents/MacOS/MyApp (where
MyApp is the name of your application)
and see if you are getting a code signing specific error on launch.
If so, then possibly your machine may not be on the provisioning profile/certificate selected.

How does an Xcode Bot choose the certificate used to sign an .ipa if everything is set to "Automatic"?

As per this Apple article, I have set up my project to automatically code sign.
A Bot set to run a scheme using the "Release" configuration builds an archive which uploads to TestFlight fine (via pilot.)
A Bot set to run a scheme using the "Debug" configuration builds, but fails to upload to TestFlight because of a certificate error. Inspecting the .ipa, its embedded.mobileprovision contains a development certificate.
Why? What makes Xcode decide to use a Development certificate for Debug builds and a Distribution certificate for Release builds?
The debug builds use the iOS Team Provisioning Profiles. If you set the team on the Xcode portion of the Server app, it automatically downloads all the profiles to the right directory in your system for the bot to locate them. Otherwise you have to copy them manually to the /library/developer/xcodeserver/provisioning profile directory.

Code Sign Identity Missing

I am trying to submit my Mac Application to the AppStore, but I cannot see the 3rd Party Mac Developer Installer identity under Code Signing.
I have downloaded both the Application and Installer certificates and they both show in Keychain, but only the Application identity shows in Xcode.
Found out the problem,
The time I tried it, I had neither the Application or Installer cert installed, so it was refusing it outright, but only warned me about the Installer cert.
I must have read somewhere that i needed to sigh the application using the Installer cert, but the guys on the DevForums told me I needed the sign the application with the Application cert, and then when submitting the application the sheet will prompt me to sign it with the Installer cert.
If anybody has the same problem, there is your answer.

Resources