- Create a
Cartfile
with needed dependencies - Create a
Cartfile.private
with internal/test dependencies carthage update - Launch Xcode and create a new workspace: File → New → Workspace
- Create a Library project: File → New → Project → Cocoa Touch Framework Be sure to add it to the recently created Workspace and group to the Workspace
- Create an App project: File → New → Project → Single View App
- Add it to the recently created Workspace and group to the Workspace
- Enable your library project to provide a shared schema: (Target selector) → Manage Schemas…
- Link the Library project to the App project: (Select App project → Target) → General → Linked Frameworks and Libraries
- Set the Framework Search Path for both projects to contain:
$(SRCROOT)/../Carthage/Build/iOS
(non-recursive)
- Add the dependencies fetched by Carthage to the build targets:
- Select the Library's test target → Build Phases → Link Binary With Libraries → (add frameworks from
Carthage/Build/iOS/
) - Add a Copy Files Phase to copy the added Frameworks to "Frameworks"
- Select the Library's test target → Build Phases → Link Binary With Libraries → (add frameworks from
Created
August 13, 2018 13:13
-
-
Save ccarrasc/05112e1f458d4de2143c262ede490c08 to your computer and use it in GitHub Desktop.
Scaffold and iOS lib project using Carthage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment