Xcode 7 GM created generic archive instead of iOS app archive - ios

I recently started using Xcode 7 GM.
When I archive my project, I get a generic Xcode archive instead of an iOS archive.
I'ved tried pretty much all the following:
xcode is creating generic xcode archive instead of iOS App Archive
Cannot generate iOS App archive in xcode
I compared the contents of a previous successful archive and a different folder structure for some components:
Swift libraries are inside a sub folder
The app extension is outside of the .app package
The info.plist is missing keys
Has anyone else encountering this problem? If so, did you solve and how?
Edit
We are using Cocoapods 0.38.2

I add the same problem : an old Xcode project, Xcode 7 (not the GM, the App Store version) and Cocoapods.
I have been tinkering a lot, tried Cocoapds 0.39 b3 and b4 without success, changed params in Build Settings, but finally - for me - the problem was shown by mrezk in https://github.com/CocoaPods/CocoaPods/issues/4021 :
Missing ApplicationProperties in Info.plist
As I'm not used to tinker with Info.plist and these keys, I've found in the Apple Dev forums a very useful answer : https://forums.developer.apple.com/thread/17063
In summary, for info.plist newbies like me ;) :
Archive your project
Organizer will show a Generic Xcode Archive
Right Click, Show in finder
Right Click, Show Package Contents
Open the Info.plist file in a XML editor
As mochs indicates, add these lines in the section :
<key>ApplicationProperties</key>
<dict>
<key>ApplicationPath</key>
<string>Applications/<<APP_NAME>>.app</string>
<key>CFBundleIdentifier</key>
<string><<BUNDLE_IDENTIFIER>></string>
<key>CFBundleShortVersionString</key>
<string><<YOUR_MARKETING_NUMBER>></string>
<key>CFBundleVersion</key>
<string><<YOUR_BUILD_NUMBER>></string>
<key>SigningIdentity</key>
<string>iPhone Distribution: <<CERTIFICATE_NAME>> (<<CERTIFICATE_ID>>)</string>
</dict>
and replace the tags with your own values.
Save, close Xcode, double click the archive : it should open in the Organizer as a iOS Type Archive.
Thanks to mrezk and mochs for the solution.

OP here.
The members of my team all tried Cocoapods' beta and it fixed the problem for us. Therefore I'm going to accept my own answer.
Although it might fix the problem, I believe Christian Navelot's answer to not be scalable and certainly not manageable within a team.
Also, all of us tried using the cp beta without removing the Copy Pod Resources build phase. This means that I won't be accepting Todd Anderson's answer either.
We are not using static libraries either, we are using frameworks (aka use frameworks! inside the Podfile).
Thanks to all for contributing to this question. Looks like we all got put into the same boat by Xcode 7!
Cheers!

In my case clearing the "Installation Directory" build setting in all static libraries fixed the issue. It was set to "/usr/local/lib" before.
When using "Save Built Product" as export method the Products folder got these sub directories. That's what pointed me in this direction.
I'm using cocoapods 0.38.2.

The other answers mentioned here were temporary fixes, but each required manual effort, either after every archive or after every pod install.
The new, better solution, is to update cocoapods to the latest version and remove your 'Copy Pod Resources' build phase from each app extension.
See https://github.com/CocoaPods/CocoaPods/issues/4021 for more information.

I had a similar issue with XCode7.1.1 and an app project with WatchKit Extension.
I fixed the issue by the following step
Open Build Settings of my app target and set NO to "Skip Install".
Open Build Settings of my WatchKit Extension target and set YES to "Skip
Install"
Open Build Settings of my WatchKit App target and set YES to "Skip
Install"
Then I could make iOS archive.

Related

TwitterKit 3.0.4 - ITMS-90535: Unexpected CFBundleExecutable Key [duplicate]

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

Unable to upload build in iTunes when using Google Plus through Pods [duplicate]

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

Unexpected CFBundleExecutable key

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

dyld: Library not loaded: #rpath/libswiftCore.dylib / Image not found

