OSStatus error -67028 When Building Ad Hoc iOS App - ios

I'm getting an error when trying to do an archive build for ad hoc distribution on iOS for an iPhone-only app. The app is signed with the proper certificates and has the proper provisioning profile (checked with a friend who was able to sign properly as well, so it's not a code signing issue).
Whenever I try to distribute with the Xcode archive panel, I get the following error message in an alert sheet:
OSStatus error -67028
I've never encountered this error before. I'm able to build and have the app run fine in both the simulator and device, but for whatever reason, I'm completely unable to get the distribution feature of Xcode to work to create an ad hoc build.
Has anyone ran into this issue before?
Things I've checked are:
Code signing (generated all new certs and profiles to start from scratch)
Files and frameworks
The only thing that I could find with the files and frameworks that might be off is that the main Storyboard file (Main_iPhone.storyboard) couldn't be found in the Copy Bundle Resources, although the storyboard loads properly in Xcode and allows editing, and can be found in the Finder under the Base.lproj folder.

I had the same issue with the HockeyApp SDK. What I actually did was
Remove HockeyApp SDK by selecting "Remove reference" from the Frameworks folder.
Drag&Drop the Folder HockeySDK.embeddedframework to the XCode Frameworks folder
Deselect the "Copy items into destination group's folder (if needed)"
Select "Create groups for any added folders"
Select your target

According to the docs, 67028 means "The bundle format is unrecognized, invalid, or unsuitable". That is pretty vague, so I would investigate the current lead you have, that is, ensure that the Main_iPhone.storyboard file is indeed in the compiled bundle. If not, check your "copy files" build phase to ensure it is there.

Related

Xcode: Problems with getting my App to the AppStore

I am trying to upload my app to the AppStore with Application Loader
I tried to archive my project in order to generate the "ipa" file for Application Loader and the archive process got stuck at "Compiling swift sources" for almost 5hrs; I took to the response I read from - Xcode 6.0 taking forever to archive my project and I successfully generated the .ipa file with iTunes but while trying to upload with Application Loader, I get the error:
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning
profile included in the bundle com.youngbobby.MyAppName
[Payload/MyAppName.app] is invalid. [Missing code-signing
certificate]. A Distribution Provisioning profile should be used when
submitting apps to the App Store. For more information, visit the iOS
Developer Portal."
I have generated my keychain certificate and my distribution provisioning profile and I still get that error during submission. Do you think the error is related to the method I used? Do I have to maintain the traditional "archive" method? If yes, what would be the fastest way to archive and generate my .ipa file? I have tried enabling Whole Module Optimisation as suggested here all to no avail.
Any help would be greatly appreciated.
EDIT
I did a quick check on why my archive process was stuck at "Compiling swift sources" using "cmd + 8" and I noticed that my local Data store swift file which is a long Dictionary of type [[String:Anyobject]] was the cause of the problem. I can't really explain why it is so but I want to maintain the traditional method of archive and send because it seems using iTunes to generate my ipa file does not agree with my provisioning profile.
When you are building the project, it is still building for debugging, hence it is using the development provisioning profile.
Before you do the build to create the .app, go to the Scheme (just to the right of the stop button, to the left of the device on which you are running).
Click that and choose "Edit Scheme..."
Under the Run section, there is a setting for Build Configuration.
Change that from Debug to Release (if you are using the standard build config and you have configured the Release config to use your distribution profile and signing identity).
Close that window, then change your device to the generic "iOS Device option (make sure you don't have any devices plugged into your Mac).
Once you've done that, run your build again and the ipa created should be built with your release configuration and signed correctly.
You are probably using a Development Provisioning profile.
Go to your dev center.
Create a new provisioning profile, select App Store and select your bundle ID. create that and download it.
Control drag that provisioning profile to Xcode, Change build settings in target and project to the one you downloaded now and as Distribution.
Compile and build your app. Archive it and start uploading it to App store.
That should do it.
P.S do select your team correctly before you configure your build settings.
EDIT
If you already have done these steps just revoke the old one and create a new Provisioning profile and check.
Finally got my problem solved.
It seems all I needed to do while my app was compiling swift sources was to WAIT
I reduced the amount of Data in my Datastore file and the Archive process took less than 10 seconds to archive.
Pity, Xcode does not show a Timer to calculate how long it would take to archive a project and looking at the progress bar does not really guarantee that the process is working as in my case was a relatively huge one. So, maintaining the huge data I had, I simply had a 6hr nap and by the time I was up, my project was successfully archived and all other processes worked seamlessly :)
If you find your project 'stuck at compiling swift sources' during Archive Process, all you need to do is Wait.

