Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage code samples for iOS and macOS #428

Merged
merged 6 commits into from
Mar 21, 2019

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Mar 19, 2019

This adds Xcode projects and code samples using Carthage packages of Themis.

Directory structure

Since we already have CocoaPods examples, new ones made the directory structure a bit messy. I have moved the code around so that it's a bit easier to navigate:

docs
└── examples
    ├── objc
    │   ├── iOS-CocoaPods   (moved)
    │   ├── iOS-Carthage    (new)
    │   └── macOS-Carthage  (new)
    └── swift
        ├── iOS-CocoaPods   (moved)
        ├── iOS-Carthage    (new)
        └── macOS-Carthage  (new)

All samples use the same code, just copy-pasted around.

How to use

In order to initialize Carthage project one must run

carthage bootstrap

in the project directory to pull the dependencies.

We pin Themis version to the current master (a415c1d).

Caveats

There is one caveat with new Objective-C samples: they import Themis as

#import <themis/themis.h>

while CocoaPods samples use the following form:

#import <objcthemis/objcthemis.h>

CocoaPods use some wild magic for that imports to be possible while Carthage projects use the resulting framework name. I have not found an easy way around that so it seems we'll have to live with this discrepancy.

@ilammy ilammy added O-iOS 📱 Operating system: iOS O-macOS 💻 Operating system: macOS labels Mar 19, 2019
@ilammy
Copy link
Collaborator Author

ilammy commented Mar 19, 2019

@vixentael, could you please check that these examples can be run on a machine different than mine (and on a real iOS device as well)? Thanks in advance. I'm not sure that Xcode does all the necessary magic out of the box (e.g., bitcode stuff, etc.)

@vixentael
Copy link
Contributor

confirm, works good on iOS and macOS

@ilammy ilammy merged commit ef59225 into cossacklabs:master Mar 21, 2019
@ilammy ilammy deleted the carthage-examples branch March 28, 2019 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-iOS 📱 Operating system: iOS O-macOS 💻 Operating system: macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants