• This repository has been archived on 14/Jun/2019
  • Stars
    star
    1,033
  • Rank 42,810 (Top 0.9 %)
  • Language
    Scala
  • License
    Other
  • Created about 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Open Source Obj-C to Swift Converter.

Announcement

This project is no longer maintained. Further issue reports and/or pull requests will not be attended. We thank you for all your contributions and we hope this project has had a positive impact on your iOS development.


objc2swift

demo.gif

Project Goal

We created objc2swift for our own good, to reduce the redundant task when rewriting Obj-C code to Swift.

Generally, rewriting process consists of two phases: first simply replacing the syntax from Obj-C to Swift, then adopting new features that are introduced to Swift.

objc2swift is aimed at reducing the first half of the process, so that we can focus more on the creative / intellectual work.

Please do not expect complete conversion.

Features

  • Merges @interface and @implementation and create a single Swift class.
  • Converts properties, including those that have it's own getter/setter in the implementation.
  • Converts message-send to method-call.
  • Converts init-process such as [[MyThing alloc] initWithThing:...] into MyThing(thing: ...).
  • Converts corresponding types and functions: NSInteger -> Int, NSLog -> print
  • ...and more!

Quick Start

CLI

Build jar:

$ git clone https://github.com/yahoojapan/objc2swift.git
$ cd objc2swift
$ ./gradlew jar

Create an alias, and pass the Obj-C source files you want to convert.

$ alias objc2swift='java -jar /path/to/objc2swift/build/libs/objc2swift-1.0.jar'
$ objc2swift src/test/resources/sample.*

WEB-UI

Install typesafe-activator, and run.

$ brew install typesafe-activator
$ cd web/
$ activator run

Access localhost:9000, and there you are!

Developer's Guide

objc2swift is made with ANTLR. More detail coming soon.

LICENSE

This software is released under the MIT License, see LICENSE.txt.

More Repositories

1

NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
C++
1,162
star
2

SwiftyXMLParser

Simple XML Parser implemented in Swift
Swift
561
star
3

JGLUE

JGLUE: Japanese General Language Understanding Evaluation
Python
273
star
4

UICollectionViewSplitLayout

UICollectionViewSplitLayout makes collection view more responsive.
Swift
241
star
5

AnnexML

AnnexML is a multi-label classifier designed for extremely large label space.
C++
104
star
6

yskip

Incremental Skip-gram Model with Negative Sampling
Shell
67
star
7

XCMetricsAggregator

Automation tool for Xcode Metrics Organizer with AppleScript
Ruby
62
star
8

YJCaptions

60
star
9

bakusoku-jsonp

Codeless Blog Widgets framework
JavaScript
60
star
10

yosegi

Yosegi is a Schema-less columnar storage format. Provide flexible representation like JSON and efficient reading similar to other columnar storage formats.
Java
58
star
11

AppFeedback-ios

📸 You can post feedback messages and screenshots to Slack from your iOS app! 🎥
Objective-C
42
star
12

ngtd