Why does one .o file in my project has no Provisioning Profile?

Im trying to submit a version of my app and after building im seeing the following screen
My app has a valid provisioning profile except one .o file that is for some reason not included in it..
That has been the case for a while now, and i have managed to submit the app without it being a problem.
A couple of day ago, after submiting a new version, i recived an email from apple saying :
We have discovered one or more issues with your recent delivery for "xxx". To process your delivery, the following issues must be corrected:
Invalid Signature - Code object is not signed at all. The binary at path [xxx.app/FooterCoverflowCollectionViewLayout.o] contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
Once these issues have been corrected, you can then redeliver the >corrected binary.
Regards,
The App Store team
I've tried the steps they recommended with no luck. Can anyone have any idea how to solve the issue ?
Removing the mentioned file, building, re-adding it to the project and building again solved the problem.
I experienced this exact problem, and would like to share what happened.
The .m file for one of the classes we had written (ie: not a third party library) had been erroneously added to the project in the "Copy Bundle Resources" section in "Build Phases". There is no reason for the file to have been there, and had been there for quite a long time.
The error described in the original post just started showing up in our latest submission to the app store last week, and from what I gather from other posts around the internet, Apple has recently changed something about their code signing and submission process. The .m was absolutely in the Copy Bundle Resources section in our last several submissions.
Simply removing this file, rebuilding, and resubmitting solved the problem. Since the file didn't need to be there in the first place, there was no need to add it back again.
There may be other causes for this error, but if you get this error, check your "Copy Bundle Resources" section the files that are being listed with zero entitlements.

Invalid Signature (Invalid Binary) on iTunes Connect

