Build Swift Package Library and an iOS project at the same time - ios

I want to create an iOS project and Swift Library in the same workspace. Everything is working fine, the only problem is that I have to build the library first if I want to add something new.
Is there a way to build both at the same time or in order with a single button?

Related

KMM import common library have no color syntax

Hi i am creating a new project using Kotlin Multi Platform project.
A followed all the instruction from the official documentation : https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html
The only change I made, is that i converted the Swift UI project to Swift directly in the XCode project.
The project compile successfully and launch but my problem is that the color syntax is not recognised.
Xcode Screen shot
It is recognised as Plain Text as shown below.
Xcode Screen shot after modifying the color of Plain Text
This issue seems to be even for Samples from Kotlin Officals https://kotlinlang.org/docs/multiplatform-mobile-samples.html
. And appear for Swift/Swift UI project and it is not blocking the compilation of the application and everything appart off that seems to work fine, but it make the file not as readable as it should be for me.
I tried to :
Delete Derived data and everything if the XCode folder
Delete and install XCode
Install XCode Beta
Create a new KMM Project in Swift
Create a new KMM project in Swift UI
Try on sample that already work without any modification
Nothings have made the color syntax of KMM library recognised.
I finally found a solution :
I added to the Build Phase of the target in the compile sources the header file listing my module.
So for example i did a cmd+click on my Greeting Class, Show definition, then right click, Navigate, show in finder, and finally drag it to the compile sources, restart Xcode
Magic should happen and color syntax has been added.
PS : Added it as reference so when you build again the module it will keep track of changes

Adding an Objective-C framework to a Swift XCode project

I know this is a very simple - maybe obvious - question, but I've been struggling with it for a while. I'm working on a SpriteKit project in XCode (using Swift) and I'm trying to add this SKEasing Framework from GitHub.
I've already downloaded and extracted the zip file, and I did everything that 孙博弘 answered including the bridging header (which I made the with the help of this site);
However, the framework doesn't seem to be working. I can't use any of the actions provided by this library. Is there something I'm missing? What am I doing wrong?
You don't add the project to your project.
First open the SKEasing project in xcode by itself. Set the build target to generic iOS device. (With the pop up in the top left corner of the xocde project window.) Then use the Build command (under Product) and when that's done run Archive. There should be a library built now under the products folder (left side of project window). Control click on the library name and select Show in Finder. This will lead you to the library. Copy this file to your project and you should be good to go.
if you use .a, you should use it as follow img.

Convert existing Xcode project to Framework

I want to convert an entire (huge) Xcode app project to a Framework - so that other apps would be able to use different part of the project. Would be easier than start dissembling the project (at the moment at least).
How can I do that?

How to create a Xcode 6 workspace that includes 2 iOS Projects and an iOS Dynamic Framework project?

I'm trying to create one Xcode workspace that includes 3 projects:
- 2 different iOS apps
- One dynamic framework project
The two iOS apps should use the framework.
Sounds very easy and reasonable thing to do, but I just can't seem to make it to work.
When I add the framework to the iOS app target as linked library, the build process works but when running I get an exception that the framework could not be found.
If I go to the Embed Binaries -> click add -> choose the framework from the framework project, nothing happens (the embed binaries section stays empty.
I tried to do first add the framework as linked library, then add it to the embed binaries. Now compilation doesn't work (can't find the framework).
What am I missing? Every single example in the documentation shows how to add a framework as a new target under the same project. But that's doesn't help. I want the framework to be a separate project that a team can work on separately.
Open Xcode, so you can see Xcode in the menu bar.
Then go File>New>Workspace.
I believe you just drag and drop other projects into the workspace.
I've never really used a workspace, although I have made one before.

Using two Xcode projects with one target

I have one app I am trying to build called "App". I have an Xcode project called App.xcodeproj that lives in a Xcode workspace called App.xcworkspace. That is all working.
This is what I want:
A second Xcode project (AppCore.xcodeproj) that I can separately build on iOS or Mac. However there is no need to actually run the project (app). It will be the data layer of my app.
I then need to be able to access the files inside AppCore.xcodeproj from App.xcodeproj.
Update:
In this project, I will be using CloudKit. The Core project is the only thing interacting with CloudKit, however the actually target (app) using CloudKit is the "main" project.
How can I accomplish this?
Here is the tutorial GIF:
Remarks:
You can add existing project as well, just drag it into you xCode project.

Resources