Packaging Operation Failed in Xcode 4 - xcode4

When I use Xcode 4 to create an app IPA fie, I go to Product --> Archive to get an Xcode Archive. I recently read the SO post here detailing on how to distribute an app in the AppStore. I followed the instructions in this post and my errors still persist.
First, I begin with validation. When I click Validate I login, elect the correct code signing ID and then get the following error:
I get the same error message when I attempt to distribute to the AppStore.
Any ideas as to why I cannot share and/or distribute my app?
EDIT
Previously, I was having trouble validating and distributing and as a result I would receive this error:
I fixed this problem by finishing my CCATs / Encryption Registration in iTunes Connect.

I got the same error and found this solution (Xcode 4.4).
In Build Settings/Code Signing I had "Don't Code Sign" in my first Archive attempt.
I then put a valid Distribution Certificate (in the Release identity) and, after Archiving, validation of package went flawless.
Thanks to Apple that at every release does something (undocumented) different from the previous version.
Cheers.

Couple months late, but in case someone else encounters this problem and finds this question (as I did) and none of the other suggestions work for you. After reading the other answers, there seem to be multiple causes for this error.
In my case, it was because my project's scheme had its Archive build configuration set to Release, instead of Distribution. After changing this to Distribution, I was able to submit the app without issues.
Hope this helps someone else.

I had similar situation and standard solutions like removing files with prefix _. and certificate experimenting did not lead into success.
Build distribution of English version worked, but localised to Croatian did not. So I used heavy weapon. I installed Croatian keyboard layout. And guess what? Since that moment all worked out!
So maybe there was something else in the place, but I would suggest you at least to check if this matches your situation.

Possible error with your certificate/provisioning profiles. Here is a short summary of my certificate quest with Xcode 4.3:
Make certain (in developer.apple.com) that you have created a distribution certificate
Make certain your application id in Xcode matches perfectly the one in developer.apple.com
Create your app in itunesconnect.apple.com
Load the distribution certificate in your keyChain create a distribution provisioning profile for your app (make certain you add all devices when creating the provisioning profile)
Drag the provisioning profile in Xcode organizer, LIBRARY section, Provisioning Profiles.
Make your archive.
In Xcode organizer, validate your app, then distribute it for ad-hoc.
Eventually (if you are patient) Xcode will offer to save the IPA somewhere. Save it, place the IPA in a place where your testers can download it.
After download, the tester can drag the IPA in iTunes (LIBRARY), and eventually sync up the device (if and only if their device UDID was checked when you created/modified the provisioning profile).
more or less. Best of luck.
ps. there is a free app in AppStore , Get UDID. Ask your testers to use that and email you the devices specifics, will save you tons of frustrations with the 40'ish characters long device ID.

It happnes to me when I've try distribute app from Xcode DEVELOPER PREVIEW.
From actual version of XCode - everything works fine.

I was also seeing this inexplicable error, and tried all of the suggestions here with no success. I finally went and deleted my local certificates and provisioning profiles and downloaded them again from Apple's provisioning website. After making sure the code signing options were set correctly in my build settings, I cleaned the project and archived again and this time the error disappeared when I ran the validation step.

Check if the code signing entries are correct (containing the distribution profile) for both the project and the target. It is possible to archive the project even if only the project settings are correct.

To me the answer came after trying to validate my app after unsuccessfully submitting it to the MacAppStore. I thought that by validating it, I should get a more detailed error message, instead ot this "Packaging operation error". And here it comes:
And that was because I had to revoke my certificates (as for why I had to revoke them, don't ask, I don't know, it happens in one every 2 submissions...). And I had recreated only the Mac Submission certificate. Actually, you also need the Installer one. It waqs late, I thought do I really need this?... Hence I finally made twice the little dance in Keychain.app -> Request Certificate from a Certificate Authority... etc, uploading to itunesconnect, and downloading them back. After that, it worked.

Related

Firebase services not working in another device when app is cloned from bitbucket

