Unable to archive updated iOS PhoneGap app - ios

I recently upgraded my PhoneGap app from 2.4.0 to 3.4.0. To do this I had to create a new project using NodeJS, then copy all the www files and resources into the new project. I added a new ios platform. It compiles and runs in xcode 5.1. The simulator works too.
Now I want to submit this to the app store as an update to my previous version. The problem is the "Product > Archive" menu in xcode is disabled.
Has anybody who can give me some direction been through this process? Or direct me to where I can get some help?
======
UPDATE: I found that I the target device must be set to iOS Device in order to archive a project. Now Archive is enabled. I run archive, but no archive is listed in the Organizer.
Still looking for help.

Make sure you connect your device first. You cannot archive your project without a device.

This turns out to be a simple oddity with Xcode. If you have a simulator selected you cannot archive. Choose iOS Device and then you can archive, with or without an actual physical device connected.

Related

Xcode 8 App installation failed, unknown error occured

The following error occurred when I tried to run a project on my iOS device. Running it on a simulator works fine.
The other weird thing is that I am able to run my other projects on my device, only this particular project that is giving me this error.
I tried all the solutions I'm able to find:
Cleaning the project, deleting derived data
Restarting Xcode, my Mac, and my iOS device
Deselect 'Automatically manage signing' in the testing Target.
I couldn't delete the app from my device and re-install it because it wasn't installed on my device before.
Any help would mean alot to me! I am using Xcode 8.1 with Swift 3.0, running on a iOS 10.1.1 device.
Close your Xcode completely from currently running on Dock
Unplug your iDevices cable at your Mac and plug again.
Open Xcode Again.
Clean,Build and Wait for indexing the device
Delete the previous app you install on your iDevice
Then install
If you have free Developer ID, make sure you got the Internet access
right on your iDevices.
Else,
Check your provision profile or certificates of your app that it's still available or not [Expire or not].
If expired, please create again.
Install those latest provision profile at your Xcode Preferences/Account/Detail/
Make sure Signing "Debug" and "Release" aren't empty
Close the Xcode(Completely quit from Dock) after you completed those steps
Open the Xcode again and do Clean,Build and Install
Hope this help.
Other alternative way,
Remove the app on the device and re-install
Change build version no and install again
Clean your the project and reattach your device
Do a pod update if you are using CocoaPods. This error can occur due to one of the pod libraries, device logs can be checked for the name of the library.
I get this error only on the second compile for device targets, and I've found that if I just modify one critical source code file by adding just an empty line, the error goes away and Xcode will compile again. The other way is to target a second device which isn't always convenient.
A way around this confusion is to add a an Xcode Run Script that basically does this for you.
Force Xcode 9 to recompile after a build seems to be file dependent also
touch ${SRCROOT}/MyProject/MySourceFile.swift exit $?
With the above script my issues went away, and I never saw the Xcode Alert again. This bug has been in several iterations of Xcode now.
I have the same problem too, and also tried all the solution like you. unfortunately, not solve this problem, but I copied my project to another path, the copied one can build on my phone successfully, hope this can help you.
It can happen if you have debugged the same app(bundle identifier) with more than one Apple Ids. Remove all accounts from Xcode and sign in to the one which you're currently working with.
Restart your Xcode & Uninstall your app.
Build & Clean your Project, now it working good.
this works for me
above is not working please Restart your system
This error message occurred when I was building on an iPhone 5 and an iPhone 6 Plus with Xcode 10. Build in iPhone 5s Simulator gave a different error: "App could not be installed at this time…/Notification Extension: No such file or directory"
Problem was resolved by check marking Target Membership in my Notification Extension's source file.

ERROR ITMS-90167: "No .app bundles found in the package" [duplicate]

Before I start writing about the error, I'm running on macOS Sierra and using Xcode 7.3.1.
So I'm creating an Archive from my App, I validate the App and it passes validation, but when uploading to App Store, I get the error "ERROR ITMS - 90167 No. app bundles found in the package".
I've checked all my documentation and I have everything.
I have all my provisioning profiles.
I have Release as "iOS Distribution".
This error just started appearing after I installed macOS Sierra.
Anyone has an idea of why I'm getting this error?
After chatting with folks at WWDC in both the Xcode lab and the App Store lab, they were able to dig up information that this is a known issue in the current Sierra seed that is fixed in the next release. You can either revert, or wait. Not the most satisfying answer, I admit.
Problem:
Issue with the current macOS Sierra build.
Workaround
Build with Xcode 7.3.1 then upload using Xcode 8 [Beta]. (Thanks to #JollyRoger)
Currently, this workaround ONLY works for TestFlight and NOT for App Store submissions.
No need for fix [UPDATE]
So it seems that this bug has lasted for the whole beta period and it might not be worth for Apple to fix it anymore as the final version of iOS 10.0 is releasing in a few days and the final macOS Sierra is releasing a few days after that.
If you are still getting this issue with the final build of macOS Sierra, make sure you are using Xcode 8.x and not anything earlier than that.
Possible errors:
ERROR ITMS-90635
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle
"....framework" isn’t consistent with the Mach-O in the main bundle.
The main bundle Mach-O contains armv7(machine code) and arm64(machine
code), while the nested bundle Mach-O contains armv7(bitcode) and
arm64(bitcode). Verify that all of the targets for a platform have a
consistent value for the ENABLE_BITCODE build setting."
Fix: Uncheck the Include Bitcode option before uploading.
INFO ITMS-90111
INFO ITMS-90111: "Beta Toolchain. This app has been built using beta toolchains. Apps built with beta toolchains are acceptable for TestFlight submission. Note that you will not be able to submit these builds for sale on the App Store."
Note: This will allow you to upload the build and use it for TestFlight but when trying to submit to the store you will be faced with this error message:
New apps and app updates must be built with the public (GM) versions of Xcode 6 or later, OS X, and tvOS SDK. Don't submit apps built with beta software including beta OS X builds.
If you are uploading from Xcode7(less than Xcode8) and macOS Sierra(V10.12), So this issue "ERROR ITMS-90167: "No .app bundles found in the package"" will come and will not allow to upload build to AppStore.
So use "Application Loader V3.6" or "Xcode8" to upload the build.
Try This, it worked like a charm for me,
We also facing same issues at time of updated macOS Sierra.
At time of upload build by using Xcode7.3.1 we get an error message
"ERROR ITMS-90167:"No.app bundles found in the package"
To Solve Error And Upload IPA file On App Store Follow Below Steps
We export build by using Xcode7.3.1.
-For upload build we use Application Loader V3.6 of Xcode8.
Xcode -> Open Developer Tools -> Application Loader
Follow Below Steps
1) Open Application Loader
2) Choose Build(IPA)
3)Uploading IPA file To app store
4)Successfully Submit Build(IPA)To App store
Your App will uploaded on Appstore,
Hope this is help for some one.
I would first like to thank #xemacobra for his solution, it worked for me until I needed to submit an application for Review.
If you need to submit an application for the App Store, and the build says You may not submit builds using beta software... here is the solution:
The problem is Xcode is sending the build information along with the version of you Mac OS. To fix that, you just need to change your Mac OS build to an older, acceptable, version.
Restart your Mac and hold Command + R on boot up
Open Terminal
Run csrutil disable
Restart your Mac.
In Finder, go to /System/Library/CoreServices/SystemVersion.plist
Open the file so that you may edit the SystemVersion.plist
Find <key>ProductBuildVersion</key> and locate the string attached to this key. For example, mine was 16A254g.
Change this string to a version of Mac OS that is currently supported for public release. At the time of this solution this one will fine: 15G31
Restart Xcode. Re-Archive your application. Re-Submit the application.
I did not try submitting the application through Xcode 7.3.1, but I do know this still works if you submit the .ipa through Xcode 8 beta 3.
Once you have submitted your build, revert the SystemVersion.plist to the original string, and repeat steps 1-4 replacing csrutil disable with csrutil enable.
I have also experienced the same. This is the simple way to solve your problem. Archive your app using Xcode 7.3.1 and export the ipa file of your app into a directory by selecting the option Save for iOS App Store deployment.
After that open Xcode 8.0 and open Application Loader from Xcode -> Developer Tools. Sign in to your team, and upload the ipa file using Xcode 8.0.
I have uploaded two apps to iTunesConnect, it will work for sure.
I was having this issue with Xcode 8 GM and trying to submit an app for release though Application Loader.
You have to use the version of Application Loader that comes with Xcode 8, which should be 3.6
I still have Xcode 7 installed, and was using Application Loader 3.5
Update
My apps submit okay now and go into processing, then soon after disappear completely. I think this might be a separate issue though.
Update 2
You still can't use Sierra to submit your apps. At least not until they release the GM.
Update 3
This issue is still occurring with this particular project. All other new ones (sticker apps) that I have created since public launch have been submitted to iTunes Connect with no issues.
I worked on this project during the betas, so it's possible something has been corrupted along the way and is causing issues. Might require starting a new project in Xcode 8.
There's a thread on the developer forums addressing this issue. https://forums.developer.apple.com/thread/62703
Solution
Turns out the fix for us was to add the "NSCameraUsageDescription" key
to the info.plist with a description of what the camera does in the
app.
Not sure if that solution will help in all cases though.
I submit an app built using LibGDX and had the same issue after upgrading to Sierra. I solved it by:
Upgrading Xcode (8.x), as explained above
Use the latest version of appLoader (3.6). To do that, use the AppLoader available within Xcode. I was using a standalone version of the appLoader: that's incorrect. Open Xcode and go to Xcode->Open Developer Tool->Application Loader
Unable to process application at this time due to the following error: No .app bundles found in the package. This issues appear when your pc's space is less. So clear you trash or some useless document from you pc. Then let's try again! It's work for me!
I recently upgraded to macOS Sierra and also received this error message. After uploading through the application loader failed.I downloaded Xcode 8 (kept my 7.3.1 copy). Closed Xcode 7.3.1. Opened Xcode 8-> Organizer-> proceeded to validate and upload my build. It worked. Hope this helps someone in a similar situation.
Maybe it's about your disk space check your disk space.
Try open App Loader from Xcode8.
Xcode > Open Developer Tools > Application Loader
Then you can upload app to TestFlight without the error.
These are all fabulous answers above... follow Nicholas's 9 step process above and also Tobeiosdev if you don't have write access to the SystemVersion.plist file.
However be very careful about how you read the step by step guide. DO NOT do as I did and restart your device after editing that plist file, as you will render most applications on your mac useless, including Terminal & TextEdit (which are required to edit it back). Reopen terminal inside Sierra (or the beta OS you are running) not inside the command line.
I unfortunately found out the hard way and then could not edit the plist file again in the command line. So I then had to reboot several times before finding the solution which was to go into single user mode (Command-S on restart), all of which scared me senseless that I had ruined the build of my mac. Eventually got everything running again but was somewhat delayed too by having to reinstall Xcode 8... leading to a sleepless night as my first ever submission to the AppStore.
All in all, the above is a perfect solution that works all around, IF you follow the directions correctly. Lesson learnt!
I accidentally opened an old version of the Application Loader Version 3.5 (921) and got the error ITMS-90167 no app bundles found. Be sure you open the Application Loader over the menu of Xcode (Xcode->Open Developer Tool). Version 3.6 (1020) works like a charm! :)
I solved this problem as follows, find your archive in the Organizer, and then:
Show in finder
Show package contents
In the „Wasabi.xcarchive“ file, find the
„Products“-„Applications“-„Wasabi.app“(Wasabi is your app’s name),
„Show package contents“ again
Finally, you can see there has a file named“Info.plist“, open it
Edit the value with a key named „BuildMachineOSBuild“, I just change
it to „15F34″(it’s „El Capitan 10.11.5“ ’s version)
According to #Fan Zhang answer follow these steps and you can upload this archive use Xcode or Application Loader, whatever you want!
When you archived your app, find your archive in the Organizer, and then:
-->"Show in finder";
-->"Show package contents";
-->In the "xx.xcarchive" file, find the "Products"->"Applications"->"xx.app"(xx is your app's name), "Show package contents" again;
-->Finally, you can see there has a file named"Info.plist", open it;
Edit the value with a key named "BuildMachineOSBuild", I just change it to "15F34"(it's "EI Capitan 10.11.5" 's version);
With me, my application writing by Swift 2.2. And must use Xcode 7.3.1 to archive and upload to Apple testflight but got the same error(I run on macOS Sierra-10.12). The follow solution fix it for me, hope another who face the same problem can find somethings helpful:
1> Use Xcode 7.3.1 to archive
2> Export to file .ipa
3> Quit Xcode 7.3.1 then open Xcode 8, and then open Application Loader, use Application Loader to upload file .ipa to itunes connect.
In case this helps, I had the same error code "ERROR ITMS - 90167 No. app bundles found in the package" using mac OS 10.14.4 with Xcode 10.2.
(As a note, I was able to successfully submit builds some weeks ago with the same configuration, but this seems to be something in the iTunes Connect side)
Had to update to mac os 10.14.6 and Xcode 10.3 to successfully submit my build.
I faced the same problem .
what worked for me was ->
go to target-> signing & capabilities -> signing certificate -> I had to revoke one certificate. Always revoke the Certificate by the name of admin's iMac .
It is created by default while making your certification and profiles.
**Picture is attached for the reference.
PS:- always make sure the bundle id is same on App store connect and Xcode before archiving.
The privacy settings are changed for iOS 10, more on this could be read here
I had previous described issues, which had to be solved as described, but after successful upload application wasn't visible on iTunes connect.
I had to add Privacy - Bluetooth Peripheral Usage Description key in a plist in order to solve the last one.
Other missing keys will make the same problem.
I was getting this error with Xcode 7.2.1 and Application Loader 3.4 on macOS 10.12.1.
But for some reason, it worked if I used the command-line "altool" to do the upload instead:
'/Applications/Xcode-7.2.1.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/altool' \
--upload-app -f your-app.ipa \
-u your-apple-id -p your-apple-id-password \
--output-format xml
I had to provide missing application name in order to fix this problem.
Go inside your Appstore and download the new version of Transporter.
this worked for me

Is there a way to test my Xcode 7.2-compiled app with iOS 9.3?

I have the iOS 9.3 beta installed on a testing device as I'm running a few 9.3-compiled apps, but I also have an old app that is compiled in Xcode 7.2. I can run the app on any iOS 9.2 device with ease, but if I try to run it on the one iOS 9.3 beta device, I get the "could not find Developer Disk Image" error.
Xcode 7.3 includes some updates to Swift, so I'd have to change a great deal of my files, and I just want to test to see if it's working fine. Is there any way to do this without having to change a lot of Swift code? It's on the App Store compiled for 9.2 and I can run it on my 9.3 device, so I don't understand why it's so difficult.
If you want to avoid the beta version of Xcode from potentially altering your original project, just make a copy of the project and then just open it up in the beta version. If you have an app running in Swift 2.1.1 (Xcode 7.2), the differences to Swift 2.2 (Xcode 7.3) are pretty modest. And if you do this with a copy, you can be confident that your original project won't be altered.
If you don't want to do that for some reason you can install apps from a production version of Xcode on a device running a beta version of iOS:
First, you want to make sure you have the profiles installed on your beta iOS device. The easiest way to do this is to run some "Hello World" app on your beta device from the beta Xcode. If prompted to add a team/profile onto your device, you should go ahead and do so, like usual.
Quit the beta Xcode and start the production Xcode and open the project for the app you want to install. Select "Generic iOS Device" where you choose the active scheme in jump bar and then build the app. You should then see the .app file (not in red) in the Products folder in the "Project Navigator" tree in the left panel.
Install the app on the device by opening the devices window (shift+command+2) and selecting the device in question. In the right panel (or top right panel if you're showing the console, too), you'll find a "Installed Apps" section. Just drag the .app file from the Products folder into this installed apps section.
Clearly, if you have other apps you want to install, you can just repeat steps 2 and 3 as appropriate.
There are a bunch of different ways to install an app on a device, but I find this is the easiest for one-off installs with a device sitting in front of me. You won't be able to debug if you do it this way, but you can at least fire it up, run it through its paces, watch the device console for any debugging messages you may be NSLog'ing, etc.

Simulator list disappears in Xcode 6.1 after installing Xcode 6.3

I downloaded new Xcode 6.3 and while installation (with drag-n-drop feature, not using App-Store) it asked me if I want to keep both or replace the old Xcode 6.1. I kept both for some reasons. But after installation new Xcode 6.3 works fine but I'm missing simulator list in old Xcode 6.1. It only shows iOS Device on the list. Yes, I created and replaced with several new scheme, tried to edit it. Also tried to add simulators from Xcode -> Open Developer Tool -> iOS Simulator an then Hardware > Device > Manage Devices from here and here. In this process simulator even shows up. I checked package contents of Xcode 6.1. Platforms (both OS and Simulator) are all there. I know I can restore it by deleting from application folder and reinstall it. But if there any way so I can get and make work simulators for xcode 6.1 without reinstall it? And What is the reason behind this simulator disappearance? I'm guessing PATH issue. Am I right? Thank you for your time.
I would say Xcode is now corrupt after choosing to Keep Both, which merges the files in the two apps, as far as I'm aware.
You need to download both Xcode 6.1.1 and 6.3 from the Apple Developer Downloads site and install them using separate names:
Delete the existing /Applications/Xcode.app.
Drag Xcode 6.1.1 into /Applications and then rename it Xcode611.app.
Drag Xcode 6.3 into /Applications and then rename it Xcode63.app.
Add both to your Dock as desired.

Xcode Developer Preview: Cannot Run on Device

When trying to run any project in an Xcode Developer Preview (Xcode 5 DP6 in my case), the app is not started and the following error message appears:
Could not launch "" - No such file or directory (/private/var/mobile/Applications/741F0826-E354-4E13-9CC3-0FB3A66E8798/.app)
The solution was very simple in my case, in Terminal just execute
sudo xcode-select -switch /Applications/Xcode5-DP6.app/Contents/Developer/
with the path for the currently used Xcode Developer Preview.
Do not forget to switch back when developing on the previous stable Xcode version again - especially when archiving for AppStore submit.
I faced the same problem, I did following things to sort out my problem:-
1) Changed "don't sign" and "iPhone distribution" to my valid developer provisioning profile in Xcode's build setting.
2) Quit Xcode.
3) Uninstalled App from device.
4) Unplugged device.
5) Plugged in device.
6) Ran Xcode
7) Built and Ran App.
Thats it :)
This has a very simple solution (works on every Xcode so it's not NDA thing):
Kill all Xcode running
Delete the app from device (if there is any), Restart your device and disconnect it (if was connected).
Open organiser in Xcode and check that device is connected and used for development, if not select "use for development"). Device should be on and connected.
Check the signatures are good.
Build& run.
This should work. Let me know if it doesn't.
I worked on this issue for about an hour, trying everything on every post I could find on SO, but nothing worked. I then compared my project settings to another project that did run on iOS and found the issue was MACOSX_DEPLOYMENT_TARGET was set to 10.7 on the iOS build. I share the same project for my iOS and OSX targets for each app I make, so it's easy to see how this happened. I deleted the setting at the project level, added it to the target level for each OSX target, stripped and built the iOS target and it finally ran! Not to say the other solutions are wrong here, there just could be multiple causes.

Resources