I am running my app from xcode to my iOS device and I get this and black screen on iOS device.
Console text:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/10DB2FE8-EF09-4857-B4AC-0DB2E4419D6F/App-Name.app/App-Name
Reason: image not found
(lldb)
Try adding the following line to Runpath Search Paths of your target.
#executable_path/Frameworks
your_target -> Build Settings -> Linking -> Runpath Search Paths
I had this same issue. I ended up adding the framework in the following locations:
General > Embedded Binaries
General > Linked Frameworks and Libraries
Build Phases > Link Binaries with Libraries
The embedded binaries seemed to be the key for me.
For me helps adding #executable_path/Frameworks to the project Runpath Search Paths, not target.
your_project -> Build Settings -> Linking -> Runpath Search Paths
None of the other solutions helped me, but everything was fixed by deleting Xcode's Derived Data directory.
Oh yes. I've faced with that problem spending hours on solution.
You may try to set "Always Embed Swift Standard Libraries" to "Yes" under your Build Settings > Build Options
(don't forget to shift+cmd+K your project after)
I had to switch 'Embedded Content Contains Swift Code' to 'Yes' to get my Obj-C app to work after updating the Obj-C embedded framework with a Swift object.
In the Framework Target (not the app target), go to Build Settings > Build Options > Always Embed Standard Swift Libraries to YES.
This solved the issue for me!
I had this error in a command line project (Xcode 10.2 and macOS 10.14.3)
The solution was to update to macOS 10.14.4
Swift command line projects won’t run on macOS 10.14.3 and earlier unless you install the Swift 5 Runtime Support for Command Line Tools package. Without that package, Swift command line projects crash on launch with “dyld: Library not loaded” errors. (46824656)
From Swift 5 Release Notes for Xcode 10.2
In my case, This issue is coming in Objective-c project in which I am using a Swift framework (AirWatch SDK).
Solutions:
I have resolved this issue with Xcode 9.3 and 11.0.1 iOS as mentioned bellow steps :
Drag and drop your swift framework in your project and move in default Framework folder of your project.
Then add them as Embedded binaries as shown in screenshot.
Change your framework status from Required to Optional as shown in screenshot. (Build Phases > Link Binary with Library)
Set Always Embed Swift Standard Libraries to Yes in your build settings.
Set Subpath and select destination as Framework for your added framework in Build Phases> Embed frameworks
as shown in screenshot.
Hope it will help someone.
I have faced the same issue, setting the right code sign identity solved the problem(Build settings->Code Signing Identity).
As per Apple technical questions "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run"
I fixed by deleting all from Xcode Derived Data directory:
~/Library/Developer/Xcode/DerivedData
Good luck all!
This error message can also occur when using a framework build in a different Swift version then the one currently being used, e.g. if you upgrade Xcode.
I had the same error message, that is how I solved it :
The issue came from the certificates generated automatically by Xcode. I had to revoke these certificates dans generate them back from developer.apple.com
The solution is then :
- Go to developer.apple.com / certificates --> Revoke certificates
OR go in Xcode > preferences > accounts > View details > select Sigining identities > clic setting whell > revoke
- Got to developper.apple.com and follow instructions to generate new certificates
- In Xcode in my project : go to Code Signing Identity and sign both Debug lines with the generated certificate
- Both release lines are set to "iOS Developer"
- Then project > clean
- Build and run on device
#Saikiran's answered worked.
My certificates were generated before iOS 8 was released. I revoked all my certificates and regenerated all provisioning profiles and it solved my problems immediately.
I don't have enough reputation to vote up #Saikiran's answer, but that definitely helped solving the problem.
For me has worked set the option
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
to YES in Project -> Build Settings -> Build Options
(Namirial framework through Cocoapods)
None of the above solutions worked for me. I changed the iPhone Developer Certificate trust settings in Keychain. It should be Always Trust. Change it to Use System Defaults. Double click the certificate in Keychain to open the option screen
Discovered that from this blog
I had the same error message, this is how I solved it :
This is happening because i changed bundle identifier, so i just put old bundle id and it started to work again
I already had the Runpath Search Paths set correctly, but it still didn't work. #Justin Domnitz's answer put me on the right track: Setting "Always Embed Swift Standard Libraries" to Yes in my target's build settings did the trick for me.
Seems this issue was caused by the inclusion of Swift file into objective-c custom framework. Also unsure if related but my app target was built in objective-c as well. Also building to simulator in debug. Haven't verified for release or archive build yet.
Additionally Runpath Search Settings for the project target were set to "#executable_path/Frameworks", within the target settings for the framework they were set to: "#executable_path/Frameworks" and "#loader_path/Frameworks".
After having tried rebuilding custom framework and reattaching to app target, clearing derived data folder and a couple other suggestions, what ultimately worked for me was changing the build setting within Project target for the custom framework project (not app target): "Always Embed Swift Standard Libraries" to "YES". It appeared not to matter what the setting for the app target was set to. I verified this by resetting the simulator and rebuilding. This is similar to Daniele Ceglia's answer but I wasn't able to add a comment and wanted to provide more clarity.
For me Cleaning the project solve the issue!
I got such issue, too
All other ways could not help me,
so I have done it on stupid way
created new project and pod install from scratch
and after confirmed it is working correctly, I copied all class files and storyboard files, at last done!
I think it is the last way for it, maybe could help you
I had a similar problem in an Objective-C project where I started to include Swift files.
In my case, I created two targets in the main project, and I added a Swift empty file, that creates a bridging header file and some configurations, but I only marked it as a member of one target. The first target works properly, but the second not, and I noticed that the differences in build settings were this setting:
Runpath Search Paths -> $(inherited) and #executable_path/Frameworks
And I also needed to reference Objective-C Bridging Header to the file that was created before:
Objective-C Bridging Header -> pathTo/Target-Bridging-Header.h
After adding this two settings, the second target started to work properly.
Try cleaning the build folder, I was having the same problem and I solved it this way:
Product -> Clean Build Folder
For Me restart simulator solved this problem.
I tried a bunch of the cases above and it didn't seem to solve my issue. I use git and cocoapods for a project, and the error went away as soon as I made a new commit.
I had this problem before in iPod touch iOS 9.3. And I used all the methods mentioned in this post, but none of them worked.
I checked my project setting. And in the other link flag, I found I added -Wl,-sectcreate,__RESTRICT,__restrict,/dev/null.
This flag prevents dyld insert in the jailbroken phone. When I delete this flag, the app can be launched again. I am not sure why it worked. Because in iPhone se iOS 10 I don't have to delete this line. But it did work in iPod touch iOS 9.3. So check it if you have the same situation like me.
Please check the *.framework If there is a _CodeSignature signature framework directory.
If there is no _CodeSignature folder,
Navigate to the Build Phases ,click + to add New Copy File Phase to create Copy Files.
after that, reference *.framework and choose Code Sign On Copy

Appstore FailureNo architectures in the binary. Lipo failed to detect any architectures in the bundle executable.” At SoftwareAssets/SoftwareAsset

Hi I just tried to upload my app to the app store but it failed with error.
**
No architectures in the binary. Lipo failed to detect any
architectures in the bundle executable.
**
That can also happen when the Cocoapods cache is not in sync, then just
pod install
solves the issue.
Hi I'm glad i found the Answer. The problem was actually with my 'Productname' in info.plist . It was different in my first version.
Same thing. Had this issue. I just changed
Project -> Build Settings -> Produc Name (wrote: "Wundmanager")
then
Project -> General -> Identity -> Bundle Identifier (wrote "imeksbank.Wundmanager")
my nick is imeksbank
and then
iTunes Connect and the same to Bundle-ID (chnaged "imeksbank.Wundmanager")
After that it worked for me. I am also new and today is my first day i can Upload my first App.
xcode 5.1.1
ios 7.1
Can also be caused by embedding a static framework (mistaking it for a dynamic one) in your app. Easily done if you build in different phases and/or allow xcode to "build implicit dependencies".
After a long struggle with an error message like this, I finally understood that mistakenly an iOS framework had been copied into the IPA. This was added automatically following the usual steps to add a framework to an iOS project.
So the solution would be to remove "Embed Frameworks" phase from "Build Phases".
I was able to get past this error by restarting Xcode.
Sometimes cleaning your project quitting and re archiving will solve the issue. In my case it worked. I don't have any issues with the bundle name, identifier or plist.

Resources