Packaging error when switching to arm64 (arm5 was OK) - ios8

I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?

Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.

I just restarted Xcode then the error was disappeared

I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.

I removed an external library and related code I had and it's now working.

I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully

Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.

The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.

I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.

Restarted XCode and enabled and disabled to Automatically manage signing

Related

XCODE: The request was denied... (SBMainWorkspace) for reason: Unspecified

I updated xcode to 10.1 this morning and since then none of my code runs. I am getting the message above (question) which I have researched exhaustively. I have read all the other posts concerning this issue and nothing I have tried seems to work in my situation. The one difference in my message is the reference to "unspecified". I have done the following:
New Provisioning Profile
Automatically managing sign-in
Deleting certain keychain certificates
Project Settings to Legacy
Rebooting/Cleaning
Rebooting Simulator
Mach-O Types to Bundle
Managing/Editing Schemes
Creating new user account on Mac.
New teams/No teams
etc.
(you get the picture!)
I am at my wits end. I have been working on this code for a while and short of wiping my machine and re-installing is there anything else that I can do! I am about to explode!!!
I rebooted the machine and I went back to the Build Settings and changed to Mach-O Type back to Executable and it working ow. Based on all of the previous solutions I have read/tried, this seems about right (unpredictable).

Failed to verify bitcode in Mapbox.framework

I have implement mapbox in the project , its ok work in simulator and device but when i am going to create build the issues has come . the issues attach here with screenshoot.
If I remember correctly, you will have to select your projects target, go from the General tab to the Build Settings tab, search for Enable Bitcode and set it to No. Of course, remember to do a new Archive before uploading it again.
I had many many issues with Mapbox and zero support from their team. I also had a bunch of error messages when uploading. One work around was using Carthage and manually adding in the frameworks instead of using Cocoapods. I hope this helps.
Good luck!

Running unit tests in Xcode 8 causes error "could not load inserted library '.../IDEBundleInjection' because image not found"

I am suddenly running into the error when testing my iOS 10 app in Xcode 8.
dyld: could not load inserted library
'__PLATFORMS__/iPhoneOS.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection'
because image not found
The app's tests ran successfully before. I had then deleted the skeleton UI Test Case class that was created together with the project, so this may have caused the problem (somehow). I have since recreated that class, but the problem remains.
What exactly does the error message indicate and how can I overcome the problem, i.e. successfully run the app's unit tests again.
UPDATE There must be another root case, for if I create another (empty) Single View Application project in Xcode and run its unit tests, the same error occurs.
The error only occurs when running unit tests on a device, not on simulators.
UPDATE This response from Apple to a similar report suggests the error is related to code signing. The app itself runs fine on the same device, so how could there be a code signing issue in my case?
Try these one by one:
Try to create a new UnitTest target, copying everything over, and removing the old one.
In General Tab Panel, do not leave the Team to "None". Select your team. And select the correct Code Signing Identity from Settings. It was set to a non default - changed to 'IOS Developer' for the Debug setting entry.
Disable "Enable guard Malloc" from diagnostics to run app in device.
This may be because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing. To fix:
(A) move all folders from "/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "10.0 (12A4297e)" to safe place
(B) reboot the phone
(C) connect your phone to xCode 8
(D) restore folders in DeviceSupport
This is the only thing that helped me. Even re-flashing on ios10 does not helps.
This is old, but it may help you: In the target's General tab, there is an Embedded Binaries field. When you add the framework there the crash is resolved.
Reference is https://devforums.apple.com/message/991384#991384 on Apple Developer Forums.
Best of luck!
There is a restart mechanism in Xcode testing infrastructure that detects crashes during tests and attempts to restart testing to complete any remaining tests. There may be an issue with how that mechanism is setting up DYLD_INSERT_LIBRARIES following a crash in your tests - please file a report at https://bugreport.apple.com and attach your project if possible.

Xcode 5 cannot run using selected device on iOS simulator

So this seems to be quite a common question but all the answers I found were related to getting "xcode cannot run using selected device" when trying to run it on a connected device. My issue is getting this error just trying to run it in the iOS simulator.
Some background is that app was running in simulator fine, and then I changed the Project Name, the Target name and the Scheme name and that is when the problems started to occur.
I tried many of the different solutions in some of the other threads such as: Clean, Delete Derived Data, restart Xcode, restart computer, make sure using Default LLVM, remove Info.plist then re-add it into project again. None of them worked.
I finally discovered the problem and was able to get it working and will post my solution below.
What I discovered to be the problem, was that in the Info.plist file the Executable File (CFBundleExecutable) was hard coded as "MyAppName". When I changed the Project name and Target name and Scheme name, this hardcoded value was not changed, but still had the original app name in it.
So I changed Executable File (CFBundleExecutable) in the Info.plist file to be this constant:
${EXECUTABLE_NAME}
And the problem was solved :)
EDIT:
I had the problem occur again on a different project, however the above was already set to ${EXECUTABLE_NAME}.
So I went searching and found that under Build Settings > Build Options > Compiler for C/C++/Objective-C was set to UNSUPPORTED.
I changed this setting to DEFAULT and the problem was solved :)
EDIT:
I had the problem occur again and the above two things did not fix it.
So I went and made sure that the info.plist was removed (unticked) from any Target Membership, and this solved the problem. It seems that there are multiple things that will cause this issue, so try all the solutions!
I ran into this and had to change the deployment target (iOS version) in the general tab of the project options menu. Apparently xcode had been updated to support iOS 8.2, but my simulator had not, therefore nothing appropriate was showing up in the list of simulator targets. Changing the deployment target to 8.1 fixed the issue. I'm sure that keeping my Mac up to date would also help.

Failed to submit app to iTunes Store

I am having some problems when trying to submit my iPhone app to store using Xcode 5 that my app is always failed validation with below errors:
Apple's web service operation was not successful
Unable to authenticate the package: [My app id, ex: 123456789].itmsp
ERROR ITEMS-9000: "The bundle [Bundle ID, ex: com.myapp.mobile] at bundle path 'Payload/[My App Name].app' is not signed using an Apple submission certificate." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
I am quite sure about settings (bundle id, certificate, profile, entitlement) because this is not first time I submit app to store, jut don't know why these issues come up, I have tried to search and found some related article but they don't help.
I have this issue for 1 week.
I just selected Standard Architectures in both Project and Target, and it worked for me.
I had the exact the same error, after hours of trying, adjusting all the parameters like the bundle ID or display name, etc. None of them worked.
Finally I got it work. Here is what I did.
I started all over by deleting all the records in keychain, certificates and provision profiles. And just added one certificate and profile for app distribution. There was only one record to make no confusion. And then boom, it uploaded successfully.
I guess my mistake was to submit multiple times of certificates or provision profiles earlier (although I deleted multiple entries but I did see something strange) because I thought the creation process was stuck so I refreshed the browser. Being patient in each steps will eventually saves more time! :) Good luck!
I got the same error today with xCode 7. I resubmitted with no changes and it went through. Probably Apple bug. I am letting you know that sometimes it is not an issue with our project/target settings.
As far as I can tell, this specific error is intermittent and not caused by anything in the app package. I think many of the answers here are people that saw this error, changed something, and saw the error go away, and assumed that their change made it go away.
I would suggest, if you get this error, just try again (worked for me). If it fails in this exact way a second time, and you have some theory about what will fix it, do that and try again. If that works, undo your fix and see if the failure comes back. In this way you will have proven that there was an identified root cause and a fix.
I don't know the cause, but I had the same exact issue crop up this week and just got things to work. I had checked the build, distribution certificate, provisioning profile. I went through all of the troubleshooting steps in Technical Note TN2250 -- no luck! However, I just got it to upload successfully. I happened to have an old Mac Mini that had Application Loader 2.5.1 on it. I created a zip file from the .app within the Payload folder of the .ipa, put this on a USB drive, and watched as it finally uploaded after trying about 50 times with both Xcode organizer and Application Loader v2.9.
Other people have reccomended reverting to a previous Application Loader version. Perhaps the web service endpoint uses a different (and properly working) certificate validation method for older AL versions.
I too have had the same problem and after many hours I managed to solve.
I finally fixed the problem. You needed to download the "Apple Root Certificate Authority" (http://www.apple.com/certificateauthority/) and put it in your login keychain & system, I also put your iPhone disitrbution certified in your system and set all keychian trust values ​​for all certificates to "system default". Finally went through!
For me the problem was in selecting the wrong iOS distribution code signing identity, where I was using a different team as the provisioning profile.
Probably make sure your Code Signing Identity is set to automatic, which will probably fix this issue.
In XCode 6.3, You have connect actual device and selected in the XCode.
I didn't see this listed on here, but I received this issue and realized that I already had a build for this specific Version # waiting for review on iTunes Connect. I rejected the build in ITC and then tried uploading the build again and it uploaded correctly after that. Just in case this could possibly help anyone else out there with this issue!

Resources