I've created a Jetpack Compose app in Android Studio and I'm using Firebase services (Auth and Firestore). Everything works fine. I can access and create registers, but is a team project, so I uploaded all the project to Bitbucket, and my team cloned the repo.
When my team tried to login with the same user/password, the app keeps waiting and don't even create an error message in "Log" or "Run" window.
We already tried by adding the next line in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
Also, we already sync build.gradle and check for versions of implementations (and that couldn't be the problem because is a cloned repo, so everything remains the same).
As a detail that I think it could be affecting this: the package name in manifest keeps the same. Is this wrong?
When run the app, this seems to be working fine, even throw this messages.
I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseInitProvider: FirebaseApp initialization successful
And this is what I get from trying to do an auth operation
D/TrafficStats: tagSocket(98) with statsTag=0xffffffff, statsUid=-1
If you have experienced this problem, I would appreciate all the help I can get, thank you so much.
An error occurred in the transfer-and-conversion process, most likely. You wrote code, you compiled it, it ran well. Then, you transferred it to a repo, so if the transfer process was faulty (some file(s) didn't go to the repo / something underwent a partial transfer), it would break right away even if you run it on your own device by downloading from there. Now, if the transfer wasn't faulty, their conversion to an APK could be.
Debugging
To confirm where the problem lies, upload the code to the same bucket as you mention, then download the code again and compile in a fresh project. If it doesn't compile, transfer is faulty (or none of you know how to compile). If it compiles and runs as expected, their conversion/compilation is at fault and you've got nothing to worry about, except the fact that you have a team of useless drunks.
Solution
Should be obvious, if they can't make the end-product by themselves (those useless drunks), give it to them on a platter.
In Studio, go to "Build > Generate APK(s)". A confirmation dialog will have the link to the generated file once it's done. Share the apk directly with your "team" and see if it works. No need to see, it will work. Why do you have all the code if you are in a "team". Is it one of those teams where a single person does everything?

Hot restart error with cannot copy ipa file

While I am aware that Hot Restart is in preview, it was for quite a while now and my testing never really worked since the first time I've tried it. I've waited for a few VS studio versions to come up, hoping that my issue will be fixed. Since I've kept an eye on issues and haven't seen something similar, I tend to believe that the issue is locally with my setup.
Here is the situation:
I've enabled Hot Restart in VS and added my account, picked the team (after I was added) and everything went fine without errors. I have a free apple account, but after I was added to a Team I was able to obtain automatic provisioning to work.
I've tried to set the debug build options similar to how the simulator was set
I've disabled device specific build as I saw in the docs that it can create problems.
I've installed iTunes just as specified in the docs and when I connect my device to my Windows 10 PC, I can select it from the list.
So basically it looks like everything is set up. I use for testing an iphone 7 with latest iOS version.
Here is what happens:
I've selected different types of output logs hopeing to catch some error in there that could lead me to find a solution.
when starting to build I can see "Building offline for a local device" and I can see my provisioning file details on "Detected signed identity"
I see no apparent error while it compiles and does its job, no complains about signing
then it gets to the IpaCopyToStagingDirectory and there it starts to copy a bunch of files from bin\Iphone\Debug to Artifacts\app.iOS.dSYM where I get the final error: Could not copy the file bin\iPhone\Debug\\app.iOS.ipa because it was not found
If I go to the bin folder, there are many files, including app.iOS.exe, but indeed there is no ipa file. I also don't know why it has two \ on its path.
Any ideas why is not working?

The package "apppxbundle" is taking a long time to process. Unable to push update to windows store [UWP] [ Xamarin.Forms]

I've been at this for past 2 days and I'm getting weird errors from the store.
I'm trying to upload an update to my application "CoManga" via the store and it's not working out.
I'm working on Xamarin.Forms (UWP) and before making the appxbundle, I made sure and "associated my app with CoManga" from my developer account. All the information over there matches and should work fine without any issues.
Then I made a release of my UWP app, got the bundle and I tried to upload it to UWP.
It said that the Publisher info is different, so it couldn't upload. This is weird because I tried signing the bundle with my developer account itself.
Now, I tried building and signing the app bundle from app center. I got the appxbundle and that I tried to upload. But, since today it's giving me weird error :
The package comic_dl.UWP_2.1.15.0_ARM_x86_x64.appxbundle is taking a
long time to process. If this isn’t completed soon, try refreshing the
page, or remove the package and then upload it again. If you continue
to see this issue, contact support.
This package I tried to build from my system manually : https://drive.google.com/open?id=1VVvF6IB70R2DKNUgBJcqw-HryL1LIwgo
This is what I got from App center : https://drive.google.com/open?id=1o0sGKU2AKVgrcTelIoRFz7QCe8Do0WJ3
This is the Store ID : 9N81F8B5WW93
Can someone guide me what I might be doing wrong/missing something.
Thanks
EDIT Update : So, I followed the suggestion and contacted Microsoft's Team for help on this issue. After 3 months of multiple contacts, I was able to get someone to reply back and follow the case. Even they tried things on their end and I tried by deleting all the certificate files I had in my current project and tried to manually build the manifest file and then it worked. I'm not entirely sure what worked out in the end. But, you can try these things if you run into this issue.
1.) Clean your project.
2.) Delete .vs directory.
3.) Look for any certificate files in your project. Back them up somewhere else and then delete them from the project (Don't exclude from project, just delete them entirely). Clean and rebuild your solution.
4.) Check if the application is already installed on your system (When you debug, VS will install your UWP app on your machine to run it). If it's installed, uninstall it completely.
5.) Make a backup of your manifest file and try to create a new manifest file.
These are the links I received from Microsoft Help:
PFN and package publisher name must match values here: https://partner.microsoft.com/en-us/dashboard/products/{YourAppID}/identity
Update manually: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/how-to-create-a-package-manifest-manually
Update in VS: https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/generate-package-manifest
If these values were pulled from test certificate, partner needs to update their test cert: https://learn.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing
I think this problem is not caused by anything code related, but rather it is a problem on the Store side. I would suggest contacting the Store support, they should be able to investigate if there is something wrong with your app package or the problem is on their side.
For support go to the official website, click the Contact Us tab and fill out the form accordingly.
The team should be able to advise even for the first error with different publisher info. If your app was always associated with the same account, there is no reason it should give you such an error message.
I had this issue gazillion of times. It is so frustrating. That error message isn't useful at all.
Anyway - I think it is something in Package.appxmanifest, something in Identity tag.
Retrieving some necessary info from store helped me.
Click right on your project -> Publish -> Associate App with the Store. This will update Package Display Name,Package Name,Publisher ID,Publisher Display Name and Version with correct values (within Package.appxmanifes).
Also be careful with version number. The last from numbers must be zero. 1.1.1.0 is fine, while 1.1.1.1 is not.

Install claimed to have succeeded, but application could not be found on device Xcode 11

Just after switching from Xcode 10 to 11, I am unable to install my app on any device
The error at launch time after installation succeeded says :
Install claimed to have succeeded, but application could not be found on device.
Details says :
Could not locate installed application
Domain: com.apple.platform.iphoneos
Code: -1
Recovery Suggestion: Install claimed to have succeeded, but application could not be found on device. bundleId = myBundleId
--
Installed application was not present in database of installed apps after multiple lookup attempts.
Domain: com.apple.platform.iphoneos
Code: -1
However everything works fine on a simulator.
I tried to delete derived data, clean project, delete the app ..
Very strange : After submitting the app to testlfight I can download it and it works.
But when I build a new app to Xcode it launch the app just downloaded from tesflight and not the version pushed via Xcode ..
For me, it's a problem with ipatool.
Here's a way to find out details why it failed to create a proper iPhone App (.ipa) file from the build output/Xcode archive:
Go to Product > Archive, then open Window > Organizer > Distribute App.
It should show you "IPA processing failed" with a big red error symbol.
Now, open the logs and search along these lines:
timestamp Assertion failed: Expected n archs in otool output:
and
timestamp /Path/to/ Xcode-beta.app/Contents/Developer/usr/bin/ipatool exited with 1
While this can't be the final solution, try removing all problematic libraries mentioned in the logs between the two lines until ipatool exists successfully.
I also had this issue/error message. I realized that I had automatic signing deactivated and I had selected a provisioning profil with a distribution certificate.
Solution:
So if you want to run the app on your iphone directly from Xcode (not through testflight) you have to make sure you use a provisioning profil with a developer certificate.
This is probably not the case for most people facing this issue, but I faced it once several days ago and easily dealt with it by cleaning the build folder and switching to a legacy build. The second time I faced it, none of the suggested solutions seemed to be working.
I then noticed that because I'd almost run out of storage on my device, iOS had "offloaded" almost all of my apps. If there is a small cloud under your apps and the app needs to "install" again before launching, then this is the case with your phone too. Trying to launch all of the apps that I don't use regularly (so I never noticed the little clouds) "reinstalled" all of them and solved the issue entirely. Maybe this helps someone facing this for similar reasons.
I have the same problem,I modify the project setting
File --> Workspace Setting --> Build System --> Legacy Build System
it's OK for me
I also got this alert. That's because i run the app in release Build Configuration, but with a appstore Provisioning Profile . It's not allowed. So i change the appstore Provisioning Profile to a dev Profile. Then everything is ok.
Hope this can help you.
I found a way to solve this problem. After I upgraded iOS 13.1, the real machine also ran. Later, I found out that because I had archive operation the day before, the real machine running certificate changed from distribution mode to development mode and everything worked normally.
For my case (xcode 11, ios 12.4), change the Bundle identifier can solve this issue...
Before changing Bundle id, I've tried
using beta xcode
deleting app on iphone
deleting derived data
cleaning project
reopen xcode
Here's another solution. I had previously installed three other apps using XCode and got this error message when I tried to install a fourth.
I simply deleted one of my three existing apps (after hours of hair pulling and SO searching) and tried again. It worked.
Platform: iPad 2018 on v13.1 with XCode v11.1,
I was using different signing team/certificate for ...Tests target.
Setting the same for main target helped.
Update pods if you have.
pod update
just it.

