IPA Wrong version number in archive - ios

I changed the version for my app in Xcode's "General" settings to be 0.3.0. I saved it and also looked into Info.plist, the version was also updated there. But when I archived it and looked for the version number in the generated .ipa file, I found it to be the version of the last archive I made for this project (which was 0.2.0). Thus I cannot upload the archive via Application Loader because the build with this version already exists in my iTunesConnect. How can I get Xcode to archive with the correct version number?

In my case I'd update it in "General" but the Info.plist file for release builds hadn't also been updated. Updating it manually there fixed the issue. The "General" tab numbers weren't used at all.

Remove device if your device connected with mac and build archive with generic device.

Related

Xcode: Product archive is not appearing under the archive section for uploading the app to App store

I am building and archiving an app to upload it to the App store. I could build and archive the app in the Xcode. But the archive is not appearing in the list. Following is what I have done so far.
I have the set the version and build number under the General tab.
Then I have also set up the Team and app identifier and other information required under the Signing & Capabilities tab.
Then I set the Generic IOS device for Simulator.
Then I archive the app.
The build was successful without any issue. But when I go to the Window -> Organiser, I cannot find the archive as follow. There is no archive for the app at all.
I looked up for the solution and I tried setting the Skip install to NO as follow and archived again.
Still, the archive is not appearing. It is working for the other app. Not for this app. What could be the possible reason and how can I fix it?
I have found the problem. After setting the Skip install options, I needed to restart the XCode.
It's possible that Spotlight has not indexed the archive. Look to see if the archive is on the filesystem and then open it from the command line:
open ~/Library/Developer/Xcode/Archives/2020-11-04/appname\ 11-4-20,\ 12.48 PM.xcarchive
The open command will cause archive to be opened by Xcode Organizer.
If it still isn't showing, but the archive is definitely on the filesystem, look at Products directory inside the archive. There should only be a single product, which is in Applications/yourapp.app. If there is more than one thing under Products then you will need to figure out what else is there and stop it from being copied there during the archive process. Many times it will be some other framework, and you can prevent it from being installed into the archive by enabling the SKIP_INSTALL flag for the framework.

Unable to update existing app store app [duplicate]

Previously with Xcode 7.3.1 I was able to build directly over my app store app on my iPad and test the upgrade scenario, which worked perfectly fine. This week I upgraded to Xcode 8 and when I try the exact same approach, I keep getting this upgrade error
"This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed."
I tried multiple solutions posted on this thread and none of them worked. I also don't have a watch app. Just a simple iOS app target.
App installation failed due to application-identifier entitlement
I deleted my certs and provisioning profiles and recreated them and still the same problem. I then went and downloaded Xcode 7.3.1 and tried it again with the exact same problem.
Now I am stuck without being able to fully test my upgrade scenario.
PLEASE HELP !!
I had the same issue while trying to upgrade application.
And here what I've found:
I checked application-identifier entitlements of old app and new app. You can do that by running codesign -d --entitlements :- path/to/AppName.app/AppName or open file "archived-expanded-entitlements.xcent" at path "AppName.app/AppName".
Application-identifier of old app was "1234XXX5X6.com.mycompany.myapp" but in new app it was "1234XXX5X6.com.mycompany.myapp.develop".
Usually I set "Bundle Identifier" directly in Info.plist.
But I didn't know that there is also a "Product Bundle Identifier" property in project Build Settings.
The previous version of app was built with Xcode 7.3.1 and it had following settings:
Info.plist: com.mycompany.myapp
Build Settings: com.mycompany.myapp.develop
application-identifier: 1234XXX5X6.com.mycompany.myapp
The new version was built with Xcode 8.2.1 and it had following settings:
Info.plist: com.mycompany.myapp
Build Settings: com.mycompany.myapp.develop
application-identifier: 1234XXX5X6.com.mycompany.myapp.develop
Seems like new Xcode have different source for application-identifier.
So I just corrected "Product Bundle Identifier" and my problem was solved.
Remove the existing application from the device and Run again.
To fix this just enable "Automatic manage signing" from general tab of project settings.
I had also problem for running app on my device directly from xcode 8. Deleting and generation profile and certificate did not worked for me. But enabling "Automatic manage signing" worked for me.
Hope this helps!
Check this question of mine:
Xcode 8 shows error that provisioning profile doesn't include signing certificate
Here is one solution if you want to upgrade over your existing App Store app without deleting it but your application-identifier entitlement does not match. Upload an archive of your new build to the App Store and then use TestFlight to download it to your device. This is not as quick as building to the device, but it will overwrite your old app with your new build while keeping your old data in place. For (relatively) quicker turn-around testing of your upgrade process once you have a new build available on TestFlight:
Delete your app off of your device (assuming it was a recent build)
Download your app store build and generate some data
Download your TestFlight build, but don't run it
Build your newest build directly to the device
The TestFlight build overwrites the entitlement without deleting the old data, so Xcode happily will install your new build over the TestFlight build, but you are still testing your upgrade process as if you were building directly on top of the App Store version of your app.
I got this from an .ipa generated as a Jenkins artefact. The problem for me was that Jenkins was using a different provisioning profile.
I manually set Jenkins to use the same profile as the updated version that I was trying to install, and it started working.
Select the App Target and click on General, if you select or ticked checkbox automatically manage signing.
Untick this automatically manage signing and select appropriate signing provisioning profile and #Build and run again.
See the below photo.
Solved!! Short answer - delete old app from your iPhone
I went to my iPhone storage and used the search bar to find the offending app(because it wasn’t showing on the app list) and found an old version hidden, deleted it and now it works.
What worked for me was to go (within Xcode) to Window > Devices and Simulators, then select my iOS device and delete the app there. This is detailed in this Medium article.

