{"id":16326450,"url":"https://github.com/blueneogeo/xtend-moe-ios","last_synced_at":"2026-01-23T20:41:47.196Z","repository":{"id":79280716,"uuid":"85975643","full_name":"blueneogeo/xtend-moe-ios","owner":"blueneogeo","description":"Some handy tools for using Xtend with the Multi-OS-Engine","archived":false,"fork":false,"pushed_at":"2017-03-23T19:35:58.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T08:25:30.997Z","etag":null,"topics":["active-annotation","multi-os-engine","tools","xtend"],"latest_commit_sha":null,"homepage":null,"language":"Xtend","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blueneogeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-23T17:03:38.000Z","updated_at":"2017-03-23T19:13:24.000Z","dependencies_parsed_at":"2023-04-25T08:46:37.623Z","dependency_job_id":null,"html_url":"https://github.com/blueneogeo/xtend-moe-ios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blueneogeo/xtend-moe-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueneogeo%2Fxtend-moe-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueneogeo%2Fxtend-moe-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueneogeo%2Fxtend-moe-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueneogeo%2Fxtend-moe-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blueneogeo","download_url":"https://codeload.github.com/blueneogeo/xtend-moe-ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueneogeo%2Fxtend-moe-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28699724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["active-annotation","multi-os-engine","tools","xtend"],"created_at":"2024-10-10T23:08:25.200Z","updated_at":"2026-01-23T20:41:47.181Z","avatar_url":"https://github.com/blueneogeo.png","language":"Xtend","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xtend MOE iOS\n\nSome handy tools for using Xtend with the [Multi-OS-Engine](https://multi-os-engine.org).\n\n## Getting Started\n\nThis project is not on Maven yet. A [copy of the built jar](https://github.com/blueneogeo/xtend-moe-ios/blob/master/xtend-moe-ios-1.0.jar) is in the root.\n\nYou can also build the jar yourself:\n\n** gradle build - creates the jar in ./build/libs\n\n## Creating and extending NSObject based classes\n\nThe **@Alloc** and **@Init** Active Annotations let you extend NSObject classes like this:\n\n```xtend\n\n@Alloc @Init\nclass MyViewController extends UIViewController {\n\n}\n\n```\n\nAnd to use this view controller: \n\n```xtend\nval myController = MyViewController.alloc.init\n```\n\n## @Alloc\n\nTo initialize any NSObject, you need to define a static **alloc()** method, as well as a **protected new(Pointer)** method. **@Alloc** does this for you. The **@Alloc** Active Annotation adds the following code to your class:\n\n```xtend\nprotected new(Pointer peer) {\n\tsuper(peer)\n}\n\n@Selector(\"alloc\")\ndef static native MyController alloc()\n```\n\n*[@Alloc source code](https://github.com/blueneogeo/xtend-moe-ios/blob/master/src/main/java/xtend/moe/ios/annotations/Alloc.xtend)*\n\n## @Init\n\nTo initialize an **NSObject**, first call **alloc()** and then one of the **init()** methods in Objective C. This means you need to create this **init()** method as well. **@Init** does this for you, adding this code:\n\n```xtend\n@Selector(\"init\")\ndef native MyController init()\n```\n\n*[@Init source code](https://github.com/blueneogeo/xtend-moe-ios/blob/master/src/main/java/xtend/moe/ios/annotations/Init.xtend)*\n\n## @NSConstructor\n\nXtend MOE iOS provides you with Active Annotations that create this code for you and help you write nicer constructors:\n\n```xtend\nval myController = MyViewController.create('Hello world')\n```\n\nTo do this, annotate the above class like this:\n\n```xtend\n\n@Alloc @Init\nclass MyViewController extends UIViewController {\n\n\t@Accessors String name\n\n\t@NSConstructor\n\tdef create(String name) {\n\t\tthis.name = name\n\t}\n\n}\n\n```\n\nThe **@NSConstructor** annotation lets you convert a normal method into a constructor. Any method annotated with **@NSConstructor** will be changed as follows:\n\n- it is made static\n- it will return an instance of the class\n- when statically called, it will call the init and alloc methods, and then execute your own constructor code\n\nThese constructor methods can have any normal Java method name, and you can create multiple on a single class.\n\n*[@NSConstructor source code](https://github.com/blueneogeo/xtend-moe-ios/blob/master/src/main/java/xtend/moe/ios/annotations/NSConstructor.xtend)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueneogeo%2Fxtend-moe-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueneogeo%2Fxtend-moe-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueneogeo%2Fxtend-moe-ios/lists"}