iOS application deletes itself once downloaded - ios

I'm developing an application for a company for iOS > 5.0 using Xcode 4.6.1. To test application, i archived application using Save for Enterprise or Ad-hoc deployment. I've checked also Save for Enterprise Distribution and filled appropriate fields. So far, i'm able to create an myApp.ipa file and myApp.plist file. I've created an url to myApp.plist. Once, i clicked url, myApp starts to download correctly. My problem is that once download's finished, myApp deletes itself and i got no crash log,simply nothing. I googled it and got nothing either. The problem is that one of my client is able to download myApp and to use it. I thought the problem is related to provisioning profile,but both devices is registered the same provisioning profile. So, i'm clueless. What could be the problem ? How is it possible that myApp deletes itself ?
Thank you all.
EDIT : here is the console log.
May 10 12:02:15 IK installd[3728] : profile not valid:
0xe8008012
May 10 12:02:15 IK installd[3728] : 00403000
install_embedded_profile: Could not install embedded profile:
-402620398
May 10 12:02:15 IK installd[3728] : entitlement
'keychain-access-groups' has value not permitted by a provisioning
profile
May 10 12:02:15 IK installd[3728] : entitlement
'application-identifier' has value not permitted by a provisioning
profile
May 10 12:02:15 IK SpringBoard[15] : Killing
net.caretta.iAnahtar for termination assertion

This seems very similar to:
Xcode 4.5 - can't install developer .ipa files via iTunes
The main symptom I observed in the case I had like that problem was that the IPA would try to install, then eventually it would get downloaded - then straight away it would disappear.
If the following line:
installd[31] : profile not valid: 0xe8008012
appears in the console log, then you may want to try re-issuing the profile from the iOS Provisioning portal (simply make a simple change, undo it, then submit - that should regenerate the profile), update the Xcode code signing identity to use the new profile, reboot the device, and then try again. Not guaranteed to fix the problem, but it might be worth trying.

Is this an enterprise app (is the developer account issuing the certificate an Enterprise account)? If not, you will need to ensure both the device UDIDs are in the mobileprovision.
The app is not really deleted, it is downloaded but when the OS tries to install it, it fails and that's why the icon is removed.
A few things to check
Are you creating the ipa in the correct manner? Make sure you use the correct certificates and mobile provisions and are using the correct option when exporting the ipa
Both the device UDIDs must be included in the provisioning profile
The device must have ability to install the app (are Restrictions turned on to disable installation of apps?)
Try using a service like Testflight.

If your deployment target is a later version than the device OS this happens. I dont see any other reason for it.

This isn't a Newsstand app is it? Because when you install a Newsstand app, you'll initially see what looks like a regular app icon while it is downloading, but once the download has finished the icon will disappear and it will automatically move to the Newsstand bookshelf.

Related

Appcenter iOS install error "this app cannot be installed because its integrity could not be verified"

I see that this question has been asked many times but I see no solution that works for me so I'm hoping that providing more info might shed some light.
We use appcenter.ms to test iOS apps. Until our iOS certificate expired this method worked fine. We generated a new enterprise certificate and ad hoc provisioning profile for new releases of the iOS app. Which led to the first curiosity.
I see how to upload a certificate on appcenter.ms but not a provisioning profile. I thought there was an option to do this in the past but perhaps I am mistaken. However, the app is signed with a provisioning profile before upload, so perhaps this is not needed now.
Once the app is uploaded, it can't be installed. It remains grey and when you tap it, you get the "this app cannot be installed because its integrity could not be verified" error. Again, that the .ipa is created with an ad hoc certificate and profile in Xamarin (VS for Mac).
Also, I can't install the provisioning profile on a device from appcenter.ms. You basically get stuck in a loop where you seem to successfully install the profile but have to keep doing it because it never actually installs.
I hope this is enough info for some insight and thanks in advance for any feedback.
We were able to solve this by redoing and downloading development certs and via
And also downloading and double clicking the apple development certificate here
After that our keychain showed both as trusted and we could build to the iPhone again.
The issue can be the your device is simply not registered on the developer portal and/or that ad-hoc provisioning profiles have not been regenerated.
You need to register your device, regenerate a provisioning profile with this device in it and rebuild your app using this profile.
This can also happen because of
Developer ID Notary Service - Outage
which can be checked on https://developer.apple.com/system-status/
Notarization is well explained here:
Notarization gives users more confidence that the Developer ID-signed
software you distribute has been checked by Apple for malicious
components. Notarization is not App Review. The Apple notary service
is an automated system that scans your software for malicious content,
checks for code-signing issues, and returns the results to you
quickly. If there are no issues, the notary service generates a ticket
for you to staple to your software.
Work around fix:
Select your app.
Navigate to TextFlight tab
Create External Testing group
Add one tester
Add build which you want to download using TestFlight
Open TestFlight and download an app.
In my case this was caused by trying to include an entitlement for aps-environment "development" when using an Ad-Hoc provisioning profile. The value for this environment in Entitlements.plist must match what is hard coded into the provisioning profile file - if you open an Ad-Hoc profile in a text editor you will see it expects the "production" environment.
The possible solutions depending on your requirements are to either use the Development profile/certificate, or change the aps-environment to "production" to continue using an Ad-Hoc provisioning profile.
It can also happen if you have other incorrect entitlements - worth checking what entitlements are enabled under the Identifier in Apple Developer portal and removing unnecessary ones.
I had this issue because when building the app on xCode for distribution (Product->Archive then Distribute App), I chose automatic signing. After manually signing the app and choosing my own generated certificate and profile, everything worked again fine.
I removed the Entitlements file from the Addition Resources in iOS Bundle Signing and it worked.
I think the MSAL configuration was set to debug in entitlements.plist
I have also face this issue before but for me the reason was little different
First the build was enterprise one and the build was made on the earlier Xcode version on which the iOS version you are using on the device was not supported by the Xcode.
All I did was to update my Xcode and make a new build and shared the build. After that we were able to install that build over device Hope it works for you as well
This is how I solved for myself.
In you iPhone Settings > General > VPN & Device Management you should see your company name (if an app from it is installed), and if you click on it, you will see a button like "Verify" above the list of apps installed provided by the company. Just click on "Verify".

Beta from Crashlytics fail to install build on testers' devices

I'm sending my app to testers with Beta from Crashlytics which is an amazing tool to do app testing.
I had every new tester's device UDID registered in my developer account and then distribute a new build.
My testers got email invitation and accessed app's installation which could not be completed on their device.
They kept seeing an alert showing up with message:
Unable to download app - MyApp could not be installed at this time -
Done / Retry
Testers' testing status are "installed" in my Crashlytics dashboard but they're actually not able to finish installation.
Please help me find any possible factor causing this problem.
Perhaps the provisioning profile embedded in the build has been invalidated. Use Xcode to create a new archive, then use Fabric to upload a new build with that archive.
Discussion:
In my case, I had deleted the provisioning profile in the Apple Developer Member Center that had been embedded in each of my Fabric Beta builds. This caused the app testers had previously installed to immediately crash when they tried to launch it (embarrassing). It also caused the "Unable to download app - MyApp could not be installed at this time - Done / Retry" issue when testers tried to (re)install the app via Fabric Beta. Uploading a new build with my new provisioning profile embedded fixed the issue (each tester had to install the new build).
I've run into this problem back on iOS8 and just recently saw it again for iOS9, the only thing that solved the install issue was for my users to delete any previous version that they had downloaded, restart their phone, and try again.
You can also verify with them if Crashlytics properly installed on their iDevice, I've seen more than once where the configuration profile caused the issue, it's worth removing that (Settings -> General -> Configuration Profile (towards the bottom)) and retrying the install.
This is usually caused by one of two problems:
Incorrect provisioning profile/code signing settings. Double- and triple-check that the following settings are the same for the project and the provisioning profile: bundle identifier, development vs. distribution, adhoc.
Caching - sometimes, even when you've done everything correctly, things still just go awry. In such cases, you can try: deleting the previous version of the app from your phone, cleaning your project, deleting and re-downloading provisioning profiles, and building the app again.
RubyMotion Solution
For me, it was because I was using a development distribution profile, but with the wrong entitlements. Well, entitlement, singular.
I still had the 'beta-report-active' entitlement enabled, which was not included with the development distribution profile I am using. It is instead included with the production distribution profile (which is needed to distribute to TestFlight). However, I just wanted to deploy to my local phone, and not air my dirty app laundry to my entire internal test group, so this is where I found myself.
In any case, removing the 'beta-report-active' entitlement fixed my issue.
I tried the normal route of checking for proper certs and also deleting the app and provisioning profile along with rebooting device. In my case it was installing on device A and not device B. Device A was older iPhone 5c running iOS 9 and device B was newer iPhone 8 running iOS 11.x. When I archived the app for distribution I was selecting device A during the archive. Once I selected "Generic Device" it worked. But I'm sure I've built in the past selecting a specific device instead of generic and it worked. I was using Xcode 8.2, but I don't believe the Xcode version matters.

Xcode 6.1 iOS Distribution is always revoked or missing

I'm trying to submit an app but I'm stuck. I can't get a the iOS Distribution signing identity to show up as valid under my account in Xcode 6.
It always shows up as revoked, never valid. I've made sure to connect it to my provisioning account on the dev site.
I also went to the developer site, revoked it there, recreated it, then went back to xcode to try to submit my app but I get this message:
When I check my account in preferences after getting this message, the iOS distribution doesn't even show up:
And when I try to add one it says:
I've tried:
Deleting the iOS Distribution cert and regenerating it on xcode (generates as revoked)
Deleting it and creating it on developer.apple.com
Linked my provisioning profile to the correct app id
Using Xcode 5 to submit my build instead
I don't know what to import or where to find a developer profile from. I've checked the dev documentation and it says the Your account already has a valid iOS Distribution certificate error happens when switching mac computers, but this is all on the same machine. I am using a VMWare to run this on an virtual image of iOS Mavericks, could that be culprit?
Make sure the time settings on your Mac are correct.
When you use a virtual machine and pause it, it pauses the time on the Mac as well. Your time settings are probably pushed back because of it, making your certificates invalid valid until a time later in the future.
For more info, see: Distribution certificate error:"This certificate is not yet valid."

iOS app 'The application could not be verified' only on one device

I have two iphone devices( 4s and 5 ) connected to my computer and i am trying to install an application in both the devices. It installs pretty well in iphone 5 but it gives an error 'The application could not be verified.' when attempted to install in the iphone 4s device.
The UDIDs of both the devices have been added in the provisioning profile generated for the application.
Also, to add a note, I have just updated my iphone version to 8.1.3 in my 4s device. I am not sure though if the error has anything to do with it.
Any help on this would be much appreciated. I have been stuck on this for some time now.
EDIT:
I just connected this to another iPhone device and the issue seems to be there again. Basically this means that the app, for some reason, installs only in the phone which I have been using for some time now and not in any other phone. Once again, I am pretty sure that the provisioning profile contains the UDIDs of all these 3 devices.
I had something similar happen to me just recently. I updated my iPhone to 8.1.3, and started getting the 'application could not be verified' error message from Xcode on an app that installed just fine on the same iOS device from the same Mac just a few days ago.
I deleted the app from the device, restarted Xcode, and the app subsequently installed on the device just fine without any error message. Not sure if deleting the app was the fix, or the problem was due to "the phase of the moon".
As I notice The application could not be verified. raise up because in your device there is already an app installed with the same bundle identifier.
I got this issue because in my device there is my app that download from App store. and i test its update Version from Xcode. And i used same identifier that is live app and my development testing app. So i just remove app-store Live app from my device and this error going to be fix.
just delete the app and try again, it happens to me when i try to launch over a device that has the same app but generated by an ipa file.
You probably used the "Fix Issue" option in Xcode when plugging in a new device. Old question but I believe this is the actual answer to WHY this is happening. When you install an app on a device it is signed with a specific development provisioning profile. If, for instance, you plug in another device that is not registered on your developer account Xcode will ask you to "fix the issue". When you press that the device is added and another provisioning profile is created/modified. If you try to overwrite an existing app you'll receive that error. Deleting the app and reinstalling it works since the profile has been altered. I find this often happens when a Team is set and a member plugs in a new device then Xcode "Fixes" the problem.
Might have figured it out... Deleting the app from the device worked for me, as others mentioned before (thanks!).
I think the reason is that the app on the device was actually signed with a separate provisioning profile, specifically a distribution profile in my case.
I faced this issue a lot. I am not sure if this is the issue, but I think, when xCode saw that there is an app with the same bundle identifier as of the app, I am trying to install, it didn't allow me. So, I had to delete the older one and attempted to install and it worked. However sometimes for testing purpose, I needed multiple version of the same app and in that case, I would change the bundle identifier and try to install. It only works if, I am using an wildcard provisioning profile.
To others not using RubyMotion and don't think that deleting the app is acceptable (as in, you want to do upgrade testing). Check out the bottom of these docs from Apple:
https://developer.apple.com/library/ios/technotes/tn2319/_index.html
It looks like they changed something in 8.1.3 to check for this new rule.
The Fix
"[Add] the installed application’s application-identifier value, as logged in the second parentheses, to the previous-application-identifiers entitlement’s array value for the app being installed (by resigning it or re-building it) and requesting new special provisioning profiles as shown below."
<key>previous-application-identifiers</key>
<array>
<string>{Your Old App ID Prefix}.YourApp.Bundle.ID</string>
</array>
EDIT:
In order to do this, you need special provisioning profiles. You can request these from Apple:
"To enable signing with the previous-application-identifiers entitlement new special provisioning profiles are required that can be obtained by going to the Contact US page and requesting them." (from the docs linked above).
Had the same issue on my iPad running 8.1.3 Deleting the app and installing again fixed the issue. I use two different provisioning profiles on two different machines and that could have caused this issue.
Working & tested solution, which does not require to delete application:
It looks like AppStore Distribution Provisioning Profile or just iOS Distribution certificate have special permissions and "Could not be verified..." problem does not apply to them. They will always override previous certificate.
In other words: AppStore release will install successfully, even if already installed (testing, adhoc or enterprise) app has been signed by the certificate from different team.
If you are lucky and have previously uploaded app to the AppStore account owned by the same team as in certificate you have a problem with - then things are very simple: just download & install app from AppStore.
When it installs - app certificate will be the same as the one you want to test with and problem goes away.
If your app is not on the AppStore yet - iTunesConnect beta comes to the rescue:
Disclaimer: I did not tested this but since cert an prev are the same as AppStore release, I bet it works:
Archive your app with AppStore provisioning profile (iOS Distribution cert) and upload to iTunesConnect (to the account owned by the same developer team as included in the provisioning profile not you want to run).
Invite person with the device you want to run on (yourself?) to beta test.
Download & install the app from iTunes connect beta.
Now you are able to install your testing version.
The application could not be verified" , in your device there could be already an app installed with the same bundle identifier.
So Simple solution Just delete the App & try again..
....
TL;DR answer - There is no real solution besides "delete app and reinstall".
This answer is not satisfactory for many situations, when you have an existing database that needs to not get deleted within the app.
Lukasz and plivesey are the only ones with solutions that don't require delete, but neither worked for me.
I resolved this issue by changing the Build System to legacy in xcode.
I had the same problem but the mentioned solutions above didn't work for me. Even I had no previous app on device, I got this error when deploying on my device.
How to do:
Simply, go to menu File > Project Setting, inside Share Project Settings, change Build System from "New Build System (default)" to "Lagacy Build System".
I also encountered the same issue. Deleting the app didn't work, but when I tried deleting another app which was the current one's 'parent'(I copied the whole project from the previous app, modified some urls and images, then I clicked 'Run' and saw the unhappy 'could not be verified' dialog). Seems the issue is related to provisioning and code signing and/or some configurations of the project. Very tricky.
I had changed the team but I forgot to change it in my Tests target it so it caused that. Maybe this helps someone.
Just had the same problem and I found out that the issue is with expired certificate.
My app was distributed (AdHoc) through firebase and few days ago app was working just fine.
Today I've realized that I can't install it because 'The application could not be verified'.
Finally I realized that certificate that I was using for app signing has expired 2 days ago.
You need to upload it again and you'll be able to install it.
I had the same problem. But, I realised I was using a single plist with (debug) and (release) configuration, like this.
So, I changed few things..
Keeping a separate scheme for (release).
I added a new scheme for development purposes.
Edited the new scheme > run > Build Configuration > and set it to (release)
Generated a new archive using the new scheme and voila!!..
I'm able to install on all my devices.
My case:
jailbreak'ed iPhone
Final solution:
Install tweak AppSync Unified via Cydia
to bypass signing/certificate verification
Same issue occurred for me when I was installing through link. I tried to install using different link. Then I could install the app.