"Invalid Swift Support - The SwiftSupport folder is missing" with Xcode 7.3.1

After submitting an app update using Application Loader, I got this email from Apple:
We have discovered one or more issues with your recent delivery for
"[App Name]". To process your delivery, the following issues must
be corrected:
Invalid Swift Support - The SwiftSupport folder is missing. Rebuild
your app using the current public (GM) version of Xcode and resubmit
it.
Once these issues have been corrected, you can then redeliver the
corrected binary.
I have confirmed that this binary was built with the latest Xcode GM (7.3.1), so that is not the issue. I have seen a wide variety of potential fixes for this problem online but was hoping that by giving further details somebody might be able to help me figure out the specific solution.
Submitted an IPA file using Application Loader 3.5 with no problems.
The previous version of the app does not use Swift, but this update does.
The "Embedded Content Contains Swift Code" build setting is set to NO. My understanding is that this should only be YES if we have a pure Objective-C target that depends on a Swift or mixed target.
The project uses CocoaPods, but nothing has changed in our pods for this update.
The previous version of the app included a WatchKit app and extension, but this update does not.
Inside an xcarchive generated with the same build, the SwiftSupport folder is there. It contains a subfolder called iphoneos which contains several Apple Swift libraries like libswiftFoundation.dylib.
If I rename the .ipa file to .zip and unarchive it, its app package does not contain a SwiftSupport folder, but does contain a Frameworks folder with the same Swift dylibs.
The solution here was in this answer. We needed to use the new -exportOptionsPlist flag with xcodebuild instead of the older -exportFormat and -exportWithOriginalSigningIdentity flags. The plist just needs to have the method key set to app-store.
The root cause of this is that the provisioning profile is ad-hoc and it doesn't create SwiftSupport directory in the ipa. The folder is created using app-store as the export method, so it worked for me when I updated my provisioning profile to app-store.
Reference
I received this same email after uploading an .ipa file to App Store Connect through the Transporter app. The following is where I went wrong: I distributed the app using ad hoc.
The following steps are the solution for my error:
Archive app
Distribute on TestFlight and the App Store
Export
Open ExportOptions.plist in the newly created folder from the export.
Make sure the method property has the value app-store if you are uploading to App Store Connect/TestFlight like me.
Drag and drop the exported .ipa file to Transporter.
Deliver your app to upload it.
And that's it!
Original answer here: https://stackoverflow.com/a/62568526/10374366
In my case, I just added redundant swift file to the project and it solved the problem.
You should choose "Save for iOS App Store Deployment" instead of "Save for Ad Hoc Deployment" option at the time of creating ipa file.
EXPO users.
I had this problem with expo build:ios it got me stumped for days.
The build from the expo server was about 39mbs which was far smaller than previos versions.
To fix it I had to use
expo build:ios -c
This resets all the credentials (I said yes to all questions) then rebuilds the app. The resuling ipa file was 250mbs and everything is now working preperly.
Use this https://github.com/ndpiparava/Swift_StripArm64e script file remove arm64e from .app file
..Nitin
For our case we use app center for preparing android and ios builds.
For production branch we use release provisioning profile and for normal branches we use normal provisioning profile, and we instead of picking the production build, used normal branch build, which caused this issue.

Can't create ipa from Xcode 7

My project was initially build with the early version of Xcode.
Even with Xcode 6 I was able to export the app (Ad Hoc, ipa file).
After that we started to use continuous integration & upload of builds to iTunes.
Also, I have deleted my working copy.
Recently, I have to make fixes in the project.I checked out the source code, updated my Xcode to the latest version - Xcode 7, updated the project.
But now when I am archiving the app, it goes under unknown app in Organizer, I can't create ipa ( Validate button is not active).
For some reasons the app, in the Organizer doesn't have a valid identifier
I tried to use a new
PRODUCT_BUNDLE_IDENTIFIER
and directly to set correct bundle ID, but I still have 2 items, instead of one app.
In build setting under build option Disable bitcode.
In build setting under deployment set false to skip install.

Change app Version with only IPA file provided (no xcode)

I have an app that was developed for my company. Unfortunately it needs to be resigned (i know how do this part) because the distribution cert has expired. The problem is we need to change the version number so it allows for an update on all iPads. Does anyone know how to do this using terminal (i have xcode installed but i dont have and of the files from the developers). Once again, i only have the IPA file for the app.
Thanks for any help.
Rename the .ipa to .zip, and unzip the archive.
Inside should be a folder called "payload", and inside that folder should be your application archive.
Right-click the application archive, and choose "show package contents."
Find the Info.plist file (either named "Info.plist" or "AppName_Info.plist"). Open that file with a text editor
Change the value of "CFBundleVersion" and "CFBundleShortVersionString" to your desired version number.
Re-zip the archive
Rename the .zip to .ipa
Re-sign the .ipa
In answer to Chris Emerson's comment above (sorry, I don't have enough reputation to add another comment so I'm adding an answer) it is still possible to do this! I have just done it for an IPA with latest updates to everything iOS 8.3, OX Mavericks. I was getting the same message "... could not be installed at this time" and it turned out to be an issue with the entitlements in the provisioning profile not matching the entitlements in the *.app.
You can check the entitlements in both like this: https://developer.apple.com/library/ios/technotes/tn2318/_index.html#//apple_ref/doc/uid/DTS40013777-CH1-TNTAG68, and I put an answer detailing how I fixed the entitlements of my IPA so that they matched here: Alter Minimum OS Version of IPA without XCode, iOS 8+.

Resources