Serving NGT over HTTP or gRPC ※This project is not maintained. We have moved to a new product, [Vald](https://vald.vdaas.org) .
Go
38
star
13

k2hash

K2HASH - NoSQL Key Value Store(KVS) library
C++
36
star
14

authorization-proxy

Moved to https://github.com/AthenZ/authorization-proxy
Go
36
star
15

presto_exporter

Go
34
star
16

k2hftfuse

File transaction by FUSE-based file system
C++
32
star
17

gongt

NGT Go client library
Go
30
star
18

fullock

Fast User Level LOCK library
C++
26
star
19

jenkins-with-docker-demo

Shell
25
star
20

yjlogin-ios-sdk

Yahoo! JAPAN Login iOS SDK
Swift
25
star
21

gpu-monitoring-exporter

Prometheus exporter for GPU process metrics.
Shell
25
star
22

ja-vg-vqa

22
star
23

yconnect-php-sdk

YConnect PHP SDK
PHP
21
star
24

AppFeedback-android

📸 You can post feedback messages and screenshots to Slack from your Android app! 🎥
Java
20
star
25

presto-audit

THIS REPOSITORY IS DEPRECATED
Java
19
star
26

vespa-tutorial

Japanese tutorial for Vespa
Shell
19
star
27

garm

Garm is k8s authorization webhook (SubjectAccessReview API) server for Athenz. Moved to https://github.com/AthenZ/garm
Go
17
star
28

chmpx

Consistent Hashing Mq inProcess data eXchange
C++
17
star
29

docker-continuous-integration-workflow

2014/02/12 Docker Meetup in Tokyo #1 での発表内容です。
Ruby
17
star
30

MultitaskingSample

iOS 7の新機能、BackgroundFetch, SilentPushNotification, BackgroundTransferを利用したサンプルコードです。
Objective-C
16
star
31

lcom4go

Compute LCOM4, Lack of Cohesion of Methods metrics ver.4, for golang projects.
Go
15
star
32

athenz-client-sidecar

Moved to https://github.com/AthenZ/athenz-client-sidecar
Go
15
star
33

athenz-authorizer

athenz policy management library for golang. Moved to https://github.com/AthenZ/athenz-authorizer
Go
14
star
34

vespa-kuromoji-linguistics

Java
14
star
35

k2hdkc

k2hdkc is k2hash based distributed kvs cluster
C++
13
star
36

big3store

Erlang
12
star
37

geobleu

Python implementation of GEO-BLEU, a similarity evaluation method for trajectories
Python
12
star
38

VFD-Dataset

Python
11
star
39

k2htp_dtor

K2HASH Distributed Transaction Of Repeater
C++
10
star
40

solr-plugin-samples

Java
9
star
41

yconnect-servlet-sdk

YConnect Servlet SDK
Java
8
star
42

VSU-Dataset

7
star
43

yjlogin-android-sdk

Kotlin
6
star
44

ConfigCacheBundle

Symfony ConfigCacheBundle for easier handling of user-defined configuration file cache
PHP
6
star
45

DynamicsSample

iOS 7の新機能、UIKit Dynamics、Motion Effectsを利用したサンプルコードです。
Objective-C
6
star
46

AntPickax

AntPickax provides basic libraries, components and systems
6
star
47

chmpx_nodejs

CHMPX nodejs addon library - Consistent Hashing Mq inProcess data eXchange
C++
5
star
48

k2hr3

K2HR3 - K2Hdkc based Resource and Roles and policy Rules
5
star
49

yosegi-spark

Java
5
star
50

hubot-shuffle

hubot-shuffle add shuffle system.
CoffeeScript
5
star
51

k2hr3_osnl

K2HR3 OpenStack Notification Listener - K2Hdkc based Resource and Roles and policy Rules
Python
4
star
52

embulk-output-solr

Java
4
star
53

textwebapi-cookbook

Cookbook for the Text Analysis Web API provided by Yahoo! DEVELOPER NETWORK.
Jupyter Notebook
4
star
54

fastlane-plugin-setup_app_feedback_sdk

Fastlane plugin that update Info.plist for AppFeedback SDK
Ruby
4
star
55

k2hr3_api

K2HR3 REST API - K2Hdkc based Resource and Roles and policy Rules
JavaScript
4
star
56

k2hash_phpext

PHP Extension library for K2HASH
C
4
star
57

k2hr3_utils

K2HR3 Utils - Utils for K2Hdkc based Resource and Roles and policy Rules
Shell
4
star
58

k2hr3_app

K2HR3 Web Application - K2Hdkc based Resource and Roles and policy Rules
JavaScript
4
star
59

k2htp_mdtor

K2Hash Transaction Plugin for Multiple Distributed Transaction Of Repeater
Shell
4
star
60

yosegi-hive

This is Yosegi's Hive plugin. This can write and read tables with Hive.
Java
4
star
61

k2hr3_helm_chart

Helm Chart for K2HR3
Shell
3
star
62

k2hdkc_java

K2HDKC Java library - k2hash based distributed kvs cluster
Java
3
star
63

k2hdkc_go

K2HDKC Go library - k2hash based distributed kvs cluster
Go
3
star
64

yosegi-tools

Java
3
star
65

k2hash_go

K2HASH Go library - NoSQL Key Value Store(KVS) library
Go
3
star
66

yj-ci-dataset

3
star
67

k2hash_nodejs

K2HASH nodejs addon library - NoSQL Key Value Store(KVS) nodejs library
JavaScript
3
star
68

k2hr3_cli

K2HR3 Command Line Interface
Shell
3
star
69

embulk-parser-xml2

Java
3
star
70

k2hr3_sidecar

K2HR3 Container Registration Sidecar - K2Hdkc based Resource and Roles and policy Rules
Shell
3
star
71

k2hdkc_python

K2HDKC Python library - k2hash based distributed kvs cluster
Python
3
star
72

k2hdkc_dbaas

Database as a Service for K2HDKC
Python
3
star
73

k2hash_python

K2HASH Python library - NoSQL Key Value Store(KVS) library
Python
3
star
74

yosegi-hadoop

Java
3
star
75

k2hdkc_nodejs

K2HDKC nodejs addon library - k2hash based distributed kvs cluster
JavaScript
3
star
76

k2hash_java

K2HASH Java library - NoSQL Key Value Store(KVS) library
Java
3
star
77

yosegi-avro

Java
2
star
78

k2hdkc_dbaas_override_conf

K2HDKC DBaaS Override Configuration
Shell
2
star
79

k2hdkc_dbaas_k8s_cli

K2HDKC DBaaS on kubernetes Command Line Interface - K2HR3 CLI Plugin
Shell
2
star
80

k2hr3_get_resource

K2HR3 Utilities - Get K2HR3 Resource Helper for Systemd service
Shell
2
star
81

k2hdkc_dbaas_cli

K2HDKC DBaaS Command Line Interface - K2HR3 CLI Plugin
Shell
2
star
82

hubot-package-version-release

publish release on GitHub based package.json
CoffeeScript
2
star
83

k2hdkc_helm_chart

Helm Chart for K2HDKC DBaaS
Shell
2
star
84

k2hdkc_phpext

PHP Extension library for K2HDKC
PHP
1
star
85

yosegi-example

Java
1
star
86

chmpx_phpext

PHP Extension library for CHMPX
PHP
1
star
87

yosegi-legacy

Java
1
star