I know is a duplicate question, but on all other questions i cant find a solution, so i retry to post question with more details.
I archive my app on xcode5 for iOS7 with Release Scheme and correct Provisioning Distribution
that's the screen:
This is on Project
And This is on Target
I try to do many different asset, i'am sure to my Building Archive is on Release but the answer of iTunesConnect is every time the same:
Dear developer,
We have discovered one or more issues with your recent delivery for
"MyApp". To process your delivery, the following issues must
be corrected:
Invalid Signature - Make sure you have signed your application with a
distribution certificate, not an ad hoc certificate or a development
certificate. Verify that the code signing settings in Xcode are
correct at the target level (which override any values at the project
level). Additionally, make sure the bundle you are uploading was built
using a Release target in Xcode, not a Simulator target. If you are
certain your code signing settings are correct, choose "Clean All" in
Xcode, delete the "build" directory in the Finder, and rebuild your
release target.
Once these issues have been corrected, go to the Version Details page
and click "Ready to Upload Binary." Continue through the submission
process until the app status is "Waiting for Upload." You can then
deliver the corrected binary.
Regards,
The App Store team
And Invalid Binary
I become to crazy to understand how to sole this issue, any body have idea to do this?
Thanks.
****Test Response****
Athority Screen
is correct
In Xcode, at the target level do the following:
First choose the provisioning profile for the Release configuration. (For Any SDK)
The provisioning profile must match the app's Bundle ID (As you can see in the General tab).
In the code signing identity, tap on the sub-menu for Any iOS SDK and make sure you choose Automatic. If you can't see below.
Clean All and Archive.
Choosing CodeSign identity:
In step 2, if you can't choose Automatic, then it means you might not have a match between the AppID and the app's Bundle ID.
The AppID is pointed by the provisioning profile you chose.
If this is the case, then login in the developer portal and make sure that the provisioning profile you used points to the correct AppID.
To verify the the .ipa or .app before you submit try these commands.
Then look at the printout, and see if all looks right. Also verify the expiration date.
$cd <where the app is>
$unzip *.ipa
$cd Payload
$codesign -d --entitlement - *.app
$codesign --verify -dvvv *.app
$security cms -D -i *.app/embedded.mobileprovision
In Apple developer support, I've seen two additional common causes of the Invalid Signature binary rejection reason,
executable files containing special characters (i.e. non-numeric, and non-alpha). To resolve this issue, change the Xcode target’s Product Name build setting from “${TARGET_NAME} to a string containing only alpha/numeric characters. Let me know if this was the cause of the issue (and the problematic characters) because I file bug reports to fix each instance I find here.
Apple Double Files ("double files") that result from copying the Xcode project uncompressed to/from a non HFS+ formatted hard drive. To check if this caused your rejection: 
A. Run the app diagnostic here: How do I check if my application's signature has been corrupted?
B. Then check the command line output with: List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:  
resource missing: my.app/._.*
C. From the docs:
The file prefixed with "._" is considered an AppleDouble file and it
can result from copying the uncompressed Xcode project folder onto a
non-HFS+ formatted disk. The AppleDouble files must be removed using
the 'dot_clean' command. The Xcode project folder is the argument to
dot_clean as illustrated below. Note: You can drag your Xcode project
folder from Finder into the Terminal window to automatically fill its
path into the command.
dot_clean /path/to/My_Xcode_Project
(If Terminal can't find the dot_clean utility, download the optional Command Line Tools through Xcode > Preferences > Downloads)
D. After running dot_clean on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.
To prevent double files be sure to compress the Xcode project folder to .zip using Finder before transferring it to/from a non HFS+ formatted hard drive. 
Now it must be include following architecture.
armv7 armv7s arm64 i386 x86_64
Try this.

App Submission: Invalid Binary - Invalid Signature

I am trying to submit an update to the iOS app store. I am going from a Buzztouch app to a Sprite Kit app. I am able to archive the Xcode project and submit it. The app gets to the status of Upload Received but than about a minute later, it changes to Invalid Binary and I get an email saying:
Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
I have cleaned out the build directory, rebuilt my release target, and made new provisioning profiles multiple times. All of the Code Signing Identities are set to iOS Developer. Code signing and the provisioning profiles have always been a little bit confusing to me, I could have made some obvious mistakes.
I have tried submitting over 50 times! I find this very frustrating because I have emailed Apple and they got back to me but it was just a link to the dev center with code signing information. I have also spent lots of time searching the Internet to find a solution to this and there hasn’t been a good solution that actually works for this problem.
The only thing I can think of is either because I am changing from a Buzztouch app or it is Sprite Kit.
Here is a screenshot of my code signing:
In Apple developer support there are two additional common causes of the Invalid Signature binary rejection reason,
executable files containing special characters (i.e. non-numeric, and non-alpha). To resolve this issue, change the Xcode target’s Product Name build setting from “${TARGET_NAME} to a string containing only alpha/numeric characters. Let me know if this was the cause of the issue (and the problematic characters) because I file bug reports to fix each instance I find here.
Apple Double Files ("double files") that result from copying the Xcode project uncompressed to/from a non HFS+ formatted hard drive. To check if this caused your rejection: 
A. Run the app diagnostic here: How do I check if my application's signature has been corrupted?
B. Then check the command line output with: List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:  
resource missing: my.app/._.*
C. From the docs:
The file prefixed with "._" is considered an AppleDouble file and it
can result from copying the uncompressed Xcode project folder onto a
non-HFS+ formatted disk. The AppleDouble files must be removed using
the 'dot_clean' command. The Xcode project folder is the argument to
dot_clean as illustrated below. Note: You can drag your Xcode project
folder from Finder into the Terminal window to automatically fill its
path into the command.
dot_clean /path/to/My_Xcode_Project
(If Terminal can't find the dot_clean utility, download the optional Command Line Tools through Xcode > Preferences > Downloads)
D. After running dot_clean on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.
To prevent double files be sure to compress the Xcode project folder to .zip using Finder before transferring it to/from a non HFS+ formatted hard drive. 
This is what I did when I encountered a similar problem with the Mac App Store:
Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
Download both certificates and drag them to Xcode's icon (not sure whether it had any impact, but after so many submission failures, I was pretty superstitious).
Re-fresh the certificates and identities from Xcode.
Open Xcode's Preferences.
Go to Accounts tab.
Clicked my account
Clicked the refresh button.
Generate the archive.
Submit the app and clicked on "refresh signing identities" somewhere mid-way in wizard prompts.
As a reference, here is my built settings related to signing. That one worked the last time I submitted the app (which has been in the "waiting for review" state for the past two days now, so I guess it passed all of their automated tests).
Your issue relate with signing failed because of your app didn't sign with recent distribution certificate. Check the following steps:
1) Check your bundle identifier to list out provisioning profile as like below picture. Because It also lead to this problem.
2)You may not using the correct certificates when building your app. Just Delete your certificates in Provisioning Portal and create new ones and update them in Xcode.
3) From your picture, you didn't selected correct provisioning profile. Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones. see screen shot to how to do that.
Select correct Provisioning profile.
Select correct code sign.
4) Cleaned up your project.
5) Just clean all your targets . You can even go to /Users/%USERNAME%/Library/Developer/Xcode/DerivedData and delete all of the directories in there.
see this ref
Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme
Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)
Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)
After doing all of the above
Menu Bar
try Product->Archive
Then from the organise try resigning and submitting.
Window->Organiser
Select archive and then press distribute (but i'm pretty sure you'll know how that works)
Obviously if you can't do this then chances are you have indeed got something wrong with your signing certificates, more specifically your bundle identifier is likely to be the culprit.
One other option is your app uses services that you haven't set up on developer.apple.com/ios for the app id such as game centre, push notification etc. Good luck
check your launch images . Are they conflicting like 2 images have got same name. Because i have got the similar issue which i solved like this within 10 minutes.
To figure out this problem I just created a new Xcode project and copied and pasted everything into the new project.
In my case the problem was to not ASCII chars in filename (someone did sent us to embed), solution was to do a global search in project:
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':# /-]"
And delete those chars from filenames.