iOS7 distributed App installation via iTunes fails without error

After I my App as usually I tried to install it via iTunes.
It has successfully synced to the iPhone, but the Icon is grayed out and it seems like the installation has not finished
Where you normally find the App-Name "Installation ..." has appeared.
Can't find any log or error message
(can't push the App with the development machine because of Apple's new security feature => "do you trust this computer" which just won't disappear)
There is actually one log you can look at during the install; go to the Organizer window in Xcode, look at your device in the Devices tab, and look at the Device Logs. There should be several issues that will be logged during the iTunes install: rollback notifications, errors and such.
Look for one error in particular, similar to this one:
installd[31] : profile not valid: 0xe8008012
As Nikos M. alluded to in his comment above, this would indicate a provisioning profile issue. When I had this issue, my provisioning profile was up to date, but the app still wasn't installing. I found this question on this site, and the accepted answer fixed the issue for me: Xcode 4.5 - can't install developer .ipa files via iTunes
Basically, it's a problem with the provisioning profile. Not sure why it happens, but it prevents the app from being installed on some devices sometimes. As answered in the question above, you need to get on the iOS Developer Portal, make a small edit to your provisioning profile (your Ad-Hoc Distribution Profile, not the Development profile), change it back, regenerate the profile and download it again. Rebuild your .ipa file with this fresh profile, replace your old .ipa with this new one in iTunes and try installing the app again.
I ran into this problem with a coworker, and after some consternation, we realized he was using a device that we had not authorized during the certificate generation. The result was as you described (a gray overlay on the application's icon that could not be opened).

Resources