{"id":19709938,"url":"https://github.com/blodely/lycore","last_synced_at":"2025-09-06T09:43:33.695Z","repository":{"id":56919498,"uuid":"129834879","full_name":"blodely/LYCore","owner":"blodely","description":"general core lib for apps.","archived":false,"fork":false,"pushed_at":"2022-01-11T14:39:53.000Z","size":296,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T18:09:16.177Z","etag":null,"topics":["ios","objective-c","pod"],"latest_commit_sha":null,"homepage":null,"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/blodely.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-17T02:35:09.000Z","updated_at":"2022-01-05T13:50:55.000Z","dependencies_parsed_at":"2022-08-21T04:50:28.039Z","dependency_job_id":null,"html_url":"https://github.com/blodely/LYCore","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/blodely/LYCore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blodely%2FLYCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blodely%2FLYCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blodely%2FLYCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blodely%2FLYCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blodely","download_url":"https://codeload.github.com/blodely/LYCore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blodely%2FLYCore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273886638,"owners_count":25185509,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ios","objective-c","pod"],"created_at":"2024-11-11T22:05:21.421Z","updated_at":"2025-09-06T09:43:33.666Z","avatar_url":"https://github.com/blodely.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LYCore\n\nGeneral core lib for apps.\n\n### How to use:\n\nSimply add`pod 'LYCore'`, then run 'pod install'.\n\n#### configure networking env\n\nmake a copy of `space.luoyu.core.conf.plist` configuration template, and add it to your project.\n\nKey|Value example\u003cbr\u003e(_change to your own server settings_)|Remark\n---|:---|---\ncore-net-domain|app.luoyu.space|Core Networking Domain(Production)\ncore-net-domain-dev|dev.luoyu.space|Core Networking Domain(Development)\ncore-net-api-path|/api|Core Networking API path(Production)\ncore-net-api-path-dev|/api-v2|Core Networking API path(Development)\ncore-net-is-secure-transport|https://|Transport Security Toggle(Production)\ncore-net-is-secure-transport-dev|http://|Transport Security Toggle(Development)\n\nby toggling `[LYCore core].debug` _(BOOL)_, lib will use corresponding values to generate session manager.\n\nexample:\n\n```bash\n# production mode\nhttps://app.luoyu.space/api\n\n# development mode\nhttp://dev.luoyu.space/api-v2\n```\n\n##### * You can add your own key-value configurations\n\nand access it by...\n\n```objective-c\n// get configuration data (NSDictionary object)\n[[LYCore core] conf];\n```\n\nor\n\n```objective-c\n// get value for key\n[[LYCore core] valueForConfWithKey:@\"the-key-name\"];\n```\n\n### Custom request\n\nSimply add category to LYCoreAPI, then you can write your own specified request method.\n\nexample:\n\n**LYCoreAPI+Example.h**\n\n```objc\n#import \u003cLYCore/LYCore.h\u003e\n\n@interface LYCoreAPI (Example)\n\n- (NSURLSessionDataTask *)GETURLString:(NSString *)URLString\n\twithParameters:(NSDictionary *)params\n\tsuccess:(void (^)(id ret))success\n\terror:(void (^)(NSInteger code, NSString *msg, id ret))apierror\n\tfailure:(void (^)(NSError *error))failure;\n\n@end\n```\n\nthis add an api error block for project error code handling.\n\n**LYCoreAPI+Example.m**\n\n```objc\n#import \"LYCoreAPI+Example.h\"\n\n@implementation LYCoreAPI (Example)\n- (NSURLSessionDataTask *)GETURLString:(NSString *)URLString withParameters:(NSDictionary *)params success:(void (^)(id))success error:(void (^)(NSInteger, NSString *, id))apierror failure:(void (^)(NSError *))failure {\n    NSURLSessionDataTask *datatask = [self GETURLString:URLString withParameters:params success:^(id ret) {\n        if (ret == nil) {\n            apierror(1, @\"NULL RESPONSE\", ret);\n        } else {\n            success(ret);\n        }\n    } failure:^(NSError *error) {\n        failure(error);\n    }];\n    return datatask;\n}\n@end\n```\n\n### Locating\n\nCore lib now can use CoreLocation to get current placemark, start with 1.0.31.\n\nusage:\n\n```objc\n[[LYApp current] updateLocation:^(CLLocationCoordinate2D coordinate, CLPlacemark *place) {\n\t// IF 'place' IS NOT NIL,\n\t// MEANS SUCCESSFULLY GET CURRENT LOCATION PLACEMARK.\n\tNSLog(\"%@\", place);\n}];\n```\n\n### Author\n\n[骆昱(Luo Yu)](http://luoyu.space)\n\nEmail: [indie.luo@gmail.com](mailto:indie.luo@gmail.com)\n\nDate: Tuesday, April 17, 2018\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblodely%2Flycore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblodely%2Flycore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblodely%2Flycore/lists"}