TestFlight beta-testing iOS app

I completed to develop my first app. Right now i want to distribute my beta throught https://testflightapp.com
I tried to create .ipa file with this tutorial - http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4
In the very beginning i should select Entitlements, but there is not such category as Code Signing..
Any helps? Thnx.
PS I have a developer account.
UPD. Does somebody create ipa files for TestFlight on XCode 4.3? How do you do that?
I skipped entitlements altogether. With Xcode 4.2 and later I have not needed them.
Make sure your Archive Scheme uses your Debug configuration. Then just do an Archive of the project (under the Product menu). Save the Archive someplace. Then drag that Archive file onto the TestFlightApp's green "Upload Build" button. That easy. No messing around with entitlements, etc.
Before you do this, make sure you can actually build a correctly formed archive by building, and e-mailing it to one of your testers and see if it can be loaded. There are a bunch of things that have to work before you can use TestFlightApp. Just because you can Build and Run from Xcode doesn't mean that it will work on a remote device that doesn't already have your provisioning file. For example, you have to have your App ID, provisioning profiles and Device ID's all configured correctly via the Provisioning Portal. Once I did that, and verified that my .ipa files can be installed manually, then just uploading to TestFlightApp.com worked without having to do entitlements.
I wrote this up and put it on TestFlightApp's support forum, but for some reason TestFlightApp.com won't let me into the support area so I can find it - I can't use my login to access their "Tender" account.
That's because that tuturial was done for another version of Xcode.
Just create a new property list file (Entitlements.plist) in your Xcode project and it let you edit it as a Entitlements file just fine.
The What's New in Xcode (pdf) documentation states that:
The iOS platform has supported entitlements for a while, and with Lion, Mac OS X does as well. With Xcode 4.1, the project editor provides a UI for setting up entitlements for Mac OS X applications. You can set entitlements for each target in the project editor. There is also a default code-signing entitlements file available in the file templates in the utilities pane.
In the Summary tab of your project editor is a section titled Entitlements. Check the "Enable Entitlements" box to have Xcode automatically create an Entitlements plist for you. This section also governs the entitlements' interaction with iCloud and Keychain.

Resources