I get warning that "Invalid Code Signing Entitlements" with Apple Distribution Profile - xamarin.ios

I have an app which is on AppStore. It is signed as ios distrubution.
After a while my certificates are expired on apple developer account. I revoked these and created again. And I started seeing two certificates (iOS Distribution and Distribution). I saw a warning that is "Distribution for use in Xcode 11 or later".
Now I will update my app on appstore but I can't sign it with "iOS Distrubution". Because my xcode version is 11.5.
When I choose "iOS Distrubition" on my provisioning profile I can't sign my app.
When I choose "Distrubition" on my provisioning profile I can sign my app. But in this case while I try to upload app to appstore, I get a warning that:
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Development' for key 'com.apple.developer.icloud-container-environment' in 'Payload/...' is not supported."
How can I fix that?

I solved my problem by changing app publish method. Previously I used to get ipa on my windows device and send it to app store with transporter from my mac. Now I created xcarchive file on mac. After I clicked this xcarchive and send it with xcode app publish tool. I signed my app there (xcode tool). And I didn't get any error with this way.
I didn't do anything on my provisioning profile. I used "Distrubition (for xcode 11)". And it worked with xcarchive. I don't know why it doesn't work with ipa.

Related

Sideloading ipa using ideviceinstaller

I tried to install ipa using linux machine. I never done this before and got this error.
SIdeloading ipa
The application you are trying to install does not have a digital signature. iOS will only install applications which a valid digital signature on your phone. That's why you get the error message "No code signature found".
You can sign the application yourself if you have an iOS development account. Once the application is signed, you can install it using ideviceinstaller.
Alternatively, you can jailbreak your phone, which will cause iOS to no longer validate the digital signature of applications you are trying to install.

Unverified Publisher Warning still occurs after Code Signing

I am new to code signing. My goal is to be able to sign a setup.exe generated by Visual Studio and install it on my Windows 7 PC and my friends' Windows PCs without triggering unverified publisher or other warnings. The following approach did not work. What other steps do I need to take to achieve this?
On Windows 7, I followed the Original Answer at
How do I create a self-signed certificate for code signing on Windows? by completing following steps.
- created & imported CA
- created SPC & converted to PFX
- used first signtool command to sign a setup.exe generated by Visual Studio 2015.
The Digital Signatures General tab now says the "The digital signature is OK". But running the setup.exe on my Windows 7 PC triggers an Application Install Security Warning which says "The publisher cannot be verified. Are you sure you want to install this application?".

Why don't virtual devices on android studio start up

