My Xcode project builds and runs on a device but it does not build against the simulator. I am using a custom Framework in my project. This post seems to indicate that when you build a Framework to be included in another project you can only build it for the simulator or a device, but not both. Is this the case?
I am using Xcode 6.3.1
You're correct that you can only build for one platform at a time, but the answer in your link explains how to use a script to build a binary that contains the framework for both platforms.
Related
I have manually added Kingfisher in my iOS project. Project runs on my iPhone device. But when I try to make a archived build, it give too much errors. I am using MacBook Air Silicon series.
Reproduce
Add Kingfisher manually in a project.
Try to Archive the project
This is where I added Kingfisher
Errors I am receiving.
Please check if there is any inconsistency in your ios Deployment target. If you sub project (here kingfisher) deployment target is higher than your main project it may build for your device but not archieve. As when it is archieving it is building for all devices.
Added Kingfisher again using Swift Package Manager and it started working perfectly.
For a detailed conversation with the maintainer, check the issue below
https://github.com/onevcat/Kingfisher/issues/1727
I am trying to use a library (framework) into our iOS project (https://github.com/auth0/JWTDecode.swift). It provides a cocoapod interface to add/use the framework. But unfortunately in my project, we are not incorporated cocoapods and at this point it is not possible to integrate the cocoapods into our iOS project. So I down loaded the source code of the framework from git hub and build the framework. So I got the .framework file and that we added into our project. This framework is working fine in simulator and when try to build the ipa (archive) it fails and saying that
Use of unresolved identifier 'decode'.
The method 'decode' is one of the member of JWTDecode. Can someone help me to build the framework that works for both simulator and devices. I am not familiar with building frameworks in iOS.
I am using the JWTDecode framework for decoding the a JWT token.
The issue was due to the framework I built was only supporting for Simulator. I resolved the issue by building the framework for both device and simulator. The below post helped me on this.
https://medium.com/swiftindia/build-a-custom-universal-framework-on-ios-swift-549c084de7c8
Recently, I observed section named Text-based API in Xcode build settings. In Xcode 7.X it's under Linking section. But now with Xcode 8.X, it's separated out as another section in Xcode build settings. I'm interested to know what exactly it will do?
Image for reference:
From Xcode 8.0 and above version, Text-based API is in Build setting as it have different business logic
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).
I have an iOS app and I want to test it on simulator. When I run the project xcode complains that my framework file is "missing required architecture i386 in file".
I did a bit of search on line and it says that's because xcode used the framework files intended for actual device when building the project for simulator. Solution is to add the simulator framework folder under the framework search path in build settings.
Okay now the problem is, doing that solves the problem of building project on simulator, but later when I want to build the project on an actual device, xcode starts complaining again saying there are redefinitions of some of the openGL typedef in the framework. To fix this I have to remove the search path item that I added.
So is there an easy way to avoid having this kind of problem? I don't want to switch the search path over and over again when I want to build the project on different platform.
If you upgrade a project from 4.2 to 4.3.2 style it often loses the architectures required for the target you are building for. Usually you just have to add them back or change the target SDK.