Debugging Xcode project with framework - ios

currently we've build an app including a pairing library.
this works perfect when we use the simulator or connect an iphone/ipad to test the app.
at the moment we're ready to upload it to the appstore and there's suddenly an error:
this is the message:

You should add a run script phase that removes the x86_64 architecture from your library (after all, it is only there for simulator runs and isn't needed for AppStore distribution). Use the solution described here: http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

Related

Xcode12 beta4: building for iOS Simulator, but linking in object file built for free standing

In Xcode12 beta4 or beta5, I encounter a failure in my project.
I can run the Project on my device, but it is not running in the simulator.
I get the failure message:
ld: in /libwebrtc.a(dequantizemmx.o), building for iOS Simulator, but linking in object file built for free standing, file 'libwebrtc.a' for architecture x8664.
So does anyone know what settings should be adjusted in Xcode 12.4?
Response from Apple on similar issue.
You’ll need a few changes to support the new Xcode.
Package your framework using XCFrameworks.
Don’t install your SDK into the iOS SDK. Your users should drag drop the XCFramework into their project.

Properly archive iOS app with extensions

I've just added a new RichNotification Extension to my project.
Now I've got "myApp" target and two targets for: "RichNotification" and "RichNotificationContent"
When I archive the main target for the App Store works fine but I get this error while trying to upload to the App Store:
ERROR ITMS-90700: "Incorrect Platform. You included the iOS arm64
executable
“myAPP.app/PlugIns/myAPPRichNotifications.appex/myAPPRichNotifications”
in your iOS bundle. Only iOS executables can be included."
Is there any special procedure to archive an app with multiple extensions / targets? Special build config?
Couldn't really find any information, I'm probably searching with the wrong terms.
I had the same problem. I just use pod update, rebuild project on another mac, and reupload build to AppStore and issue gone
We had this error when using Transporter to upload the application from a non-developer computer. The solution was installing Xcode on that Mac. After that the upload process went through without issues.
Thanks to #Mikhailo Karpenko
I solved the issue by re-installing pods
And I had to remove the setting 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' from the project settings as this is set by pod iteself
I had a similar issue where uploading an app produced the same ITMS-90700 error but it was related to a watch app executable. In the end it turned out that I had an old watchOS target in the build settings which was causing the error.
Not completely related to this question, but this is the only question I found on SO that referenced error ITMS-90700. Hopefully it helps someone.
I solved this issue by making sure all of the build targets in my project were built for the same iOS Deployment Target.
We added an extension in our app and it defaulted this value to iOS 12 whereas the rest of our app was configured for iOS 10. Regardless of the valid architectures field in the build settings, the extension was only being built with 64-bit support, but the rest was being built with both 32-bit and 64-bit.
After making this change, I ran lipo -archs on the extension to validate that it was built for both arm64 and armv7.

Why this alert? "App installation failed, This application does not support this device’s CPU type" [duplicate]

When trying to build and install an application on an iPod running iOS 4.2.1, I'm seeing the error
This application does not support this device's CPU type
I'm trying to build the application using xcode 4.3, as well as xcode 4.4, and still seeing this. What can cause this and how can I fix it?
I have encountered such a problem today on iOS 11.2.1 with iPhone 7 devices.
The reason is that the previous project set up a 32-bit architecture that is no longer supported.
And I solved the problem as follows:
Project -> Build Settings -> Architectures value should be set Standard architectures - $(ARCHS_STANDARD)
From the project build settings -> Architectures, make sure you have both armv6 and armv7 values.
Also, you can check your Info.plist file, under Required device capabilities. If there's armv7 there, remove it.
If you are getting this error building Unity 3D application, change scripting backend to IL2CPP, and select "Universal" architecture.
This post led me to my answer. Thanks #adig and #masam
I have an iOS 8.4 enterprise signed app that would only work on certain device types when I tried to install it from our internal app store, and it was inconsistent. I wasn't getting any helpful error messages, even from the device console, until I tried to deploy it using the XCode Devices to a 5th gen iPod. It said "This application does not support this device type" which led me to here. I was debugging on a 6th gen iPod/iPhone 6.
I was archiving from a different scheme than I usually release from and I was only building the current architecture which meant that it would only work on a certain type of device depending on what was plugged in when I archived.
So make sure that "build active architecture only" is NO when you are archiving an app to sign as an Enterprise app.

Unable to download application in device with ios 11

I have build my application two years ago but not submitted on App Store. Now I want to submit the app on App store. But when I try to install app using Xcode or through diawi link of its Ad hoc build, app is not installing on device.
When I try to install app through Xcode, sometimes it shows
this application does not support this device's cpu type
and sometimes
Could not write to the device
and when I try to install app through diawi link of its Ad hoc build, it shows
Unable to download application, <app-name> could not be installed at this time
This issue is only occurring in device with ios 11. I have checked my certificates as well as UDID of device in which i am trying to install. Also I have set Architectures of Build Setting of Xcode to Standard architectures (arm7, arm64) - $(ARCHS_STANDARD). It is completely working fine in device with iOS version below 11.
Finally I have find the solution of my issue. In my case I have to remove some old libraries which is not supporting in ios 11 and have to change some deprecated code.
If your code is deprecated or some libraries are stop working then Xcode will show you only error of
this application does not support this device's cpu type
or
Could not write to the device
So you have to check that which library is deprecated after launching of ios 11.
Also you have to check all other details like Build Active Architectures Only, Architectures, Valid Architectures, Required device capabilities from Info.plist.

App builds for Simulator, but not for 'Generic iOS Device'

I am experimenting with pulling data from the internet for my app, and everything works as it should when the app is run in the iOS Simulator or on my own device.
The frameworks I'm using are Alamofire, SwiftyJSON and GzipSwift; I cloned the Github repo of the Gzip framework, build it myself, dragged the .framework into my project navigator and linked it up (added the framework to Link Binary with Libraries under Build Phases).
Now, when I build the code for any specific device, it compiles and runs just fine, but when I select 'Generic iOS Device' as the target, the build process fails and tells me that it couldn't find the methods I used from the Gzip framework.
I am quite certain I missed some setting or didn't import the framework correctly, but I have no clue on how to fix this.
Any ideas?
I guess you build the framework only with the simulator architecture instead of building it for all architectures (arm64).

Resources