I want to use the DJI SDK Mobile SDK to fly a drone.
SO,I use the DJI Developer site (https://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html)to integrate android studio projects.
However, even if the program is entered according to the site, "Hello, world" is not displayed on the virtual device.
Specifically, "import SDK Demo keep stopping." is displayed after the app starts for a moment on the virtual device.
Please help me !!!
Android Studios version : 3.5
Mobile SDKs version :4.2
I tried Android Studio with some version(ex.3.0/3.5).But, everytime "Hello, world" is not displayed on the virtual device.
Without having more details about what you've done, it is hard to say what your problem is.
HOWEVER, the SDKs require an "Application Key" to be generated via your DJI account, whereby you access a special web page that allows you to give a name to the App you propose to create, as well as a bundle identifier like : com.yourCompany.yourNewApp. After providing such basic "App" info's that DJI webpage will generate a long hexadecimal number which is your App Key. So again, without that App Key (number) being added (edited into) to your App, you will not be going anywhere. DJI uses this App Key for keeping track of all developer's Apps, and where those Apps are running.
Specifically, the DJI SDK gives an immediate error as soon as the SDK initialization is attempted, when/where attempted without a valid App Key.
So again, without more details from your problem, it is hard to say that the problem/solution (stated here) applies to you. But this certainly is a very common "newbie" or "getting started" problem.

Automated conversion of aps-environment from development to production in Xamarin

In my Xamarin iOS project, Entitlements.plist has aps-environment set to development, for dev testing purposes. I'm using the Visual Studio Team Services Extension for the App Store to automate publishing builds to TestFlight. However, when it uses fastlane pilot to upload the app, I get this error:
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'development' for key 'aps-environment' in 'project' is not supported.
It looks like the environment should get switched to production when running the continuous integration build. How do I automate this?
Remove Entitlements.plist, and add Entitlements.developer.plist and Entitlements.production.plist. In iOS Bundle Signing, enter the corresponding plist file for Customer Entitlements based on the build configuration.
I have just removed aps-environment from Entitlements.plist without adding new files and it worked for me

Xamarin.iOS ApplicationVerificationFailed: Failed to verify code signature of

why I am getting this error when I am trying to run my application in real device not simulator
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.ttjwEf/extracted/DSP.IOS.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/macbookpro/Documents/gitProject/DSPMobileGit/DSP.Mobile/DSP.iOS/DSP.IOS/bin/iPhone/Debug/device-builds/iphone6.2-9.3.5/DSP.IOS.app' on the device 'Mohamed’s iPhone': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
here steps I did to run my app
First I created project in Xcode with same bundle name and let Xcode handle Provisioning
when I tried to run in Visual studio it dosent work
Second I create manual provisioning with wild id but it dosent work
I note something each time I set my signing identity and provisioning profile , when I back to screen I find it back to none again
may be that is the reason
Using Visual Studio for Mac 2019
First, determine whether the problem is entitlements. Find tab "Deploying to Device", and look at the full message starting with
"ApplicationVerificationFailed: Failed to verify code signature of ..."
Look for:
... The executable was signed with invalid entitlements.
In that case, see https://stackoverflow.com/a/43055084/199364.
The below answer is for the other likely situation:
... no valid provisioning found for this device.
On newer versions of Visual Studio for Mac + Xamarin iOS (or Xamarin Forms, deploying to iOS):
Connect the phone to Mac via USB cable.
Popup on phone, select "Trust" this computer.
In VS, Open Info.plist.
Make sure the "Application" tab is selected at the bottom of the pane.
Select "Automatic Provisioning".
Follow the instructions.
When successful, you'll see (below "Automatic Provisioning" radio button):
Apple ID: your-apple-id-email
Team: your-company-name-or-your-developer-name
(Green checkmark) Ready to deploy app to connected device.
IMPORTANT:
Even if you have previously setup Automatic Provisioning for a different device, you still need to open Info.plist / Application tab after attaching this new device. (After doing this once per device, you can switch which device is attached, without repeating.)
If Xcode has never seen the device before, it can take MINUTES before Xcode has validated it and attached it. See following paragraph if you'd rather see Xcode giving you a message about what its doing (and spinning a busy indicator). Won't be any faster, but is more obvious that something useful might be happening. (On older Xcodes, people have reported delays up to 10-15 minutes.)
If having trouble getting it to see your phone, google for instructions to open XCode and add your phone as a device known to XCode (XCode menu Windows / Devices and Simulators / Devices tab). That is, it may be easier to first get it working under XCode, then go back to VS, disconnect and reconnect the cable to phone, try instructions above again.
Using Visual Studio (Windows) 2022
Personally, I always FIRST get the phone|tablet recognized using XCode, connecting it to Mac. See instructions above.
Then:
Connect device to PC.
Automatic Provisioning is found in YourApp.iOS / Properties / iOS Bundle Signing.
Select Team.
if it works => "Automatic provisioning completed successfully."
OPTIONAL:
Disconnect device from PC, connect it to Mac - should be listed under "Remote Devices" in VS on Windows.
TBD: Not sure why I failed to get it to be listed as a Local Device, when it was attached to PC.
I had the same issue in a Xamarin.iOS project. I found a workaround. The reason was the update from Xamarin.Swift4 package 4.0.0.1 to 4.0.0.2.
After I downgraded back to 4.0.0.1 the issue no more exist.
I created an issue report at github: https://github.com/Flash3001/Xamarin.SwiftSupport/issues/25

Resources