Xcode 4 Ad-Hoc Distribution - Unable to Download

I had recently upgrade our development machine to Xcode4 and after the initial interface change has gone quite smoothly.
I'm now in the process of using Ad-Hoc distribution on it for the first time so I followed this guide to set up profiles/schemes etc. http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/
This is the process I took:
1/ Setup a new provisioning profile under distribution. I selected Ad-Hoc, the correct App and my UUIDs.
2/ Installed the profile within Xcode 4.
3/ In xcode duplicated the Release Configuration and named it Ad-Hoc.
4/ Under Code-Signing made sure Ad-Hoc had the new profile selected.
5/ Edit Archive scheme and selected 'Ad-Hoc' Build Configuration.
6/ Select Product > Archive and made sure the profile listed was correct.
7/ On save screen selected 'enterprise distribution' and entered the App URL and Title.
8/ Copied the resulting ipa archive, plist and mobileprovision (downloaded in point 1) to our http server.
9/ Added the required html to and pointed mobile Safari to it.
10/ Selected the mobileprovision which installed without a problem.
11/ Selected the App which begins to install resulting in "Unable to Download" at about 90%.
I've tried several potential solutions from other posts but they all result in the same thing. This is used to work fine in Xcode 3 (using normal developer account, NOT enterprise) and as far I can tell I'm not really doing anything different so what am I doing wrong?
Thanks.
Try this: Open the Scheme you are using to edit it. Then check if in ALL the build phases (Build, Run, Test, Profile, ...) the Build Configuration is set correctly. If not set it to the correct configuration and build it again.
If this does not work ad a new Entitlements.plist to your project and add a new value with the key get-task-allow to NO.
Edit: Have you tried to make Product > Build For > Build For Archiving and then Product > Archive.
This worked for me.
we just had the same problem (and we still have it for one device only working on iOS5 Beta, not sure if it is related. All other devices work.), some tips that could help :
Apple dev site:
your provisioning profile could need to be renewed on the apple web site.
on the apple web site check that the device is linked to the provisional profile in the "Device" section. In the "provisional profile" section, the "Edit" feature could lie to you. To add a missing device to a provisional profile, go the "provisional profile" section then uncheck and check back the missing device (the lying part from apple web site ;))
in xcode:
I switched deployment target OS from 4.0 to 4.2
I plugged my iPhone and selected it as target before to create the archive.
this issue doesn't depend on the "team provisioning file", we could build a working archive with another provisioning file too.
If it can help too, I created a doc for distributing the Moodle app but it's generic to any app I guess: http://docs.moodle.org/dev/how_to_distribute_iPhone_test_app

Resources