{"id":22796530,"url":"https://github.com/macmade/objective-cpp","last_synced_at":"2025-07-11T05:03:49.454Z","repository":{"id":2247781,"uuid":"3202600","full_name":"macmade/Objective-CPP","owner":"macmade","description":"C++ compatibility library for Objective-C - Objective-CPP is a library intended to ease software development using Objective-C++. It declares categories on Objective-C classes, to work with the STL C++ types, such as std::string, std::vector, etc.","archived":false,"fork":false,"pushed_at":"2023-05-03T09:30:54.000Z","size":430,"stargazers_count":52,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-19T17:12:30.871Z","etag":null,"topics":["c-plus-plus","foundation","framework","interoperability","library","objective-c","objective-c-plus-plus","std","stdlib"],"latest_commit_sha":null,"homepage":"","language":"Objective-C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"macmade"}},"created_at":"2012-01-17T20:00:20.000Z","updated_at":"2025-04-01T08:28:40.000Z","dependencies_parsed_at":"2023-07-05T19:02:44.010Z","dependency_job_id":null,"html_url":"https://github.com/macmade/Objective-CPP","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/macmade/Objective-CPP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2FObjective-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2FObjective-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2FObjective-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2FObjective-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macmade","download_url":"https://codeload.github.com/macmade/Objective-CPP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2FObjective-CPP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264734525,"owners_count":23655686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c-plus-plus","foundation","framework","interoperability","library","objective-c","objective-c-plus-plus","std","stdlib"],"created_at":"2024-12-12T05:13:29.876Z","updated_at":"2025-07-11T05:03:49.432Z","avatar_url":"https://github.com/macmade.png","language":"Objective-C++","readme":"Objective-CPP\n=============\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/macmade/Objective-CPP/ci-mac.yaml?label=macOS\u0026logo=apple)](https://github.com/macmade/Objective-CPP/actions/workflows/ci-mac.yaml)\n[![Issues](http://img.shields.io/github/issues/macmade/Objective-CPP.svg?logo=github)](https://github.com/macmade/Objective-CPP/issues)\n![Status](https://img.shields.io/badge/status-active-brightgreen.svg?logo=git)\n![License](https://img.shields.io/badge/license-mit-brightgreen.svg?logo=open-source-initiative)  \n[![Contact](https://img.shields.io/badge/follow-@macmade-blue.svg?logo=twitter\u0026style=social)](https://twitter.com/macmade)\n[![Sponsor](https://img.shields.io/badge/sponsor-macmade-pink.svg?logo=github-sponsors\u0026style=social)](https://github.com/sponsors/macmade)\n\nAbout\n-----\n\n**C++ compatibility library for Objective-C**  \nObjective-CPP is a library intended to ease software development using Objective-C++.\n\nIt declares categories on Objective-C classes, to work with the STL C++ types, such as std::string, std::vector, etc.\n\nFor instance, with Objective-CPP, you can call every method of the NSString class passing std::string objects, instead of NSString objects.\nThe same applies for the return types, as you can get seamlessly std::string objects out of NSString objects.\n\n### Example:\n\nHere's a little example with NSString:\n\n    {\n        NSString * objcString = @\"hello, world\";\n        std::string cppString = [ objcString cppStringUsingEncoding: NSUTF8StringEncoding ];\n        \n        std::cout \u003c\u003c cppString \u003c\u003c std::endl;\n    }\n    \nAnd the same in the other way:\n\n    {\n        std::string cppString = \"hello, world\";\n        NSString * objcString = [ NSString stringWithCPPString: cppString encoding: NSUTF8StringEncoding ];\n        \n        NSLog( @\"%@\", objcString );\n    }\n\n#### Strings:\n\nObjective-CPP expands the NSString class with a category, adding support for C++ strings (std::string).  \nAll methods from NSString can then return a std::string instead of a NSString *, or take std::string arguments instead of NSString * arguments.\n\nBy default, Objective-CPP uses UTF-8 as default encoding for strings, for converting NSString objects into C++ string objects, and reverse.  \nYou can set another encoding using the new 'setDefaultCPPStringEncoding' class method of NSString:\n\n    [ NSString setDefaultCPPStringEncoding: NSASCIIStringEncoding ];\n\nLicense\n-------\n\nObjective-CPP is released under the terms of the MIT License.\n\nRepository Infos\n----------------\n\n    Owner:\t\t\tJean-David Gadina - XS-Labs\n    Web:\t\t\twww.xs-labs.com\n    Blog:\t\t\twww.noxeos.com\n    Twitter:\t\t@macmade\n    GitHub:\t\t\tgithub.com/macmade\n    LinkedIn:\t\tch.linkedin.com/in/macmade/\n    StackOverflow:\tstackoverflow.com/users/182676/macmade\n","funding_links":["https://github.com/sponsors/macmade"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmade%2Fobjective-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacmade%2Fobjective-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmade%2Fobjective-cpp/lists"}