{"id":21373570,"url":"https://github.com/itenfay/clang_api","last_synced_at":"2025-07-13T07:33:05.556Z","repository":{"id":56931780,"uuid":"62799521","full_name":"itenfay/clang_api","owner":"itenfay","description":"clang_api封装 iOS 系统常用接口，存取bundle中的资源，读取本地化文本，执行选择器和 UserDefaults 的相关操作，调用通知中心的相关操作等。","archived":false,"fork":false,"pushed_at":"2024-06-16T08:18:10.000Z","size":194,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-19T09:52:38.527Z","etag":null,"topics":["api","api-client","api-wrapper","c","cocoapods","ios","objective-c","pod"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itenfay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-07-07T10:46:01.000Z","updated_at":"2024-06-16T08:14:27.000Z","dependencies_parsed_at":"2023-07-14T11:31:40.979Z","dependency_job_id":null,"html_url":"https://github.com/itenfay/clang_api","commit_stats":null,"previous_names":["dgynfi/clang_api","itenfay/clang_api","chenxing640/clang_api"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2Fclang_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2Fclang_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2Fclang_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2Fclang_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itenfay","download_url":"https://codeload.github.com/itenfay/clang_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868010,"owners_count":17536950,"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":["api","api-client","api-wrapper","c","cocoapods","ios","objective-c","pod"],"created_at":"2024-11-22T08:29:20.962Z","updated_at":"2024-11-22T08:29:21.732Z","avatar_url":"https://github.com/itenfay.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"如果能帮助到你，请你给[一颗星](https://github.com/itenfay/clang_api)，谢谢！(If this can help you, please give it a [star](https://github.com/itenfay/clang_api), Thanks!)\n\n## clang_api\n\n存取bundle中的资源，读取本地化文本，执行选择器和UserDefaults的相关操作，调用通知中心的相关操作等。\n\n[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](LICENSE)\u0026nbsp;\n[![CocoaPods](http://img.shields.io/cocoapods/v/clang_api.svg?style=flat)](http://cocoapods.org/pods/clang_api)\u0026nbsp;\n![CocoaPods](http://img.shields.io/cocoapods/p/clang_api.svg?style=flat)\u0026nbsp;\n\n## Group (ID:614799921)\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/clang_api/raw/master/clang_api/Image/g614799921.jpg\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\nUsing [CocoaPods](https://cocoapods.org):\n\n```\n pod 'clang_api'\n```\n\nOr\n\n```\n pod 'clang_api', '~\u003e 1.1.3'\n```\n\n## Usage\n\n- 获取Bundle资源文件路径\n \n```ObjC\nNSString *path = clang_path_for_resource_from_bundle(@\"Info\", @\"plist\", nil, @\"Test\");\nNSLog(@\"Info.plist's path: %@\", path);\nNSLog(@\"Info.plist's content: %@\", [NSDictionary dictionaryWithContentsOfFile:path]);\n```\n\n- 获取Bundle中的图片\n \n```ObjC\nUIImage *image = clang_load_image_from_bundle(@\"angle-mask\", @\"angle-mask.bundle\", @\"Test\");\nNSLog(@\"Image: %@\", image);\n```\n\n- 获取Bundle中的图片，不缓存内存\n \n```ObjC\nUIImage *image2 = clang_image_with_contents_of_file(@\"angle-mask\", nil, @\"angle-mask.bundle\", @\"Test\");\nNSLog(@\"Image2: %@\", image2);\n```\n\n- 获取Main Bundle中的资源文件路径\n \n```ObjC\nNSString *path2 = clang_path_for_resource_from_bundle(@\"Info\", @\"plist\", nil, nil);\nNSLog(@\"info.plist's path2: %@\", path2);\nNSLog(@\"info.plist's content2: %@\", [NSDictionary dictionaryWithContentsOfFile:path2]);\n```\n\n- 获取Main Bundle中的图片，不缓存内存\n \n```ObjC\nUIImage *Image3 = clang_image_with_contents_of_file(@\"angle-mask\", nil, nil, nil);\nNSLog(@\"Image3: %@\", image3);\n```\n\n-  读取本地化内容\n \n```ObjC\nNSLog(@\"Localized string: %@\", clang_localized_string(@\"Lan_network_timeout\", nil, @\"en\", @\"language\", @\"Test\"));\n```\n\n- 其他\n \n```ObjC\nBOOL y1 = clang_equal(@1, @3);\n//NSLog(@\"y1: %d\", y1);\nBOOL y2 = clang_equal_to_string(@\"try\", @\"try\");\n//NSLog(@\"y2: %d\", y2);\n\nclang_perform_selector(self, @selector(run));\nclang_perform_selector_v2(self, @selector(runWithArg:), @10);\nclang_delay_perform_selector(self, @selector(update), 1.0);\nclang_delay_perform_selector_v2(self, @selector(updateWithArg:), @\"update\", 1.0);\n    \nclang_store_object(@\"AppID\", @\"g7482293\", YES);\nNSString *appID = clang_read_object(@\"AppID\");\n//NSLog(@\"appID: %@\", appID);\n//clang_remove_object(@\"AppID\", YES);\n    \nclang_add_observer(self, @selector(logInWithResult:), @\"kLoginNotification\", nil);\n//clang_remove_observer_v2(self, @\"kLoginNotification\", nil);\n//clang_remove_observer(self);\nclang_post_notification_name(@\"kLoginNotification\", @1);\nclang_post_notification_name_v2(@\"kLoginNotification\", nil, @{@\"ret\": @0});\n```\n\n## Sample\n\n- [Code Sample Portal](https://github.com/itenfay/clang_api/blob/master/clang_api/ViewController.m)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2Fclang_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitenfay%2Fclang_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2Fclang_api/lists"}