Commit 924d6776 authored by jz's avatar jz

add files

parent 6a87e28b
......@@ -7,8 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
04EB3BC2238FE9C40007CB4A /* GMTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04EB3BC1238FE9C40007CB4A /* GMTestViewController.m */; };
102638280A9EBC48C11CA68C /* Pods_GMRouter_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68E3E2FC8A6762195785F5C1 /* Pods_GMRouter_Tests.framework */; };
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
......@@ -23,8 +21,9 @@
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
73CE1132B53255BC5E2596CA /* Pods_GMRouter_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D703B8D4908D47D2426A0FC /* Pods_GMRouter_Tests.framework */; };
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
8FB591A60D79A8FEF4BF3085 /* Pods_GMRouter_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4379E9AD17C4F11ACFBA5F58 /* Pods_GMRouter_Example.framework */; };
C9B2160C574BA61A785279A8 /* Pods_GMRouter_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 620A1FC1561B083150BB5F1F /* Pods_GMRouter_Example.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -38,12 +37,9 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
04EB3BC0238FE9C40007CB4A /* GMTestViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GMTestViewController.h; sourceTree = "<group>"; };
04EB3BC1238FE9C40007CB4A /* GMTestViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GMTestViewController.m; sourceTree = "<group>"; };
0CE176D5199DE2FD76A0CDAE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
1CF696923FC0730E5FE7FD62 /* GMRouter.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GMRouter.podspec; path = ../GMRouter.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
223EBBCDA6F6B0AD76422406 /* Pods-GMRouter_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Example.debug.xcconfig"; path = "Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example.debug.xcconfig"; sourceTree = "<group>"; };
4379E9AD17C4F11ACFBA5F58 /* Pods_GMRouter_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GMRouter_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1023953C32A7010DB53FBBC4 /* Pods-GMRouter_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Tests.release.xcconfig"; path = "Target Support Files/Pods-GMRouter_Tests/Pods-GMRouter_Tests.release.xcconfig"; sourceTree = "<group>"; };
2D703B8D4908D47D2426A0FC /* Pods_GMRouter_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GMRouter_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4191355538D66BC19D7E9984 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
6003F58A195388D20070C39A /* GMRouter_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMRouter_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
......@@ -63,13 +59,14 @@
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
6269A92F618AC96284544A67 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
68E3E2FC8A6762195785F5C1 /* Pods_GMRouter_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GMRouter_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
620A1FC1561B083150BB5F1F /* Pods_GMRouter_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GMRouter_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
66D110D0789DEB4EA75338EC /* Pods-GMRouter_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Example.release.xcconfig"; path = "Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example.release.xcconfig"; sourceTree = "<group>"; };
6BB51021603B6D97C252EF72 /* Pods-GMRouter_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Example.debug.xcconfig"; path = "Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example.debug.xcconfig"; sourceTree = "<group>"; };
71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
7C9E9D7B32F337B0313412AF /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
AD5565AAC73B66075675ED03 /* Pods-GMRouter_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Tests.release.xcconfig"; path = "Target Support Files/Pods-GMRouter_Tests/Pods-GMRouter_Tests.release.xcconfig"; sourceTree = "<group>"; };
BB7E74A5AD6EA5AFD4B54F2B /* Pods-GMRouter_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Example.release.xcconfig"; path = "Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example.release.xcconfig"; sourceTree = "<group>"; };
FF3B36A744211B01E8B4A0DD /* Pods-GMRouter_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Tests.debug.xcconfig"; path = "Target Support Files/Pods-GMRouter_Tests/Pods-GMRouter_Tests.debug.xcconfig"; sourceTree = "<group>"; };
8D18798C6CB03ED531D0D5F3 /* Pods-GMRouter_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GMRouter_Tests.debug.xcconfig"; path = "Target Support Files/Pods-GMRouter_Tests/Pods-GMRouter_Tests.debug.xcconfig"; sourceTree = "<group>"; };
B22FC70F2621AE20517BEA81 /* GMRouter.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GMRouter.podspec; path = ../GMRouter.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -80,7 +77,7 @@
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
8FB591A60D79A8FEF4BF3085 /* Pods_GMRouter_Example.framework in Frameworks */,
C9B2160C574BA61A785279A8 /* Pods_GMRouter_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -91,24 +88,13 @@
6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
102638280A9EBC48C11CA68C /* Pods_GMRouter_Tests.framework in Frameworks */,
73CE1132B53255BC5E2596CA /* Pods_GMRouter_Tests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
29C319541EE591946938A7E5 /* Pods */ = {
isa = PBXGroup;
children = (
223EBBCDA6F6B0AD76422406 /* Pods-GMRouter_Example.debug.xcconfig */,
BB7E74A5AD6EA5AFD4B54F2B /* Pods-GMRouter_Example.release.xcconfig */,
FF3B36A744211B01E8B4A0DD /* Pods-GMRouter_Tests.debug.xcconfig */,
AD5565AAC73B66075675ED03 /* Pods-GMRouter_Tests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
6003F581195388D10070C39A = {
isa = PBXGroup;
children = (
......@@ -117,7 +103,7 @@
6003F5B5195388D20070C39A /* Tests */,
6003F58C195388D20070C39A /* Frameworks */,
6003F58B195388D20070C39A /* Products */,
29C319541EE591946938A7E5 /* Pods */,
8C94C1C051059C88301CEB10 /* Pods */,
);
sourceTree = "<group>";
};
......@@ -137,8 +123,8 @@
6003F58F195388D20070C39A /* CoreGraphics.framework */,
6003F591195388D20070C39A /* UIKit.framework */,
6003F5AF195388D20070C39A /* XCTest.framework */,
4379E9AD17C4F11ACFBA5F58 /* Pods_GMRouter_Example.framework */,
68E3E2FC8A6762195785F5C1 /* Pods_GMRouter_Tests.framework */,
620A1FC1561B083150BB5F1F /* Pods_GMRouter_Example.framework */,
2D703B8D4908D47D2426A0FC /* Pods_GMRouter_Tests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
......@@ -151,8 +137,6 @@
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
6003F5A5195388D20070C39A /* GMViewController.h */,
6003F5A6195388D20070C39A /* GMViewController.m */,
04EB3BC0238FE9C40007CB4A /* GMTestViewController.h */,
04EB3BC1238FE9C40007CB4A /* GMTestViewController.m */,
71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
6003F5A8195388D20070C39A /* Images.xcassets */,
6003F594195388D20070C39A /* Supporting Files */,
......@@ -194,13 +178,24 @@
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
1CF696923FC0730E5FE7FD62 /* GMRouter.podspec */,
6269A92F618AC96284544A67 /* README.md */,
0CE176D5199DE2FD76A0CDAE /* LICENSE */,
B22FC70F2621AE20517BEA81 /* GMRouter.podspec */,
4191355538D66BC19D7E9984 /* README.md */,
7C9E9D7B32F337B0313412AF /* LICENSE */,
);
name = "Podspec Metadata";
sourceTree = "<group>";
};
8C94C1C051059C88301CEB10 /* Pods */ = {
isa = PBXGroup;
children = (
6BB51021603B6D97C252EF72 /* Pods-GMRouter_Example.debug.xcconfig */,
66D110D0789DEB4EA75338EC /* Pods-GMRouter_Example.release.xcconfig */,
8D18798C6CB03ED531D0D5F3 /* Pods-GMRouter_Tests.debug.xcconfig */,
1023953C32A7010DB53FBBC4 /* Pods-GMRouter_Tests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -208,11 +203,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "GMRouter_Example" */;
buildPhases = (
F14CB1469DF16C1F1948A6FC /* [CP] Check Pods Manifest.lock */,
1A2D59AB8300E4E1EF722997 /* [CP] Check Pods Manifest.lock */,
6003F586195388D20070C39A /* Sources */,
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
F5D18D9460B0F8478D8899A8 /* [CP] Embed Pods Frameworks */,
573A0D1EFB169FBA5C6A2DBA /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
......@@ -227,7 +222,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "GMRouter_Tests" */;
buildPhases = (
C93EBFA786206277F3BA6267 /* [CP] Check Pods Manifest.lock */,
597D76FC5BEF0D70FF29DD04 /* [CP] Check Pods Manifest.lock */,
6003F5AA195388D20070C39A /* Sources */,
6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */,
......@@ -250,7 +245,7 @@
attributes = {
CLASSPREFIX = GM;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = jz;
ORGANIZATIONNAME = Q14;
TargetAttributes = {
6003F5AD195388D20070C39A = {
TestTargetID = 6003F589195388D20070C39A;
......@@ -259,9 +254,10 @@
};
buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "GMRouter" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
......@@ -299,7 +295,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
C93EBFA786206277F3BA6267 /* [CP] Check Pods Manifest.lock */ = {
1A2D59AB8300E4E1EF722997 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -314,51 +310,53 @@
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-GMRouter_Tests-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-GMRouter_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F14CB1469DF16C1F1948A6FC /* [CP] Check Pods Manifest.lock */ = {
573A0D1EFB169FBA5C6A2DBA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/GMRouter/GMRouter.framework",
"${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-GMRouter_Example-checkManifestLockResult.txt",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMRouter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F5D18D9460B0F8478D8899A8 /* [CP] Embed Pods Frameworks */ = {
597D76FC5BEF0D70FF29DD04 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/GMRouter/GMRouter.framework",
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMRouter.framework",
"$(DERIVED_FILE_DIR)/Pods-GMRouter_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GMRouter_Example/Pods-GMRouter_Example-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
......@@ -368,7 +366,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
04EB3BC2238FE9C40007CB4A /* GMTestViewController.m in Sources */,
6003F59E195388D20070C39A /* GMAppDelegate.m in Sources */,
6003F5A7195388D20070C39A /* GMViewController.m in Sources */,
6003F59A195388D20070C39A /* main.m in Sources */,
......@@ -496,7 +493,7 @@
};
6003F5C0195388D20070C39A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 223EBBCDA6F6B0AD76422406 /* Pods-GMRouter_Example.debug.xcconfig */;
baseConfigurationReference = 6BB51021603B6D97C252EF72 /* Pods-GMRouter_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
......@@ -512,7 +509,7 @@
};
6003F5C1195388D20070C39A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BB7E74A5AD6EA5AFD4B54F2B /* Pods-GMRouter_Example.release.xcconfig */;
baseConfigurationReference = 66D110D0789DEB4EA75338EC /* Pods-GMRouter_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
......@@ -528,7 +525,7 @@
};
6003F5C3195388D20070C39A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FF3B36A744211B01E8B4A0DD /* Pods-GMRouter_Tests.debug.xcconfig */;
baseConfigurationReference = 8D18798C6CB03ED531D0D5F3 /* Pods-GMRouter_Tests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
......@@ -553,7 +550,7 @@
};
6003F5C4195388D20070C39A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AD5565AAC73B66075675ED03 /* Pods-GMRouter_Tests.release.xcconfig */;
baseConfigurationReference = 1023953C32A7010DB53FBBC4 /* Pods-GMRouter_Tests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="u7L-eo-lZa">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
......@@ -20,27 +22,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<navigationItem key="navigationItem" id="p8W-46-Cyu"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="708" y="431"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="qRv-n3-5Rw">
<objects>
<navigationController id="u7L-eo-lZa" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="YtA-dW-IL4">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="whP-gf-Uak" kind="relationship" relationship="rootViewController" id="6WD-Sx-WDw"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="QVQ-VH-Kf2" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-124" y="447"/>
<point key="canvasLocation" x="305" y="433"/>
</scene>
</scenes>
</document>
......@@ -2,8 +2,8 @@
// GMAppDelegate.h
// GMRouter
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
@import UIKit;
......
......@@ -2,8 +2,8 @@
// GMAppDelegate.m
// GMRouter
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
#import "GMAppDelegate.h"
......
//
// GMTestViewController.h
// GMRouter_Example
//
// Created by Q14 on 2019/11/28.
// Copyright © 2019 jz. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GMTestViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// GMTestViewController.m
// GMRouter_Example
//
// Created by Q14 on 2019/11/28.
// Copyright © 2019 jz. All rights reserved.
//
#import "GMTestViewController.h"
@interface GMTestViewController ()
@end
@implementation GMTestViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -2,8 +2,8 @@
// GMViewController.h
// GMRouter
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
@import UIKit;
......
......@@ -2,14 +2,12 @@
// GMViewController.m
// GMRouter
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
#import "GMViewController.h"
#import <GMRouter/GMRouter-umbrella.h>
//@import GMRouter;
@interface GMViewController ()
@end
......@@ -20,19 +18,6 @@
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setBackgroundColor:UIColor.redColor];
[btn addTarget:self action:@selector(clickBtn) forControlEvents:UIControlEventTouchUpInside];
btn.frame = CGRectMake(0, 100, 100, 30);
[self.view addSubview:btn];
}
- (void)clickBtn {
// Target_commons *target = [[Target_commons alloc] init];
// [target push_CommonViewController:@"GMTestViewController" params:@{}];
UIViewController *vc = [[GMRouter sharedInstance] performAction:@"GMTestViewController" params:@{} shouldCacheTarget:YES];
[self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning
......
......@@ -2,8 +2,8 @@
// main.m
// GMRouter
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
@import UIKit;
......
PODS:
- GMRouter (0.1.0)
- GMRouter (0.1.0):
- MJExtension
- MJExtension (3.2.1)
DEPENDENCIES:
- GMRouter (from `../`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- MJExtension
EXTERNAL SOURCES:
GMRouter:
:path: "../"
SPEC CHECKSUMS:
GMRouter: 649720313dfcbadcc7cdbd8834896da8f59a7f96
GMRouter: d47a2a7690eea791e26374cb3c616667124aa1d8
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
PODFILE CHECKSUM: bcbc555b81a3b21a917383786de0d49ebef33013
......
......@@ -3,20 +3,30 @@
"version": "0.1.0",
"summary": "A short description of GMRouter.",
"description": "TODO: Add long description of the pod here.",
"homepage": "http://git.wanmeizhensuo.com/gengmeiios/GMRouter.git",
"homepage": "https://github.com/Q14/GMRouter",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"jz": "qiaojinzhu@igengmei.com"
"Q14": "qiaojinzhu@igengmei.com"
},
"source": {
"git": "git@git.wanmeizhensuo.com:gengmeiios/GMRouter.git",
"git": "https://github.com/Q14/GMRouter.git",
"tag": "0.1.0"
},
"platforms": {
"ios": "8.0"
},
"source_files": "GMRouter/Classes/**/*"
"source_files": "GMRouter/Classes/**/*",
"resource_bundles": {
"GMRouter": [
"GMRouter/Assets/*"
]
},
"dependencies": {
"MJExtension": [
]
}
}
Copyright (c) 2013-2019 MJExtension (https://github.com/CoderMJLee/MJExtension)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
//
// MJExtension.h
// MJExtension
//
// Created by mj on 14-1-15.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NSObject+MJCoding.h"
#import "NSObject+MJProperty.h"
#import "NSObject+MJClass.h"
#import "NSObject+MJKeyValue.h"
#import "NSString+MJExtension.h"
#import "MJExtensionConst.h"
#import "MJFoundation.h"
//! Project version number for MJExtension.
FOUNDATION_EXPORT double MJExtensionVersionNumber;
//! Project version string for MJExtension.
FOUNDATION_EXPORT const unsigned char MJExtensionVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <MJExtension/PublicHeader.h>
#ifndef __MJExtensionConst__H__
#define __MJExtensionConst__H__
#import <Foundation/Foundation.h>
#ifndef MJ_LOCK
#define MJ_LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
#endif
#ifndef MJ_UNLOCK
#define MJ_UNLOCK(lock) dispatch_semaphore_signal(lock);
#endif
// 信号量
#define MJExtensionSemaphoreCreate \
static dispatch_semaphore_t signalSemaphore; \
static dispatch_once_t onceTokenSemaphore; \
dispatch_once(&onceTokenSemaphore, ^{ \
signalSemaphore = dispatch_semaphore_create(1); \
});
#define MJExtensionSemaphoreWait MJ_LOCK(signalSemaphore)
#define MJExtensionSemaphoreSignal MJ_UNLOCK(signalSemaphore)
// 过期
#define MJExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
// 构建错误
#define MJExtensionBuildError(clazz, msg) \
NSError *error = [NSError errorWithDomain:msg code:250 userInfo:nil]; \
[clazz setMj_error:error];
// 日志输出
#ifdef DEBUG
#define MJExtensionLog(...) NSLog(__VA_ARGS__)
#else
#define MJExtensionLog(...)
#endif
/**
* 断言
* @param condition 条件
* @param returnValue 返回值
*/
#define MJExtensionAssertError(condition, returnValue, clazz, msg) \
[clazz setMj_error:nil]; \
if ((condition) == NO) { \
MJExtensionBuildError(clazz, msg); \
return returnValue;\
}
#define MJExtensionAssert2(condition, returnValue) \
if ((condition) == NO) return returnValue;
/**
* 断言
* @param condition 条件
*/
#define MJExtensionAssert(condition) MJExtensionAssert2(condition, )
/**
* 断言
* @param param 参数
* @param returnValue 返回值
*/
#define MJExtensionAssertParamNotNil2(param, returnValue) \
MJExtensionAssert2((param) != nil, returnValue)
/**
* 断言
* @param param 参数
*/
#define MJExtensionAssertParamNotNil(param) MJExtensionAssertParamNotNil2(param, )
/**
* 打印所有的属性
*/
#define MJLogAllIvars \
- (NSString *)description \
{ \
return [self mj_keyValues].description; \
}
#define MJExtensionLogAllProperties MJLogAllIvars
/** 仅在 Debugger 展示所有的属性 */
#define MJImplementDebugDescription \
- (NSString *)debugDescription \
{ \
return [self mj_keyValues].debugDescription; \
}
/**
* 类型(属性类型)
*/
FOUNDATION_EXPORT NSString *const MJPropertyTypeInt;
FOUNDATION_EXPORT NSString *const MJPropertyTypeShort;
FOUNDATION_EXPORT NSString *const MJPropertyTypeFloat;
FOUNDATION_EXPORT NSString *const MJPropertyTypeDouble;
FOUNDATION_EXPORT NSString *const MJPropertyTypeLong;
FOUNDATION_EXPORT NSString *const MJPropertyTypeLongLong;
FOUNDATION_EXPORT NSString *const MJPropertyTypeChar;
FOUNDATION_EXPORT NSString *const MJPropertyTypeBOOL1;
FOUNDATION_EXPORT NSString *const MJPropertyTypeBOOL2;
FOUNDATION_EXPORT NSString *const MJPropertyTypePointer;
FOUNDATION_EXPORT NSString *const MJPropertyTypeIvar;
FOUNDATION_EXPORT NSString *const MJPropertyTypeMethod;
FOUNDATION_EXPORT NSString *const MJPropertyTypeBlock;
FOUNDATION_EXPORT NSString *const MJPropertyTypeClass;
FOUNDATION_EXPORT NSString *const MJPropertyTypeSEL;
FOUNDATION_EXPORT NSString *const MJPropertyTypeId;
#endif
#ifndef __MJExtensionConst__M__
#define __MJExtensionConst__M__
#import <Foundation/Foundation.h>
/**
* 成员变量类型(属性类型)
*/
NSString *const MJPropertyTypeInt = @"i";
NSString *const MJPropertyTypeShort = @"s";
NSString *const MJPropertyTypeFloat = @"f";
NSString *const MJPropertyTypeDouble = @"d";
NSString *const MJPropertyTypeLong = @"l";
NSString *const MJPropertyTypeLongLong = @"q";
NSString *const MJPropertyTypeChar = @"c";
NSString *const MJPropertyTypeBOOL1 = @"c";
NSString *const MJPropertyTypeBOOL2 = @"b";
NSString *const MJPropertyTypePointer = @"*";
NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}";
NSString *const MJPropertyTypeMethod = @"^{objc_method=}";
NSString *const MJPropertyTypeBlock = @"@?";
NSString *const MJPropertyTypeClass = @"#";
NSString *const MJPropertyTypeSEL = @":";
NSString *const MJPropertyTypeId = @"@";
#endif
\ No newline at end of file
//
// MJFoundation.h
// MJExtensionExample
//
// Created by MJ Lee on 14/7/16.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MJFoundation : NSObject
+ (BOOL)isClassFromFoundation:(Class)c;
+ (BOOL)isFromNSObjectProtocolProperty:(NSString *)propertyName;
@end
//
// MJFoundation.m
// MJExtensionExample
//
// Created by MJ Lee on 14/7/16.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import "MJFoundation.h"
#import "MJExtensionConst.h"
#import <CoreData/CoreData.h>
#import "objc/runtime.h"
@implementation MJFoundation
+ (BOOL)isClassFromFoundation:(Class)c
{
if (c == [NSObject class] || c == [NSManagedObject class]) return YES;
static NSSet *foundationClasses;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// 集合中没有NSObject,因为几乎所有的类都是继承自NSObject,具体是不是NSObject需要特殊判断
foundationClasses = [NSSet setWithObjects:
[NSURL class],
[NSDate class],
[NSValue class],
[NSData class],
[NSError class],
[NSArray class],
[NSDictionary class],
[NSString class],
[NSAttributedString class], nil];
});
__block BOOL result = NO;
[foundationClasses enumerateObjectsUsingBlock:^(Class foundationClass, BOOL *stop) {
if ([c isSubclassOfClass:foundationClass]) {
result = YES;
*stop = YES;
}
}];
return result;
}
+ (BOOL)isFromNSObjectProtocolProperty:(NSString *)propertyName
{
if (!propertyName) return NO;
static NSSet<NSString *> *objectProtocolPropertyNames;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
unsigned int count = 0;
objc_property_t *propertyList = protocol_copyPropertyList(@protocol(NSObject), &count);
NSMutableSet *propertyNames = [NSMutableSet setWithCapacity:count];
for (int i = 0; i < count; i++) {
objc_property_t property = propertyList[i];
NSString *propertyName = [NSString stringWithCString:property_getName(property) encoding:NSUTF8StringEncoding];
if (propertyName) {
[propertyNames addObject:propertyName];
}
}
objectProtocolPropertyNames = [propertyNames copy];
free(propertyList);
});
return [objectProtocolPropertyNames containsObject:propertyName];
}
@end
//
// MJProperty.h
// MJExtensionExample
//
// Created by MJ Lee on 15/4/17.
// Copyright (c) 2015年 小码哥. All rights reserved.
// 包装一个成员属性
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import "MJPropertyType.h"
#import "MJPropertyKey.h"
/**
* 包装一个成员
*/
@interface MJProperty : NSObject
/** 成员属性 */
@property (nonatomic, assign) objc_property_t property;
/** 成员属性的名字 */
@property (nonatomic, readonly) NSString *name;
/** 成员属性的类型 */
@property (nonatomic, readonly) MJPropertyType *type;
/** 成员属性来源于哪个类(可能是父类) */
@property (nonatomic, assign) Class srcClass;
/**** 同一个成员属性 - 父类和子类的行为可能不一致(originKey、propertyKeys、objectClassInArray) ****/
/** 设置最原始的key */
- (void)setOriginKey:(id)originKey forClass:(Class)c;
/** 对应着字典中的多级key(里面存放的数组,数组里面都是MJPropertyKey对象) */
- (NSArray *)propertyKeysForClass:(Class)c;
/** 模型数组中的模型类型 */
- (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c;
- (Class)objectClassInArrayForClass:(Class)c;
/**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/
/**
* 设置object的成员变量值
*/
- (void)setValue:(id)value forObject:(id)object;
/**
* 得到object的成员属性值
*/
- (id)valueForObject:(id)object;
/**
* 初始化
*/
+ (instancetype)cachedPropertyWithProperty:(objc_property_t)property;
@end
//
// MJProperty.m
// MJExtensionExample
//
// Created by MJ Lee on 15/4/17.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "MJProperty.h"
#import "MJFoundation.h"
#import "MJExtensionConst.h"
#import <objc/message.h>
#include "TargetConditionals.h"
@interface MJProperty()
@property (strong, nonatomic) NSMutableDictionary *propertyKeysDict;
@property (strong, nonatomic) NSMutableDictionary *objectClassInArrayDict;
@property (strong, nonatomic) dispatch_semaphore_t propertyKeysLock;
@property (strong, nonatomic) dispatch_semaphore_t objectClassInArrayLock;
@end
@implementation MJProperty
#pragma mark - 初始化
- (instancetype)init
{
if (self = [super init]) {
_propertyKeysDict = [NSMutableDictionary dictionary];
_objectClassInArrayDict = [NSMutableDictionary dictionary];
_propertyKeysLock = dispatch_semaphore_create(1);
_objectClassInArrayLock = dispatch_semaphore_create(1);
}
return self;
}
#pragma mark - 缓存
+ (instancetype)cachedPropertyWithProperty:(objc_property_t)property
{
MJProperty *propertyObj = objc_getAssociatedObject(self, property);
if (propertyObj == nil) {
propertyObj = [[self alloc] init];
propertyObj.property = property;
objc_setAssociatedObject(self, property, propertyObj, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
return propertyObj;
}
#pragma mark - 公共方法
- (void)setProperty:(objc_property_t)property
{
_property = property;
MJExtensionAssertParamNotNil(property);
// 1.属性名
_name = @(property_getName(property));
// 2.成员类型
NSString *attrs = @(property_getAttributes(property));
NSUInteger dotLoc = [attrs rangeOfString:@","].location;
NSString *code = nil;
NSUInteger loc = 1;
if (dotLoc == NSNotFound) { // 没有,
code = [attrs substringFromIndex:loc];
} else {
code = [attrs substringWithRange:NSMakeRange(loc, dotLoc - loc)];
}
_type = [MJPropertyType cachedTypeWithCode:code];
}
/**
* 获得成员变量的值
*/
- (id)valueForObject:(id)object
{
if (self.type.KVCDisabled) return [NSNull null];
id value = [object valueForKey:self.name];
// 32位BOOL类型转换json后成Int类型
/** https://github.com/CoderMJLee/MJExtension/issues/545 */
// 32 bit device OR 32 bit Simulator
#if defined(__arm__) || (TARGET_OS_SIMULATOR && !__LP64__)
if (self.type.isBoolType) {
value = @([(NSNumber *)value boolValue]);
}
#endif
return value;
}
/**
* 设置成员变量的值
*/
- (void)setValue:(id)value forObject:(id)object
{
if (self.type.KVCDisabled || value == nil) return;
[object setValue:value forKey:self.name];
}
/**
* 通过字符串key创建对应的keys
*/
- (NSArray *)propertyKeysWithStringKey:(NSString *)stringKey
{
if (stringKey.length == 0) return nil;
NSMutableArray *propertyKeys = [NSMutableArray array];
// 如果有多级映射
NSArray *oldKeys = [stringKey componentsSeparatedByString:@"."];
for (NSString *oldKey in oldKeys) {
NSUInteger start = [oldKey rangeOfString:@"["].location;
if (start != NSNotFound) { // 有索引的key
NSString *prefixKey = [oldKey substringToIndex:start];
NSString *indexKey = prefixKey;
if (prefixKey.length) {
MJPropertyKey *propertyKey = [[MJPropertyKey alloc] init];
propertyKey.name = prefixKey;
[propertyKeys addObject:propertyKey];
indexKey = [oldKey stringByReplacingOccurrencesOfString:prefixKey withString:@""];
}
/** 解析索引 **/
// 元素
NSArray *cmps = [[indexKey stringByReplacingOccurrencesOfString:@"[" withString:@""] componentsSeparatedByString:@"]"];
for (NSInteger i = 0; i<cmps.count - 1; i++) {
MJPropertyKey *subPropertyKey = [[MJPropertyKey alloc] init];
subPropertyKey.type = MJPropertyKeyTypeArray;
subPropertyKey.name = cmps[i];
[propertyKeys addObject:subPropertyKey];
}
} else { // 没有索引的key
MJPropertyKey *propertyKey = [[MJPropertyKey alloc] init];
propertyKey.name = oldKey;
[propertyKeys addObject:propertyKey];
}
}
return propertyKeys;
}
/** 对应着字典中的key */
- (void)setOriginKey:(id)originKey forClass:(Class)c
{
if ([originKey isKindOfClass:[NSString class]]) { // 字符串类型的key
NSArray *propertyKeys = [self propertyKeysWithStringKey:originKey];
if (propertyKeys.count) {
[self setPorpertyKeys:@[propertyKeys] forClass:c];
}
} else if ([originKey isKindOfClass:[NSArray class]]) {
NSMutableArray *keyses = [NSMutableArray array];
for (NSString *stringKey in originKey) {
NSArray *propertyKeys = [self propertyKeysWithStringKey:stringKey];
if (propertyKeys.count) {
[keyses addObject:propertyKeys];
}
}
if (keyses.count) {
[self setPorpertyKeys:keyses forClass:c];
}
}
}
/** 对应着字典中的多级key */
- (void)setPorpertyKeys:(NSArray *)propertyKeys forClass:(Class)c
{
if (propertyKeys.count == 0) return;
NSString *key = NSStringFromClass(c);
if (!key) return;
MJ_LOCK(self.propertyKeysLock);
self.propertyKeysDict[key] = propertyKeys;
MJ_UNLOCK(self.propertyKeysLock);
}
- (NSArray *)propertyKeysForClass:(Class)c
{
NSString *key = NSStringFromClass(c);
if (!key) return nil;
MJ_LOCK(self.propertyKeysLock);
NSArray *propertyKeys = self.propertyKeysDict[key];
MJ_UNLOCK(self.propertyKeysLock);
return propertyKeys;
}
/** 模型数组中的模型类型 */
- (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c
{
if (!objectClass) return;
NSString *key = NSStringFromClass(c);
if (!key) return;
MJ_LOCK(self.objectClassInArrayLock);
self.objectClassInArrayDict[key] = objectClass;
MJ_UNLOCK(self.objectClassInArrayLock);
}
- (Class)objectClassInArrayForClass:(Class)c
{
NSString *key = NSStringFromClass(c);
if (!key) return nil;
MJ_LOCK(self.objectClassInArrayLock);
Class objectClass = self.objectClassInArrayDict[key];
MJ_UNLOCK(self.objectClassInArrayLock);
return objectClass;
}
@end
//
// MJPropertyKey.h
// MJExtensionExample
//
// Created by MJ Lee on 15/8/11.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef enum {
MJPropertyKeyTypeDictionary = 0, // 字典的key
MJPropertyKeyTypeArray // 数组的key
} MJPropertyKeyType;
/**
* 属性的key
*/
@interface MJPropertyKey : NSObject
/** key的名字 */
@property (copy, nonatomic) NSString *name;
/** key的种类,可能是@"10",可能是@"age" */
@property (assign, nonatomic) MJPropertyKeyType type;
/**
* 根据当前的key,也就是name,从object(字典或者数组)中取值
*/
- (id)valueInObject:(id)object;
@end
//
// MJPropertyKey.m
// MJExtensionExample
//
// Created by MJ Lee on 15/8/11.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "MJPropertyKey.h"
@implementation MJPropertyKey
- (id)valueInObject:(id)object
{
if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) {
return object[self.name];
} else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) {
NSArray *array = object;
NSUInteger index = self.name.intValue;
if (index < array.count) return array[index];
return nil;
}
return nil;
}
@end
//
// MJPropertyType.h
// MJExtension
//
// Created by mj on 14-1-15.
// Copyright (c) 2014年 小码哥. All rights reserved.
// 包装一种类型
#import <Foundation/Foundation.h>
/**
* 包装一种类型
*/
@interface MJPropertyType : NSObject
/** 类型标识符 */
@property (nonatomic, copy) NSString *code;
/** 是否为id类型 */
@property (nonatomic, readonly, getter=isIdType) BOOL idType;
/** 是否为基本数字类型:int、float等 */
@property (nonatomic, readonly, getter=isNumberType) BOOL numberType;
/** 是否为BOOL类型 */
@property (nonatomic, readonly, getter=isBoolType) BOOL boolType;
/** 对象类型(如果是基本数据类型,此值为nil) */
@property (nonatomic, readonly) Class typeClass;
/** 类型是否来自于Foundation框架,比如NSString、NSArray */
@property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation;
/** 类型是否不支持KVC */
@property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled;
/**
* 获得缓存的类型对象
*/
+ (instancetype)cachedTypeWithCode:(NSString *)code;
@end
\ No newline at end of file
//
// MJPropertyType.m
// MJExtension
//
// Created by mj on 14-1-15.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import "MJPropertyType.h"
#import "MJExtension.h"
#import "MJFoundation.h"
#import "MJExtensionConst.h"
@implementation MJPropertyType
+ (instancetype)cachedTypeWithCode:(NSString *)code
{
MJExtensionAssertParamNotNil2(code, nil);
static NSMutableDictionary *types;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
types = [NSMutableDictionary dictionary];
});
MJPropertyType *type = types[code];
if (type == nil) {
type = [[self alloc] init];
type.code = code;
types[code] = type;
}
return type;
}
#pragma mark - 公共方法
- (void)setCode:(NSString *)code
{
_code = code;
MJExtensionAssertParamNotNil(code);
if ([code isEqualToString:MJPropertyTypeId]) {
_idType = YES;
} else if (code.length == 0) {
_KVCDisabled = YES;
} else if (code.length > 3 && [code hasPrefix:@"@\""]) {
// 去掉@"和",截取中间的类型名称
_code = [code substringWithRange:NSMakeRange(2, code.length - 3)];
_typeClass = NSClassFromString(_code);
_fromFoundation = [MJFoundation isClassFromFoundation:_typeClass];
_numberType = [_typeClass isSubclassOfClass:[NSNumber class]];
} else if ([code isEqualToString:MJPropertyTypeSEL] ||
[code isEqualToString:MJPropertyTypeIvar] ||
[code isEqualToString:MJPropertyTypeMethod]) {
_KVCDisabled = YES;
}
// 是否为数字类型
NSString *lowerCode = _code.lowercaseString;
NSArray *numberTypes = @[MJPropertyTypeInt, MJPropertyTypeShort, MJPropertyTypeBOOL1, MJPropertyTypeBOOL2, MJPropertyTypeFloat, MJPropertyTypeDouble, MJPropertyTypeLong, MJPropertyTypeLongLong, MJPropertyTypeChar];
if ([numberTypes containsObject:lowerCode]) {
_numberType = YES;
if ([lowerCode isEqualToString:MJPropertyTypeBOOL1]
|| [lowerCode isEqualToString:MJPropertyTypeBOOL2]) {
_boolType = YES;
}
}
}
@end
//
// NSObject+MJClass.h
// MJExtensionExample
//
// Created by MJ Lee on 15/8/11.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* 遍历所有类的block(父类)
*/
typedef void (^MJClassesEnumeration)(Class c, BOOL *stop);
/** 这个数组中的属性名才会进行字典和模型的转换 */
typedef NSArray * (^MJAllowedPropertyNames)(void);
/** 这个数组中的属性名才会进行归档 */
typedef NSArray * (^MJAllowedCodingPropertyNames)(void);
/** 这个数组中的属性名将会被忽略:不进行字典和模型的转换 */
typedef NSArray * (^MJIgnoredPropertyNames)(void);
/** 这个数组中的属性名将会被忽略:不进行归档 */
typedef NSArray * (^MJIgnoredCodingPropertyNames)(void);
/**
* 类相关的扩展
*/
@interface NSObject (MJClass)
/**
* 遍历所有的类
*/
+ (void)mj_enumerateClasses:(MJClassesEnumeration)enumeration;
+ (void)mj_enumerateAllClasses:(MJClassesEnumeration)enumeration;
#pragma mark - 属性白名单配置
/**
* 这个数组中的属性名才会进行字典和模型的转换
*
* @param allowedPropertyNames 这个数组中的属性名才会进行字典和模型的转换
*/
+ (void)mj_setupAllowedPropertyNames:(MJAllowedPropertyNames)allowedPropertyNames;
/**
* 这个数组中的属性名才会进行字典和模型的转换
*/
+ (NSMutableArray *)mj_totalAllowedPropertyNames;
#pragma mark - 属性黑名单配置
/**
* 这个数组中的属性名将会被忽略:不进行字典和模型的转换
*
* @param ignoredPropertyNames 这个数组中的属性名将会被忽略:不进行字典和模型的转换
*/
+ (void)mj_setupIgnoredPropertyNames:(MJIgnoredPropertyNames)ignoredPropertyNames;
/**
* 这个数组中的属性名将会被忽略:不进行字典和模型的转换
*/
+ (NSMutableArray *)mj_totalIgnoredPropertyNames;
#pragma mark - 归档属性白名单配置
/**
* 这个数组中的属性名才会进行归档
*
* @param allowedCodingPropertyNames 这个数组中的属性名才会进行归档
*/
+ (void)mj_setupAllowedCodingPropertyNames:(MJAllowedCodingPropertyNames)allowedCodingPropertyNames;
/**
* 这个数组中的属性名才会进行字典和模型的转换
*/
+ (NSMutableArray *)mj_totalAllowedCodingPropertyNames;
#pragma mark - 归档属性黑名单配置
/**
* 这个数组中的属性名将会被忽略:不进行归档
*
* @param ignoredCodingPropertyNames 这个数组中的属性名将会被忽略:不进行归档
*/
+ (void)mj_setupIgnoredCodingPropertyNames:(MJIgnoredCodingPropertyNames)ignoredCodingPropertyNames;
/**
* 这个数组中的属性名将会被忽略:不进行归档
*/
+ (NSMutableArray *)mj_totalIgnoredCodingPropertyNames;
#pragma mark - 内部使用
+ (void)mj_setupBlockReturnValue:(id (^)(void))block key:(const char *)key;
@end
//
// NSObject+MJClass.m
// MJExtensionExample
//
// Created by MJ Lee on 15/8/11.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "NSObject+MJClass.h"
#import "NSObject+MJCoding.h"
#import "NSObject+MJKeyValue.h"
#import "MJFoundation.h"
#import <objc/runtime.h>
static const char MJAllowedPropertyNamesKey = '\0';
static const char MJIgnoredPropertyNamesKey = '\0';
static const char MJAllowedCodingPropertyNamesKey = '\0';
static const char MJIgnoredCodingPropertyNamesKey = '\0';
@implementation NSObject (MJClass)
+ (NSMutableDictionary *)mj_classDictForKey:(const void *)key
{
static NSMutableDictionary *allowedPropertyNamesDict;
static NSMutableDictionary *ignoredPropertyNamesDict;
static NSMutableDictionary *allowedCodingPropertyNamesDict;
static NSMutableDictionary *ignoredCodingPropertyNamesDict;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
allowedPropertyNamesDict = [NSMutableDictionary dictionary];
ignoredPropertyNamesDict = [NSMutableDictionary dictionary];
allowedCodingPropertyNamesDict = [NSMutableDictionary dictionary];
ignoredCodingPropertyNamesDict = [NSMutableDictionary dictionary];
});
if (key == &MJAllowedPropertyNamesKey) return allowedPropertyNamesDict;
if (key == &MJIgnoredPropertyNamesKey) return ignoredPropertyNamesDict;
if (key == &MJAllowedCodingPropertyNamesKey) return allowedCodingPropertyNamesDict;
if (key == &MJIgnoredCodingPropertyNamesKey) return ignoredCodingPropertyNamesDict;
return nil;
}
+ (void)mj_enumerateClasses:(MJClassesEnumeration)enumeration
{
// 1.没有block就直接返回
if (enumeration == nil) return;
// 2.停止遍历的标记
BOOL stop = NO;
// 3.当前正在遍历的类
Class c = self;
// 4.开始遍历每一个类
while (c && !stop) {
// 4.1.执行操作
enumeration(c, &stop);
// 4.2.获得父类
c = class_getSuperclass(c);
if ([MJFoundation isClassFromFoundation:c]) break;
}
}
+ (void)mj_enumerateAllClasses:(MJClassesEnumeration)enumeration
{
// 1.没有block就直接返回
if (enumeration == nil) return;
// 2.停止遍历的标记
BOOL stop = NO;
// 3.当前正在遍历的类
Class c = self;
// 4.开始遍历每一个类
while (c && !stop) {
// 4.1.执行操作
enumeration(c, &stop);
// 4.2.获得父类
c = class_getSuperclass(c);
}
}
#pragma mark - 属性黑名单配置
+ (void)mj_setupIgnoredPropertyNames:(MJIgnoredPropertyNames)ignoredPropertyNames
{
[self mj_setupBlockReturnValue:ignoredPropertyNames key:&MJIgnoredPropertyNamesKey];
}
+ (NSMutableArray *)mj_totalIgnoredPropertyNames
{
return [self mj_totalObjectsWithSelector:@selector(mj_ignoredPropertyNames) key:&MJIgnoredPropertyNamesKey];
}
#pragma mark - 归档属性黑名单配置
+ (void)mj_setupIgnoredCodingPropertyNames:(MJIgnoredCodingPropertyNames)ignoredCodingPropertyNames
{
[self mj_setupBlockReturnValue:ignoredCodingPropertyNames key:&MJIgnoredCodingPropertyNamesKey];
}
+ (NSMutableArray *)mj_totalIgnoredCodingPropertyNames
{
return [self mj_totalObjectsWithSelector:@selector(mj_ignoredCodingPropertyNames) key:&MJIgnoredCodingPropertyNamesKey];
}
#pragma mark - 属性白名单配置
+ (void)mj_setupAllowedPropertyNames:(MJAllowedPropertyNames)allowedPropertyNames;
{
[self mj_setupBlockReturnValue:allowedPropertyNames key:&MJAllowedPropertyNamesKey];
}
+ (NSMutableArray *)mj_totalAllowedPropertyNames
{
return [self mj_totalObjectsWithSelector:@selector(mj_allowedPropertyNames) key:&MJAllowedPropertyNamesKey];
}
#pragma mark - 归档属性白名单配置
+ (void)mj_setupAllowedCodingPropertyNames:(MJAllowedCodingPropertyNames)allowedCodingPropertyNames
{
[self mj_setupBlockReturnValue:allowedCodingPropertyNames key:&MJAllowedCodingPropertyNamesKey];
}
+ (NSMutableArray *)mj_totalAllowedCodingPropertyNames
{
return [self mj_totalObjectsWithSelector:@selector(mj_allowedCodingPropertyNames) key:&MJAllowedCodingPropertyNamesKey];
}
#pragma mark - block和方法处理:存储block的返回值
+ (void)mj_setupBlockReturnValue:(id (^)(void))block key:(const char *)key
{
if (block) {
objc_setAssociatedObject(self, key, block(), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
} else {
objc_setAssociatedObject(self, key, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
// 清空数据
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
[[self mj_classDictForKey:key] removeAllObjects];
MJExtensionSemaphoreSignal
}
+ (NSMutableArray *)mj_totalObjectsWithSelector:(SEL)selector key:(const char *)key
{
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
NSMutableArray *array = [self mj_classDictForKey:key][NSStringFromClass(self)];
if (array == nil) {
// 创建、存储
[self mj_classDictForKey:key][NSStringFromClass(self)] = array = [NSMutableArray array];
if ([self respondsToSelector:selector]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
NSArray *subArray = [self performSelector:selector];
#pragma clang diagnostic pop
if (subArray) {
[array addObjectsFromArray:subArray];
}
}
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
NSArray *subArray = objc_getAssociatedObject(c, key);
[array addObjectsFromArray:subArray];
}];
}
MJExtensionSemaphoreSignal
return array;
}
@end
//
// NSObject+MJCoding.h
// MJExtension
//
// Created by mj on 14-1-15.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MJExtensionConst.h"
/**
* Codeing协议
*/
@protocol MJCoding <NSObject>
@optional
/**
* 这个数组中的属性名才会进行归档
*/
+ (NSArray *)mj_allowedCodingPropertyNames;
/**
* 这个数组中的属性名将会被忽略:不进行归档
*/
+ (NSArray *)mj_ignoredCodingPropertyNames;
@end
@interface NSObject (MJCoding) <MJCoding>
/**
* 解码(从文件中解析对象)
*/
- (void)mj_decode:(NSCoder *)decoder;
/**
* 编码(将对象写入文件中)
*/
- (void)mj_encode:(NSCoder *)encoder;
@end
/**
归档的实现
*/
#define MJCodingImplementation \
- (id)initWithCoder:(NSCoder *)decoder \
{ \
if (self = [super init]) { \
[self mj_decode:decoder]; \
} \
return self; \
} \
\
- (void)encodeWithCoder:(NSCoder *)encoder \
{ \
[self mj_encode:encoder]; \
}
#define MJExtensionCodingImplementation MJCodingImplementation
\ No newline at end of file
//
// NSObject+MJCoding.m
// MJExtension
//
// Created by mj on 14-1-15.
// Copyright (c) 2014年 小码哥. All rights reserved.
//
#import "NSObject+MJCoding.h"
#import "NSObject+MJClass.h"
#import "NSObject+MJProperty.h"
#import "MJProperty.h"
@implementation NSObject (MJCoding)
- (void)mj_encode:(NSCoder *)encoder
{
Class clazz = [self class];
NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames];
NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames];
[clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
// 检测是否被忽略
if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
if ([ignoredCodingPropertyNames containsObject:property.name]) return;
id value = [property valueForObject:self];
if (value == nil) return;
[encoder encodeObject:value forKey:property.name];
}];
}
- (void)mj_decode:(NSCoder *)decoder
{
Class clazz = [self class];
NSArray *allowedCodingPropertyNames = [clazz mj_totalAllowedCodingPropertyNames];
NSArray *ignoredCodingPropertyNames = [clazz mj_totalIgnoredCodingPropertyNames];
[clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
// 检测是否被忽略
if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
if ([ignoredCodingPropertyNames containsObject:property.name]) return;
id value = [decoder decodeObjectForKey:property.name];
if (value == nil) { // 兼容以前的MJExtension版本
value = [decoder decodeObjectForKey:[@"_" stringByAppendingString:property.name]];
}
if (value == nil) return;
[property setValue:value forObject:self];
}];
}
@end
//
// NSObject+MJKeyValue.h
// MJExtension
//
// Created by mj on 13-8-24.
// Copyright (c) 2013年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MJExtensionConst.h"
#import <CoreData/CoreData.h>
#import "MJProperty.h"
/**
* KeyValue协议
*/
@protocol MJKeyValue <NSObject>
@optional
/**
* 只有这个数组中的属性名才允许进行字典和模型的转换
*/
+ (NSArray *)mj_allowedPropertyNames;
/**
* 这个数组中的属性名将会被忽略:不进行字典和模型的转换
*/
+ (NSArray *)mj_ignoredPropertyNames;
/**
* 将属性名换为其他key去字典中取值
*
* @return 字典中的key是属性名,value是从字典中取值用的key
*/
+ (NSDictionary *)mj_replacedKeyFromPropertyName;
/**
* 将属性名换为其他key去字典中取值
*
* @return 从字典中取值用的key
*/
+ (id)mj_replacedKeyFromPropertyName121:(NSString *)propertyName;
/**
* 数组中需要转换的模型类
*
* @return 字典中的key是数组属性名,value是数组中存放模型的Class(Class类型或者NSString类型)
*/
+ (NSDictionary *)mj_objectClassInArray;
/** 特殊地区在字符串格式化数字时使用 */
+ (NSLocale *)mj_numberLocale;
/**
* 旧值换新值,用于过滤字典中的值
*
* @param oldValue 旧值
*
* @return 新值
*/
- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property;
/**
* 当字典转模型完毕时调用
*/
- (void)mj_keyValuesDidFinishConvertingToObject MJExtensionDeprecated("请使用`mj_didConvertToObjectWithKeyValues:`替代");
- (void)mj_keyValuesDidFinishConvertingToObject:(NSDictionary *)keyValues MJExtensionDeprecated("请使用`mj_didConvertToObjectWithKeyValues:`替代");
- (void)mj_didConvertToObjectWithKeyValues:(NSDictionary *)keyValues;
/**
* 当模型转字典完毕时调用
*/
- (void)mj_objectDidFinishConvertingToKeyValues MJExtensionDeprecated("请使用`mj_objectDidConvertToKeyValues:`替代");
- (void)mj_objectDidConvertToKeyValues:(NSDictionary *)keyValues;
@end
@interface NSObject (MJKeyValue) <MJKeyValue>
#pragma mark - 类方法
/**
* 字典转模型过程中遇到的错误
*/
+ (NSError *)mj_error;
/**
* 模型转字典时,字典的key是否参考replacedKeyFromPropertyName等方法(父类设置了,子类也会继承下来)
*/
+ (void)mj_referenceReplacedKeyWhenCreatingKeyValues:(BOOL)reference;
#pragma mark - 对象方法
/**
* 将字典的键值对转成模型属性
* @param keyValues 字典(可以是NSDictionary、NSData、NSString)
*/
- (instancetype)mj_setKeyValues:(id)keyValues;
/**
* 将字典的键值对转成模型属性
* @param keyValues 字典(可以是NSDictionary、NSData、NSString)
* @param context CoreData上下文
*/
- (instancetype)mj_setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context;
/**
* 将模型转成字典
* @return 字典
*/
- (NSMutableDictionary *)mj_keyValues;
- (NSMutableDictionary *)mj_keyValuesWithKeys:(NSArray *)keys;
- (NSMutableDictionary *)mj_keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys;
/**
* 通过模型数组来创建一个字典数组
* @param objectArray 模型数组
* @return 字典数组
*/
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray;
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys;
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray ignoredKeys:(NSArray *)ignoredKeys;
#pragma mark - 字典转模型
/**
* 通过字典来创建一个模型
* @param keyValues 字典(可以是NSDictionary、NSData、NSString)
* @return 新建的对象
*/
+ (instancetype)mj_objectWithKeyValues:(id)keyValues;
/**
* 通过字典来创建一个CoreData模型
* @param keyValues 字典(可以是NSDictionary、NSData、NSString)
* @param context CoreData上下文
* @return 新建的对象
*/
+ (instancetype)mj_objectWithKeyValues:(id)keyValues context:(NSManagedObjectContext *)context;
/**
* 通过plist来创建一个模型
* @param filename 文件名(仅限于mainBundle中的文件)
* @return 新建的对象
*/
+ (instancetype)mj_objectWithFilename:(NSString *)filename;
/**
* 通过plist来创建一个模型
* @param file 文件全路径
* @return 新建的对象
*/
+ (instancetype)mj_objectWithFile:(NSString *)file;
#pragma mark - 字典数组转模型数组
/**
* 通过字典数组来创建一个模型数组
* @param keyValuesArray 字典数组(可以是NSDictionary、NSData、NSString)
* @return 模型数组
*/
+ (NSMutableArray *)mj_objectArrayWithKeyValuesArray:(id)keyValuesArray;
/**
* 通过字典数组来创建一个模型数组
* @param keyValuesArray 字典数组(可以是NSDictionary、NSData、NSString)
* @param context CoreData上下文
* @return 模型数组
*/
+ (NSMutableArray *)mj_objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NSManagedObjectContext *)context;
/**
* 通过plist来创建一个模型数组
* @param filename 文件名(仅限于mainBundle中的文件)
* @return 模型数组
*/
+ (NSMutableArray *)mj_objectArrayWithFilename:(NSString *)filename;
/**
* 通过plist来创建一个模型数组
* @param file 文件全路径
* @return 模型数组
*/
+ (NSMutableArray *)mj_objectArrayWithFile:(NSString *)file;
#pragma mark - 转换为JSON
/**
* 转换为JSON Data
*/
- (NSData *)mj_JSONData;
/**
* 转换为字典或者数组
*/
- (id)mj_JSONObject;
/**
* 转换为JSON 字符串
*/
- (NSString *)mj_JSONString;
@end
//
// NSObject+MJKeyValue.m
// MJExtension
//
// Created by mj on 13-8-24.
// Copyright (c) 2013年 小码哥. All rights reserved.
//
#import "NSObject+MJKeyValue.h"
#import "NSObject+MJProperty.h"
#import "NSString+MJExtension.h"
#import "MJProperty.h"
#import "MJPropertyType.h"
#import "MJExtensionConst.h"
#import "MJFoundation.h"
#import "NSString+MJExtension.h"
#import "NSObject+MJClass.h"
@implementation NSDecimalNumber(MJKeyValue)
- (id)standardValueWithTypeCode:(NSString *)typeCode {
// 由于这里涉及到编译器问题, 暂时保留 Long, 实际上在 64 位系统上, 这 2 个精度范围相同,
// 32 位略有不同, 其余都可使用 Double 进行强转不丢失精度
if ([typeCode isEqualToString:MJPropertyTypeLongLong]) {
return @(self.longLongValue);
} else if ([typeCode isEqualToString:MJPropertyTypeLongLong.uppercaseString]) {
return @(self.unsignedLongLongValue);
} else if ([typeCode isEqualToString:MJPropertyTypeLong]) {
return @(self.longValue);
} else if ([typeCode isEqualToString:MJPropertyTypeLong.uppercaseString]) {
return @(self.unsignedLongValue);
} else {
return @(self.doubleValue);
}
}
@end
@implementation NSObject (MJKeyValue)
#pragma mark - 错误
static const char MJErrorKey = '\0';
+ (NSError *)mj_error
{
return objc_getAssociatedObject(self, &MJErrorKey);
}
+ (void)setMj_error:(NSError *)error
{
objc_setAssociatedObject(self, &MJErrorKey, error, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
#pragma mark - 模型 -> 字典时的参考
/** 模型转字典时,字典的key是否参考replacedKeyFromPropertyName等方法(父类设置了,子类也会继承下来) */
static const char MJReferenceReplacedKeyWhenCreatingKeyValuesKey = '\0';
+ (void)mj_referenceReplacedKeyWhenCreatingKeyValues:(BOOL)reference
{
objc_setAssociatedObject(self, &MJReferenceReplacedKeyWhenCreatingKeyValuesKey, @(reference), OBJC_ASSOCIATION_ASSIGN);
}
+ (BOOL)mj_isReferenceReplacedKeyWhenCreatingKeyValues
{
__block id value = objc_getAssociatedObject(self, &MJReferenceReplacedKeyWhenCreatingKeyValuesKey);
if (!value) {
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
value = objc_getAssociatedObject(c, &MJReferenceReplacedKeyWhenCreatingKeyValuesKey);
if (value) *stop = YES;
}];
}
return [value boolValue];
}
#pragma mark - --常用的对象--
+ (void)load
{
// 默认设置
[self mj_referenceReplacedKeyWhenCreatingKeyValues:YES];
}
#pragma mark - --公共方法--
#pragma mark - 字典 -> 模型
- (instancetype)mj_setKeyValues:(id)keyValues
{
return [self mj_setKeyValues:keyValues context:nil];
}
/**
核心代码:
*/
- (instancetype)mj_setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context
{
// 获得JSON对象
keyValues = [keyValues mj_JSONObject];
MJExtensionAssertError([keyValues isKindOfClass:[NSDictionary class]], self, [self class], @"keyValues参数不是一个字典");
Class clazz = [self class];
NSArray *allowedPropertyNames = [clazz mj_totalAllowedPropertyNames];
NSArray *ignoredPropertyNames = [clazz mj_totalIgnoredPropertyNames];
NSLocale *numberLocale = nil;
if ([self.class respondsToSelector:@selector(mj_numberLocale)]) {
numberLocale = self.class.mj_numberLocale;
}
//通过封装的方法回调一个通过运行时编写的,用于返回属性列表的方法。
[clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
@try {
// 0.检测是否被忽略
if (allowedPropertyNames.count && ![allowedPropertyNames containsObject:property.name]) return;
if ([ignoredPropertyNames containsObject:property.name]) return;
// 1.取出属性值
id value;
NSArray *propertyKeyses = [property propertyKeysForClass:clazz];
for (NSArray *propertyKeys in propertyKeyses) {
value = keyValues;
for (MJPropertyKey *propertyKey in propertyKeys) {
value = [propertyKey valueInObject:value];
}
if (value) break;
}
// 值的过滤
id newValue = [clazz mj_getNewValueFromObject:self oldValue:value property:property];
if (newValue != value) { // 有过滤后的新值
[property setValue:newValue forObject:self];
return;
}
// 如果没有值,就直接返回
if (!value || value == [NSNull null]) return;
// 2.复杂处理
MJPropertyType *type = property.type;
Class propertyClass = type.typeClass;
Class objectClass = [property objectClassInArrayForClass:[self class]];
// 不可变 -> 可变处理
if (propertyClass == [NSMutableArray class] && [value isKindOfClass:[NSArray class]]) {
value = [NSMutableArray arrayWithArray:value];
} else if (propertyClass == [NSMutableDictionary class] && [value isKindOfClass:[NSDictionary class]]) {
value = [NSMutableDictionary dictionaryWithDictionary:value];
} else if (propertyClass == [NSMutableString class] && [value isKindOfClass:[NSString class]]) {
value = [NSMutableString stringWithString:value];
} else if (propertyClass == [NSMutableData class] && [value isKindOfClass:[NSData class]]) {
value = [NSMutableData dataWithData:value];
}
if (!type.isFromFoundation && propertyClass) { // 模型属性
value = [propertyClass mj_objectWithKeyValues:value context:context];
} else if (objectClass) {
if (objectClass == [NSURL class] && [value isKindOfClass:[NSArray class]]) {
// string array -> url array
NSMutableArray *urlArray = [NSMutableArray array];
for (NSString *string in value) {
if (![string isKindOfClass:[NSString class]]) continue;
[urlArray addObject:string.mj_url];
}
value = urlArray;
} else { // 字典数组-->模型数组
value = [objectClass mj_objectArrayWithKeyValuesArray:value context:context];
}
} else if (propertyClass == [NSString class]) {
if ([value isKindOfClass:[NSNumber class]]) {
// NSNumber -> NSString
value = [value description];
} else if ([value isKindOfClass:[NSURL class]]) {
// NSURL -> NSString
value = [value absoluteString];
}
} else if ([value isKindOfClass:[NSString class]]) {
if (propertyClass == [NSURL class]) {
// NSString -> NSURL
// 字符串转码
value = [value mj_url];
} else if (type.isNumberType) {
NSString *oldValue = value;
// NSString -> NSDecimalNumber, 使用 DecimalNumber 来转换数字, 避免丢失精度以及溢出
NSDecimalNumber *decimalValue = [NSDecimalNumber decimalNumberWithString:oldValue
locale:numberLocale];
// 检查特殊情况
if (decimalValue == NSDecimalNumber.notANumber) {
value = @(0);
}else if (propertyClass != [NSDecimalNumber class]) {
value = [decimalValue standardValueWithTypeCode:type.code];
} else {
value = decimalValue;
}
// 如果是BOOL
if (type.isBoolType) {
// 字符串转BOOL(字符串没有charValue方法)
// 系统会调用字符串的charValue转为BOOL类型
NSString *lower = [oldValue lowercaseString];
if ([lower isEqualToString:@"yes"] || [lower isEqualToString:@"true"]) {
value = @YES;
} else if ([lower isEqualToString:@"no"] || [lower isEqualToString:@"false"]) {
value = @NO;
}
}
}
} else if ([value isKindOfClass:[NSNumber class]] && propertyClass == [NSDecimalNumber class]){
// 过滤 NSDecimalNumber类型
if (![value isKindOfClass:[NSDecimalNumber class]]) {
value = [NSDecimalNumber decimalNumberWithDecimal:[((NSNumber *)value) decimalValue]];
}
}
// 经过转换后, 最终检查 value 与 property 是否匹配
if (propertyClass && ![value isKindOfClass:propertyClass]) {
value = nil;
}
// 3.赋值
[property setValue:value forObject:self];
} @catch (NSException *exception) {
MJExtensionBuildError([self class], exception.reason);
MJExtensionLog(@"%@", exception);
}
}];
// 转换完毕
if ([self respondsToSelector:@selector(mj_didConvertToObjectWithKeyValues:)]) {
[self mj_didConvertToObjectWithKeyValues:keyValues];
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-declarations"
if ([self respondsToSelector:@selector(mj_keyValuesDidFinishConvertingToObject)]) {
[self mj_keyValuesDidFinishConvertingToObject];
}
if ([self respondsToSelector:@selector(mj_keyValuesDidFinishConvertingToObject:)]) {
[self mj_keyValuesDidFinishConvertingToObject:keyValues];
}
#pragma clang diagnostic pop
return self;
}
+ (instancetype)mj_objectWithKeyValues:(id)keyValues
{
return [self mj_objectWithKeyValues:keyValues context:nil];
}
+ (instancetype)mj_objectWithKeyValues:(id)keyValues context:(NSManagedObjectContext *)context
{
// 获得JSON对象
keyValues = [keyValues mj_JSONObject];
MJExtensionAssertError([keyValues isKindOfClass:[NSDictionary class]], nil, [self class], @"keyValues参数不是一个字典");
if ([self isSubclassOfClass:[NSManagedObject class]] && context) {
NSString *entityName = [NSStringFromClass(self) componentsSeparatedByString:@"."].lastObject;
return [[NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:context] mj_setKeyValues:keyValues context:context];
}
return [[[self alloc] init] mj_setKeyValues:keyValues];
}
+ (instancetype)mj_objectWithFilename:(NSString *)filename
{
MJExtensionAssertError(filename != nil, nil, [self class], @"filename参数为nil");
return [self mj_objectWithFile:[[NSBundle mainBundle] pathForResource:filename ofType:nil]];
}
+ (instancetype)mj_objectWithFile:(NSString *)file
{
MJExtensionAssertError(file != nil, nil, [self class], @"file参数为nil");
return [self mj_objectWithKeyValues:[NSDictionary dictionaryWithContentsOfFile:file]];
}
#pragma mark - 字典数组 -> 模型数组
+ (NSMutableArray *)mj_objectArrayWithKeyValuesArray:(NSArray *)keyValuesArray
{
return [self mj_objectArrayWithKeyValuesArray:keyValuesArray context:nil];
}
+ (NSMutableArray *)mj_objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NSManagedObjectContext *)context
{
// 如果是JSON字符串
keyValuesArray = [keyValuesArray mj_JSONObject];
// 1.判断真实性
MJExtensionAssertError([keyValuesArray isKindOfClass:[NSArray class]], nil, [self class], @"keyValuesArray参数不是一个数组");
// 如果数组里面放的是NSString、NSNumber等数据
if ([MJFoundation isClassFromFoundation:self]) return [NSMutableArray arrayWithArray:keyValuesArray];
// 2.创建数组
NSMutableArray *modelArray = [NSMutableArray array];
// 3.遍历
for (NSDictionary *keyValues in keyValuesArray) {
if ([keyValues isKindOfClass:[NSArray class]]){
[modelArray addObject:[self mj_objectArrayWithKeyValuesArray:keyValues context:context]];
} else {
id model = [self mj_objectWithKeyValues:keyValues context:context];
if (model) [modelArray addObject:model];
}
}
return modelArray;
}
+ (NSMutableArray *)mj_objectArrayWithFilename:(NSString *)filename
{
MJExtensionAssertError(filename != nil, nil, [self class], @"filename参数为nil");
return [self mj_objectArrayWithFile:[[NSBundle mainBundle] pathForResource:filename ofType:nil]];
}
+ (NSMutableArray *)mj_objectArrayWithFile:(NSString *)file
{
MJExtensionAssertError(file != nil, nil, [self class], @"file参数为nil");
return [self mj_objectArrayWithKeyValuesArray:[NSArray arrayWithContentsOfFile:file]];
}
#pragma mark - 模型 -> 字典
- (NSMutableDictionary *)mj_keyValues
{
return [self mj_keyValuesWithKeys:nil ignoredKeys:nil];
}
- (NSMutableDictionary *)mj_keyValuesWithKeys:(NSArray *)keys
{
return [self mj_keyValuesWithKeys:keys ignoredKeys:nil];
}
- (NSMutableDictionary *)mj_keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys
{
return [self mj_keyValuesWithKeys:nil ignoredKeys:ignoredKeys];
}
- (NSMutableDictionary *)mj_keyValuesWithKeys:(NSArray *)keys ignoredKeys:(NSArray *)ignoredKeys
{
// 如果自己不是模型类, 那就返回自己
// 模型类过滤掉 NSNull
// 唯一一个不返回自己的
if ([self isMemberOfClass:NSNull.class]) { return nil; }
// 这里虽然返回了自己, 但是其实是有报错信息的.
// TODO: 报错机制不好, 需要重做
MJExtensionAssertError(![MJFoundation isClassFromFoundation:[self class]], (NSMutableDictionary *)self, [self class], @"不是自定义的模型类")
id keyValues = [NSMutableDictionary dictionary];
Class clazz = [self class];
NSArray *allowedPropertyNames = [clazz mj_totalAllowedPropertyNames];
NSArray *ignoredPropertyNames = [clazz mj_totalIgnoredPropertyNames];
[clazz mj_enumerateProperties:^(MJProperty *property, BOOL *stop) {
@try {
// 0.检测是否被忽略
if (allowedPropertyNames.count && ![allowedPropertyNames containsObject:property.name]) return;
if ([ignoredPropertyNames containsObject:property.name]) return;
if (keys.count && ![keys containsObject:property.name]) return;
if ([ignoredKeys containsObject:property.name]) return;
// 1.取出属性值
id value = [property valueForObject:self];
if (!value) return;
// 2.如果是模型属性
MJPropertyType *type = property.type;
Class propertyClass = type.typeClass;
if (!type.isFromFoundation && propertyClass) {
value = [value mj_keyValues];
} else if ([value isKindOfClass:[NSArray class]]) {
// 3.处理数组里面有模型的情况
value = [NSObject mj_keyValuesArrayWithObjectArray:value];
} else if (propertyClass == [NSURL class]) {
value = [value absoluteString];
}
// 4.赋值
if ([clazz mj_isReferenceReplacedKeyWhenCreatingKeyValues]) {
NSArray *propertyKeys = [[property propertyKeysForClass:clazz] firstObject];
NSUInteger keyCount = propertyKeys.count;
// 创建字典
__block id innerContainer = keyValues;
[propertyKeys enumerateObjectsUsingBlock:^(MJPropertyKey *propertyKey, NSUInteger idx, BOOL *stop) {
// 下一个属性
MJPropertyKey *nextPropertyKey = nil;
if (idx != keyCount - 1) {
nextPropertyKey = propertyKeys[idx + 1];
}
if (nextPropertyKey) { // 不是最后一个key
// 当前propertyKey对应的字典或者数组
id tempInnerContainer = [propertyKey valueInObject:innerContainer];
if (tempInnerContainer == nil || [tempInnerContainer isKindOfClass:[NSNull class]]) {
if (nextPropertyKey.type == MJPropertyKeyTypeDictionary) {
tempInnerContainer = [NSMutableDictionary dictionary];
} else {
tempInnerContainer = [NSMutableArray array];
}
if (propertyKey.type == MJPropertyKeyTypeDictionary) {
innerContainer[propertyKey.name] = tempInnerContainer;
} else {
innerContainer[propertyKey.name.intValue] = tempInnerContainer;
}
}
if ([tempInnerContainer isKindOfClass:[NSMutableArray class]]) {
NSMutableArray *tempInnerContainerArray = tempInnerContainer;
int index = nextPropertyKey.name.intValue;
while (tempInnerContainerArray.count < index + 1) {
[tempInnerContainerArray addObject:[NSNull null]];
}
}
innerContainer = tempInnerContainer;
} else { // 最后一个key
if (propertyKey.type == MJPropertyKeyTypeDictionary) {
innerContainer[propertyKey.name] = value;
} else {
innerContainer[propertyKey.name.intValue] = value;
}
}
}];
} else {
keyValues[property.name] = value;
}
} @catch (NSException *exception) {
MJExtensionBuildError([self class], exception.reason);
MJExtensionLog(@"%@", exception);
}
}];
// 转换完毕
if ([self respondsToSelector:@selector(mj_objectDidConvertToKeyValues:)]) {
[self mj_objectDidConvertToKeyValues:keyValues];
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-declarations"
if ([self respondsToSelector:@selector(mj_objectDidFinishConvertingToKeyValues)]) {
[self mj_objectDidFinishConvertingToKeyValues];
}
#pragma clang diagnostic pop
return keyValues;
}
#pragma mark - 模型数组 -> 字典数组
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray
{
return [self mj_keyValuesArrayWithObjectArray:objectArray keys:nil ignoredKeys:nil];
}
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys
{
return [self mj_keyValuesArrayWithObjectArray:objectArray keys:keys ignoredKeys:nil];
}
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray ignoredKeys:(NSArray *)ignoredKeys
{
return [self mj_keyValuesArrayWithObjectArray:objectArray keys:nil ignoredKeys:ignoredKeys];
}
+ (NSMutableArray *)mj_keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys ignoredKeys:(NSArray *)ignoredKeys
{
// 0.判断真实性
MJExtensionAssertError([objectArray isKindOfClass:[NSArray class]], nil, [self class], @"objectArray参数不是一个数组");
// 1.创建数组
NSMutableArray *keyValuesArray = [NSMutableArray array];
for (id object in objectArray) {
if (keys) {
id convertedObj = [object mj_keyValuesWithKeys:keys];
if (!convertedObj) { continue; }
[keyValuesArray addObject:convertedObj];
} else {
id convertedObj = [object mj_keyValuesWithIgnoredKeys:ignoredKeys];
if (!convertedObj) { continue; }
[keyValuesArray addObject:convertedObj];
}
}
return keyValuesArray;
}
#pragma mark - 转换为JSON
- (NSData *)mj_JSONData
{
if ([self isKindOfClass:[NSString class]]) {
return [((NSString *)self) dataUsingEncoding:NSUTF8StringEncoding];
} else if ([self isKindOfClass:[NSData class]]) {
return (NSData *)self;
}
return [NSJSONSerialization dataWithJSONObject:[self mj_JSONObject] options:kNilOptions error:nil];
}
- (id)mj_JSONObject
{
if ([self isKindOfClass:[NSString class]]) {
return [NSJSONSerialization JSONObjectWithData:[((NSString *)self) dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:nil];
} else if ([self isKindOfClass:[NSData class]]) {
return [NSJSONSerialization JSONObjectWithData:(NSData *)self options:kNilOptions error:nil];
}
return self.mj_keyValues;
}
- (NSString *)mj_JSONString
{
if ([self isKindOfClass:[NSString class]]) {
return (NSString *)self;
} else if ([self isKindOfClass:[NSData class]]) {
return [[NSString alloc] initWithData:(NSData *)self encoding:NSUTF8StringEncoding];
}
return [[NSString alloc] initWithData:[self mj_JSONData] encoding:NSUTF8StringEncoding];
}
@end
//
// NSObject+MJProperty.h
// MJExtensionExample
//
// Created by MJ Lee on 15/4/17.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MJExtensionConst.h"
@class MJProperty;
/**
* 遍历成员变量用的block
*
* @param property 成员的包装对象
* @param stop YES代表停止遍历,NO代表继续遍历
*/
typedef void (^MJPropertiesEnumeration)(MJProperty *property, BOOL *stop);
/** 将属性名换为其他key去字典中取值 */
typedef NSDictionary * (^MJReplacedKeyFromPropertyName)(void);
typedef id (^MJReplacedKeyFromPropertyName121)(NSString *propertyName);
/** 数组中需要转换的模型类 */
typedef NSDictionary * (^MJObjectClassInArray)(void);
/** 用于过滤字典中的值 */
typedef id (^MJNewValueFromOldValue)(id object, id oldValue, MJProperty *property);
/**
* 成员属性相关的扩展
*/
@interface NSObject (MJProperty)
#pragma mark - 遍历
/**
* 遍历所有的成员
*/
+ (void)mj_enumerateProperties:(MJPropertiesEnumeration)enumeration;
#pragma mark - 新值配置
/**
* 用于过滤字典中的值
*
* @param newValueFormOldValue 用于过滤字典中的值
*/
+ (void)mj_setupNewValueFromOldValue:(MJNewValueFromOldValue)newValueFormOldValue;
+ (id)mj_getNewValueFromObject:(__unsafe_unretained id)object oldValue:(__unsafe_unretained id)oldValue property:(__unsafe_unretained MJProperty *)property;
#pragma mark - key配置
/**
* 将属性名换为其他key去字典中取值
*
* @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值
*/
+ (void)mj_setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)replacedKeyFromPropertyName;
/**
* 将属性名换为其他key去字典中取值
*
* @param replacedKeyFromPropertyName121 将属性名换为其他key去字典中取值
*/
+ (void)mj_setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121;
#pragma mark - array model class配置
/**
* 数组中需要转换的模型类
*
* @param objectClassInArray 数组中需要转换的模型类
*/
+ (void)mj_setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray;
@end
//
// NSObject+MJProperty.m
// MJExtensionExample
//
// Created by MJ Lee on 15/4/17.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "NSObject+MJProperty.h"
#import "NSObject+MJKeyValue.h"
#import "NSObject+MJCoding.h"
#import "NSObject+MJClass.h"
#import "MJProperty.h"
#import "MJFoundation.h"
#import <objc/runtime.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
static const char MJReplacedKeyFromPropertyNameKey = '\0';
static const char MJReplacedKeyFromPropertyName121Key = '\0';
static const char MJNewValueFromOldValueKey = '\0';
static const char MJObjectClassInArrayKey = '\0';
static const char MJCachedPropertiesKey = '\0';
@implementation NSObject (Property)
+ (NSMutableDictionary *)mj_propertyDictForKey:(const void *)key
{
static NSMutableDictionary *replacedKeyFromPropertyNameDict;
static NSMutableDictionary *replacedKeyFromPropertyName121Dict;
static NSMutableDictionary *newValueFromOldValueDict;
static NSMutableDictionary *objectClassInArrayDict;
static NSMutableDictionary *cachedPropertiesDict;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
replacedKeyFromPropertyNameDict = [NSMutableDictionary dictionary];
replacedKeyFromPropertyName121Dict = [NSMutableDictionary dictionary];
newValueFromOldValueDict = [NSMutableDictionary dictionary];
objectClassInArrayDict = [NSMutableDictionary dictionary];
cachedPropertiesDict = [NSMutableDictionary dictionary];
});
if (key == &MJReplacedKeyFromPropertyNameKey) return replacedKeyFromPropertyNameDict;
if (key == &MJReplacedKeyFromPropertyName121Key) return replacedKeyFromPropertyName121Dict;
if (key == &MJNewValueFromOldValueKey) return newValueFromOldValueDict;
if (key == &MJObjectClassInArrayKey) return objectClassInArrayDict;
if (key == &MJCachedPropertiesKey) return cachedPropertiesDict;
return nil;
}
#pragma mark - --私有方法--
+ (id)mj_propertyKey:(NSString *)propertyName
{
MJExtensionAssertParamNotNil2(propertyName, nil);
__block id key = nil;
// 查看有没有需要替换的key
if ([self respondsToSelector:@selector(mj_replacedKeyFromPropertyName121:)]) {
key = [self mj_replacedKeyFromPropertyName121:propertyName];
}
// 调用block
if (!key) {
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
MJReplacedKeyFromPropertyName121 block = objc_getAssociatedObject(c, &MJReplacedKeyFromPropertyName121Key);
if (block) {
key = block(propertyName);
}
if (key) *stop = YES;
}];
}
// 查看有没有需要替换的key
if ((!key || [key isEqual:propertyName]) && [self respondsToSelector:@selector(mj_replacedKeyFromPropertyName)]) {
key = [self mj_replacedKeyFromPropertyName][propertyName];
}
if (!key || [key isEqual:propertyName]) {
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
NSDictionary *dict = objc_getAssociatedObject(c, &MJReplacedKeyFromPropertyNameKey);
if (dict) {
key = dict[propertyName];
}
if (key && ![key isEqual:propertyName]) *stop = YES;
}];
}
// 2.用属性名作为key
if (!key) key = propertyName;
return key;
}
+ (Class)mj_propertyObjectClassInArray:(NSString *)propertyName
{
__block id clazz = nil;
if ([self respondsToSelector:@selector(mj_objectClassInArray)]) {
clazz = [self mj_objectClassInArray][propertyName];
}
if (!clazz) {
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
NSDictionary *dict = objc_getAssociatedObject(c, &MJObjectClassInArrayKey);
if (dict) {
clazz = dict[propertyName];
}
if (clazz) *stop = YES;
}];
}
// 如果是NSString类型
if ([clazz isKindOfClass:[NSString class]]) {
clazz = NSClassFromString(clazz);
}
return clazz;
}
#pragma mark - --公共方法--
+ (void)mj_enumerateProperties:(MJPropertiesEnumeration)enumeration
{
// 获得成员变量
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
NSArray *cachedProperties = [self mj_properties];
MJExtensionSemaphoreSignal
// 遍历成员变量
BOOL stop = NO;
for (MJProperty *property in cachedProperties) {
enumeration(property, &stop);
if (stop) break;
}
}
#pragma mark - 公共方法
+ (NSMutableArray *)mj_properties
{
NSMutableArray *cachedProperties = [self mj_propertyDictForKey:&MJCachedPropertiesKey][NSStringFromClass(self)];
if (cachedProperties == nil) {
if (cachedProperties == nil) {
cachedProperties = [NSMutableArray array];
[self mj_enumerateClasses:^(__unsafe_unretained Class c, BOOL *stop) {
// 1.获得所有的成员变量
unsigned int outCount = 0;
objc_property_t *properties = class_copyPropertyList(c, &outCount);
// 2.遍历每一个成员变量
for (unsigned int i = 0; i<outCount; i++) {
MJProperty *property = [MJProperty cachedPropertyWithProperty:properties[i]];
// 过滤掉Foundation框架类里面的属性
if ([MJFoundation isClassFromFoundation:property.srcClass]) continue;
// 过滤掉`hash`, `superclass`, `description`, `debugDescription`
if ([MJFoundation isFromNSObjectProtocolProperty:property.name]) continue;
property.srcClass = c;
[property setOriginKey:[self mj_propertyKey:property.name] forClass:self];
[property setObjectClassInArray:[self mj_propertyObjectClassInArray:property.name] forClass:self];
[cachedProperties addObject:property];
}
// 3.释放内存
free(properties);
}];
[self mj_propertyDictForKey:&MJCachedPropertiesKey][NSStringFromClass(self)] = cachedProperties;
}
}
return cachedProperties;
}
#pragma mark - 新值配置
+ (void)mj_setupNewValueFromOldValue:(MJNewValueFromOldValue)newValueFormOldValue
{
objc_setAssociatedObject(self, &MJNewValueFromOldValueKey, newValueFormOldValue, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
+ (id)mj_getNewValueFromObject:(__unsafe_unretained id)object oldValue:(__unsafe_unretained id)oldValue property:(MJProperty *__unsafe_unretained)property{
// 如果有实现方法
if ([object respondsToSelector:@selector(mj_newValueFromOldValue:property:)]) {
return [object mj_newValueFromOldValue:oldValue property:property];
}
// 查看静态设置
__block id newValue = oldValue;
[self mj_enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
MJNewValueFromOldValue block = objc_getAssociatedObject(c, &MJNewValueFromOldValueKey);
if (block) {
newValue = block(object, oldValue, property);
*stop = YES;
}
}];
return newValue;
}
#pragma mark - array model class配置
+ (void)mj_setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray
{
[self mj_setupBlockReturnValue:objectClassInArray key:&MJObjectClassInArrayKey];
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
[[self mj_propertyDictForKey:&MJCachedPropertiesKey] removeAllObjects];
MJExtensionSemaphoreSignal
}
#pragma mark - key配置
+ (void)mj_setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)replacedKeyFromPropertyName
{
[self mj_setupBlockReturnValue:replacedKeyFromPropertyName key:&MJReplacedKeyFromPropertyNameKey];
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
[[self mj_propertyDictForKey:&MJCachedPropertiesKey] removeAllObjects];
MJExtensionSemaphoreSignal
}
+ (void)mj_setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121
{
objc_setAssociatedObject(self, &MJReplacedKeyFromPropertyName121Key, replacedKeyFromPropertyName121, OBJC_ASSOCIATION_COPY_NONATOMIC);
MJExtensionSemaphoreCreate
MJExtensionSemaphoreWait
[[self mj_propertyDictForKey:&MJCachedPropertiesKey] removeAllObjects];
MJExtensionSemaphoreSignal
}
@end
#pragma clang diagnostic pop
//
// NSString+MJExtension.h
// MJExtensionExample
//
// Created by MJ Lee on 15/6/7.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MJExtensionConst.h"
@interface NSString (MJExtension)
/**
* 驼峰转下划线(loveYou -> love_you)
*/
- (NSString *)mj_underlineFromCamel;
/**
* 下划线转驼峰(love_you -> loveYou)
*/
- (NSString *)mj_camelFromUnderline;
/**
* 首字母变大写
*/
- (NSString *)mj_firstCharUpper;
/**
* 首字母变小写
*/
- (NSString *)mj_firstCharLower;
- (BOOL)mj_isPureInt;
- (NSURL *)mj_url;
@end
//
// NSString+MJExtension.m
// MJExtensionExample
//
// Created by MJ Lee on 15/6/7.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "NSString+MJExtension.h"
@implementation NSString (MJExtension)
- (NSString *)mj_underlineFromCamel
{
if (self.length == 0) return self;
NSMutableString *string = [NSMutableString string];
for (NSUInteger i = 0; i<self.length; i++) {
unichar c = [self characterAtIndex:i];
NSString *cString = [NSString stringWithFormat:@"%c", c];
NSString *cStringLower = [cString lowercaseString];
if ([cString isEqualToString:cStringLower]) {
[string appendString:cStringLower];
} else {
[string appendString:@"_"];
[string appendString:cStringLower];
}
}
return string;
}
- (NSString *)mj_camelFromUnderline
{
if (self.length == 0) return self;
NSMutableString *string = [NSMutableString string];
NSArray *cmps = [self componentsSeparatedByString:@"_"];
for (NSUInteger i = 0; i<cmps.count; i++) {
NSString *cmp = cmps[i];
if (i && cmp.length) {
[string appendString:[NSString stringWithFormat:@"%c", [cmp characterAtIndex:0]].uppercaseString];
if (cmp.length >= 2) [string appendString:[cmp substringFromIndex:1]];
} else {
[string appendString:cmp];
}
}
return string;
}
- (NSString *)mj_firstCharLower
{
if (self.length == 0) return self;
NSMutableString *string = [NSMutableString string];
[string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].lowercaseString];
if (self.length >= 2) [string appendString:[self substringFromIndex:1]];
return string;
}
- (NSString *)mj_firstCharUpper
{
if (self.length == 0) return self;
NSMutableString *string = [NSMutableString string];
[string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].uppercaseString];
if (self.length >= 2) [string appendString:[self substringFromIndex:1]];
return string;
}
- (BOOL)mj_isPureInt
{
NSScanner *scan = [NSScanner scannerWithString:self];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
- (NSURL *)mj_url
{
// [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"!$&'()*+,-./:;=?@_~%#[]"]];
#pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-declarations"
return [NSURL URLWithString:(NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL,kCFStringEncodingUTF8))];
#pragma clang diagnostic pop
}
@end
MJExtension
===
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
![podversion](https://img.shields.io/cocoapods/v/MJExtension.svg)
- A fast, convenient and nonintrusive conversion framework between JSON and model.
- 转换速度快、使用简单方便的字典转模型框架
## ‼️ 纯Swift版的JSON与Model转换框架已经开源上架 ‼️
- [KakaJSON](https://github.com/kakaopensource/KakaJSON)
- [中文教程](https://www.cnblogs.com/mjios/p/11352776.html)
- 如果你的项目是用Swift写的Model,墙裂推荐使用[KakaJSON](https://github.com/kakaopensource/KakaJSON)
- 已经对各种常用的数据场景进行了大量的单元测试
- 简单易用、功能丰富、转换快速
## 关于在Swift中使用MJExtension ‼️
### ‼️ 在 Swift4 之后, 请在属性前加 `@objc` 修饰. 以保证 Swift 的属性能够暴露给 Objc 使用. ‼️
### ‼️ 请勿使用 `Bool` 类型, 因为在 Swift 中并没有桥接该类型, 不能显式的对应 `BOOL`, 请使用 `NSNumber` 替代 ‼️
## Contents
* [Getting Started 【开始使用】](#Getting_Started)
* [Features 【能做什么】](#Features)
* [Installation 【安装】](#Installation)
* [Examples 【示例】](#Examples)
* [JSON -> Model](#JSON_Model)
* [JSONString -> Model](#JSONString_Model)
* [Model contains model](#Model_contains_model)
* [Model contains model-array](#Model_contains_model_array)
* [Model name - JSON key mapping](#Model_name_JSON_key_mapping)
* [JSON array -> model array](#JSON_array_model_array)
* [Model -> JSON](#Model_JSON)
* [Model array -> JSON array](#Model_array_JSON_array)
* [Core Data](#Core_Data)
* [Coding](#Coding)
* [Camel -> underline](#Camel_underline)
* [NSString -> NSDate, nil -> @""](#NSString_NSDate)
* [More use cases](#More_use_cases)
---
# <a id="Getting_Started"></a> Getting Started【开始使用】
## <a id="Features"></a> Features【能做什么】
- MJExtension是一套字典和模型之间互相转换的超轻量级框架
* `JSON` --> `Model``Core Data Model`
* `JSONString` --> `Model``Core Data Model`
* `Model``Core Data Model` --> `JSON`
* `JSON Array` --> `Model Array``Core Data Model Array`
* `JSONString` --> `Model Array``Core Data Model Array`
* `Model Array``Core Data Model Array` --> `JSON Array`
* Coding all properties of a model with only one line of code.
* 只需要一行代码,就能实现模型的所有属性进行Coding(归档和解档)
## <a id="Installation"></a> Installation【安装】
### From CocoaPods【使用CocoaPods】
```ruby
pod 'MJExtension'
```
### Manually【手动导入】
- Drag all source files under folder `MJExtension` to your project.【将`MJExtension`文件夹中的所有源代码拽入项目中】
- Import the main header file:`#import "MJExtension.h"`【导入主头文件:`#import "MJExtension.h"`
```objc
MJExtension.h
MJConst.h MJConst.m
MJFoundation.h MJFoundation.m
MJProperty.h MJProperty.m
MJType.h MJType.m
NSObject+MJCoding.h NSObject+MJCoding.m
NSObject+MJProperty.h NSObject+MJProperty.m
NSObject+MJKeyValue.h NSObject+MJKeyValue.m
```
# <a id="Examples"></a> Examples【示例】
### <a id="JSON_Model"></a> The most simple JSON -> Model【最简单的字典转模型】
```objc
typedef enum {
SexMale,
SexFemale
} Sex;
@interface User : NSObject
@property (copy, nonatomic) NSString *name;
@property (copy, nonatomic) NSString *icon;
@property (assign, nonatomic) unsigned int age;
@property (copy, nonatomic) NSString *height;
@property (strong, nonatomic) NSNumber *money;
@property (assign, nonatomic) Sex sex;
@property (assign, nonatomic, getter=isGay) BOOL gay;
@end
/***********************************************/
NSDictionary *dict = @{
@"name" : @"Jack",
@"icon" : @"lufy.png",
@"age" : @20,
@"height" : @"1.55",
@"money" : @100.9,
@"sex" : @(SexFemale),
@"gay" : @"true"
// @"gay" : @"1"
// @"gay" : @"NO"
};
// JSON -> User
User *user = [User mj_objectWithKeyValues:dict];
NSLog(@"name=%@, icon=%@, age=%zd, height=%@, money=%@, sex=%d, gay=%d", user.name, user.icon, user.age, user.height, user.money, user.sex, user.gay);
// name=Jack, icon=lufy.png, age=20, height=1.550000, money=100.9, sex=1
```
### <a id="JSONString_Model"></a> JSONString -> Model【JSON字符串转模型】
```objc
// 1.Define a JSONString
NSString *jsonString = @"{\"name\":\"Jack\", \"icon\":\"lufy.png\", \"age\":20}";
// 2.JSONString -> User
User *user = [User mj_objectWithKeyValues:jsonString];
// 3.Print user's properties
NSLog(@"name=%@, icon=%@, age=%d", user.name, user.icon, user.age);
// name=Jack, icon=lufy.png, age=20
```
### <a id="Model_contains_model"></a> Model contains model【模型中嵌套模型】
```objc
@interface Status : NSObject
@property (copy, nonatomic) NSString *text;
@property (strong, nonatomic) User *user;
@property (strong, nonatomic) Status *retweetedStatus;
@end
/***********************************************/
NSDictionary *dict = @{
@"text" : @"Agree!Nice weather!",
@"user" : @{
@"name" : @"Jack",
@"icon" : @"lufy.png"
},
@"retweetedStatus" : @{
@"text" : @"Nice weather!",
@"user" : @{
@"name" : @"Rose",
@"icon" : @"nami.png"
}
}
};
// JSON -> Status
Status *status = [Status mj_objectWithKeyValues:dict];
NSString *text = status.text;
NSString *name = status.user.name;
NSString *icon = status.user.icon;
NSLog(@"text=%@, name=%@, icon=%@", text, name, icon);
// text=Agree!Nice weather!, name=Jack, icon=lufy.png
NSString *text2 = status.retweetedStatus.text;
NSString *name2 = status.retweetedStatus.user.name;
NSString *icon2 = status.retweetedStatus.user.icon;
NSLog(@"text2=%@, name2=%@, icon2=%@", text2, name2, icon2);
// text2=Nice weather!, name2=Rose, icon2=nami.png
```
### <a id="Model_contains_model_array"></a> Model contains model-array【模型中有个数组属性,数组里面又要装着其他模型】
```objc
@interface Ad : NSObject
@property (copy, nonatomic) NSString *image;
@property (copy, nonatomic) NSString *url;
@end
@interface StatusResult : NSObject
/** Contatins status model */
@property (strong, nonatomic) NSMutableArray *statuses;
/** Contatins ad model */
@property (strong, nonatomic) NSArray *ads;
@property (strong, nonatomic) NSNumber *totalNumber;
@end
/***********************************************/
// Tell MJExtension what type of model will be contained in statuses and ads.
[StatusResult mj_setupObjectClassInArray:^NSDictionary *{
return @{
@"statuses" : @"Status",
// @"statuses" : [Status class],
@"ads" : @"Ad"
// @"ads" : [Ad class]
};
}];
// Equals: StatusResult.m implements +mj_objectClassInArray method.
NSDictionary *dict = @{
@"statuses" : @[
@{
@"text" : @"Nice weather!",
@"user" : @{
@"name" : @"Rose",
@"icon" : @"nami.png"
}
},
@{
@"text" : @"Go camping tomorrow!",
@"user" : @{
@"name" : @"Jack",
@"icon" : @"lufy.png"
}
}
],
@"ads" : @[
@{
@"image" : @"ad01.png",
@"url" : @"http://www.ad01.com"
},
@{
@"image" : @"ad02.png",
@"url" : @"http://www.ad02.com"
}
],
@"totalNumber" : @"2014"
};
// JSON -> StatusResult
StatusResult *result = [StatusResult mj_objectWithKeyValues:dict];
NSLog(@"totalNumber=%@", result.totalNumber);
// totalNumber=2014
// Printing
for (Status *status in result.statuses) {
NSString *text = status.text;
NSString *name = status.user.name;
NSString *icon = status.user.icon;
NSLog(@"text=%@, name=%@, icon=%@", text, name, icon);
}
// text=Nice weather!, name=Rose, icon=nami.png
// text=Go camping tomorrow!, name=Jack, icon=lufy.png
// Printing
for (Ad *ad in result.ads) {
NSLog(@"image=%@, url=%@", ad.image, ad.url);
}
// image=ad01.png, url=http://www.ad01.com
// image=ad02.png, url=http://www.ad02.com
```
### <a id="Model_name_JSON_key_mapping"></a> Model name - JSON key mapping【模型中的属性名和字典中的key不相同(或者需要多级映射)】
```objc
@interface Bag : NSObject
@property (copy, nonatomic) NSString *name;
@property (assign, nonatomic) double price;
@end
@interface Student : NSObject
@property (copy, nonatomic) NSString *ID;
@property (copy, nonatomic) NSString *desc;
@property (copy, nonatomic) NSString *nowName;
@property (copy, nonatomic) NSString *oldName;
@property (copy, nonatomic) NSString *nameChangedTime;
@property (strong, nonatomic) Bag *bag;
@end
/***********************************************/
// How to map
[Student mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
return @{
@"ID" : @"id",
@"desc" : @"description",
@"oldName" : @"name.oldName",
@"nowName" : @"name.newName",
@"nameChangedTime" : @"name.info[1].nameChangedTime",
@"bag" : @"other.bag"
};
}];
// Equals: Student.m implements +mj_replacedKeyFromPropertyName method.
NSDictionary *dict = @{
@"id" : @"20",
@"description" : @"kids",
@"name" : @{
@"newName" : @"lufy",
@"oldName" : @"kitty",
@"info" : @[
@"test-data",
@{
@"nameChangedTime" : @"2013-08"
}
]
},
@"other" : @{
@"bag" : @{
@"name" : @"a red bag",
@"price" : @100.7
}
}
};
// JSON -> Student
Student *stu = [Student mj_objectWithKeyValues:dict];
// Printing
NSLog(@"ID=%@, desc=%@, oldName=%@, nowName=%@, nameChangedTime=%@",
stu.ID, stu.desc, stu.oldName, stu.nowName, stu.nameChangedTime);
// ID=20, desc=kids, oldName=kitty, nowName=lufy, nameChangedTime=2013-08
NSLog(@"bagName=%@, bagPrice=%f", stu.bag.name, stu.bag.price);
// bagName=a red bag, bagPrice=100.700000
```
### <a id="JSON_array_model_array"></a> JSON array -> model array【将一个字典数组转成模型数组】
```objc
NSArray *dictArray = @[
@{
@"name" : @"Jack",
@"icon" : @"lufy.png"
},
@{
@"name" : @"Rose",
@"icon" : @"nami.png"
}
];
// JSON array -> User array
NSArray *userArray = [User mj_objectArrayWithKeyValuesArray:dictArray];
// Printing
for (User *user in userArray) {
NSLog(@"name=%@, icon=%@", user.name, user.icon);
}
// name=Jack, icon=lufy.png
// name=Rose, icon=nami.png
```
### <a id="Model_JSON"></a> Model -> JSON【将一个模型转成字典】
```objc
// New model
User *user = [[User alloc] init];
user.name = @"Jack";
user.icon = @"lufy.png";
Status *status = [[Status alloc] init];
status.user = user;
status.text = @"Nice mood!";
// Status -> JSON
NSDictionary *statusDict = status.mj_keyValues;
NSLog(@"%@", statusDict);
/*
{
text = "Nice mood!";
user = {
icon = "lufy.png";
name = Jack;
};
}
*/
// More complex situation
Student *stu = [[Student alloc] init];
stu.ID = @"123";
stu.oldName = @"rose";
stu.nowName = @"jack";
stu.desc = @"handsome";
stu.nameChangedTime = @"2018-09-08";
Bag *bag = [[Bag alloc] init];
bag.name = @"a red bag";
bag.price = 205;
stu.bag = bag;
NSDictionary *stuDict = stu.mj_keyValues;
NSLog(@"%@", stuDict);
/*
{
ID = 123;
bag = {
name = "\U5c0f\U4e66\U5305";
price = 205;
};
desc = handsome;
nameChangedTime = "2018-09-08";
nowName = jack;
oldName = rose;
}
*/
```
### <a id="Model_array_JSON_array"></a> Model array -> JSON array【将一个模型数组转成字典数组】
```objc
// New model array
User *user1 = [[User alloc] init];
user1.name = @"Jack";
user1.icon = @"lufy.png";
User *user2 = [[User alloc] init];
user2.name = @"Rose";
user2.icon = @"nami.png";
NSArray *userArray = @[user1, user2];
// Model array -> JSON array
NSArray *dictArray = [User mj_keyValuesArrayWithObjectArray:userArray];
NSLog(@"%@", dictArray);
/*
(
{
icon = "lufy.png";
name = Jack;
},
{
icon = "nami.png";
name = Rose;
}
)
*/
```
### <a id="Core_Data"></a> Core Data
```objc
NSDictionary *dict = @{
@"name" : @"Jack",
@"icon" : @"lufy.png",
@"age" : @20,
@"height" : @1.55,
@"money" : @"100.9",
@"sex" : @(SexFemale),
@"gay" : @"true"
};
// This demo just provide simple steps
NSManagedObjectContext *context = nil;
User *user = [User mj_objectWithKeyValues:dict context:context];
[context save:nil];
```
### <a id="Coding"></a> Coding
```objc
#import "MJExtension.h"
@implementation Bag
// NSCoding Implementation
MJExtensionCodingImplementation
@end
/***********************************************/
// what properties not to be coded
[Bag mj_setupIgnoredCodingPropertyNames:^NSArray *{
return @[@"name"];
}];
// Equals: Bag.m implements +mj_ignoredCodingPropertyNames method.
// Create model
Bag *bag = [[Bag alloc] init];
bag.name = @"Red bag";
bag.price = 200.8;
NSString *file = [NSHomeDirectory() stringByAppendingPathComponent:@"Desktop/bag.data"];
// Encoding
[NSKeyedArchiver archiveRootObject:bag toFile:file];
// Decoding
Bag *decodedBag = [NSKeyedUnarchiver unarchiveObjectWithFile:file];
NSLog(@"name=%@, price=%f", decodedBag.name, decodedBag.price);
// name=(null), price=200.800000
```
### <a id="Camel_underline"></a> Camel -> underline【统一转换属性名(比如驼峰转下划线)】
```objc
// Dog
#import "MJExtension.h"
@implementation Dog
+ (NSString *)mj_replacedKeyFromPropertyName121:(NSString *)propertyName
{
// nickName -> nick_name
return [propertyName mj_underlineFromCamel];
}
@end
// NSDictionary
NSDictionary *dict = @{
@"nick_name" : @"旺财",
@"sale_price" : @"10.5",
@"run_speed" : @"100.9"
};
// NSDictionary -> Dog
Dog *dog = [Dog mj_objectWithKeyValues:dict];
// printing
NSLog(@"nickName=%@, scalePrice=%f runSpeed=%f", dog.nickName, dog.salePrice, dog.runSpeed);
```
### <a id="NSString_NSDate"></a> NSString -> NSDate, nil -> @""【过滤字典的值(比如字符串日期处理为NSDate、字符串nil处理为@"")】
```objc
// Book
#import "MJExtension.h"
@implementation Book
- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
{
if ([property.name isEqualToString:@"publisher"]) {
if (oldValue == nil) return @"";
} else if (property.type.typeClass == [NSDate class]) {
NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
fmt.dateFormat = @"yyyy-MM-dd";
return [fmt dateFromString:oldValue];
}
return oldValue;
}
@end
// NSDictionary
NSDictionary *dict = @{
@"name" : @"5分钟突破iOS开发",
@"publishedTime" : @"2011-09-10"
};
// NSDictionary -> Book
Book *book = [Book mj_objectWithKeyValues:dict];
// printing
NSLog(@"name=%@, publisher=%@, publishedTime=%@", book.name, book.publisher, book.publishedTime);
```
### <a id="More_use_cases"></a> More use cases【更多用法】
- Please reference to `NSObject+MJKeyValue.h` and `NSObject+MJCoding.h`
## 期待
* 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有)
* 如果在使用过程中发现功能不够用,希望你能Issues我,我非常想为这个框架增加更多好用的功能,谢谢
* 如果你想为MJExtension输出代码,请拼命Pull Requests我
PODS:
- GMRouter (0.1.0)
- GMRouter (0.1.0):
- MJExtension
- MJExtension (3.2.1)
DEPENDENCIES:
- GMRouter (from `../`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- MJExtension
EXTERNAL SOURCES:
GMRouter:
:path: "../"
SPEC CHECKSUMS:
GMRouter: 649720313dfcbadcc7cdbd8834896da8f59a7f96
GMRouter: d47a2a7690eea791e26374cb3c616667124aa1d8
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
PODFILE CHECKSUM: bcbc555b81a3b21a917383786de0d49ebef33013
......
......@@ -7,23 +7,52 @@
objects = {
/* Begin PBXBuildFile section */
019D3486C636B7AABEB40D87BBA1AA5C /* Target_commons.h in Headers */ = {isa = PBXBuildFile; fileRef = 1219F47879ABBCDC018B54B1EA6B6FFE /* Target_commons.h */; settings = {ATTRIBUTES = (Public, ); }; };
09DC5D9026EBB982BE5C6347381C6FFA /* Target_commons.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD75F77659E02147B562148228B6E0C /* Target_commons.m */; };
16E446F9D7AB9549778AB5D1E22925E2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; };
1B6A668C89BBB9E3CFAE9126FB72A690 /* Pods-GMRouter_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B61A08547E5EC761DC6A55EE9533598 /* Pods-GMRouter_Example-dummy.m */; };
038EED68D1B0ADAD380113FF13567561 /* NSString+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = F0AA3B72E288A985348053635E8928CD /* NSString+MJExtension.m */; };
0486C35D8A6F3A4C4A5BF9AD56D1BF4A /* MJFoundation.m in Sources */ = {isa = PBXBuildFile; fileRef = 72BFC4AFACD9ACAC3C9F00947646B7F2 /* MJFoundation.m */; };
0527C56AC3D875371F2C95AA50DB05DB /* Pods-GMRouter_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B61A08547E5EC761DC6A55EE9533598 /* Pods-GMRouter_Example-dummy.m */; };
07BFFC265907A63B0B21810B25A858FC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */; };
0B1C2D4431A5CA04F2E4F038C712D648 /* MJExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7ABEF07C065DAA1093F386E0864101B0 /* MJExtension.framework */; };
16E446F9D7AB9549778AB5D1E22925E2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */; };
19BE705B3925CBDACFC9B17E44DE4EFF /* Target_commons.m in Sources */ = {isa = PBXBuildFile; fileRef = 37A07175927205A749DCD5A667C072C9 /* Target_commons.m */; };
19FEB270103068E5B9299B41D659C5D0 /* MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E619AA937826CB4BD6272654B693F79 /* MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; };
1C563120BF52B34F2077F4C056666D51 /* MJExtension-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 86A47CD1E58E6134E1BE14A48CF6D849 /* MJExtension-dummy.m */; };
1E4AAA93A262FFA99EEE801700B87E07 /* UIViewController+Router.m in Sources */ = {isa = PBXBuildFile; fileRef = A8818865132986FF084F39B120048B9C /* UIViewController+Router.m */; };
1E751DD0D0E49E554F3023CD0485B2D7 /* MJPropertyKey.h in Headers */ = {isa = PBXBuildFile; fileRef = FB16CB4E95C7E7CA54B8BFD76D6C8BD5 /* MJPropertyKey.h */; settings = {ATTRIBUTES = (Public, ); }; };
294DDF5F7DC031467925B291ECFE674F /* Pods-GMRouter_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 12D481E6E4C4A19B7BD3862F2A6E29D5 /* Pods-GMRouter_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
29BB058ADEDCA9FC8454CFE85F08F8CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; };
34E229FB403DEE1B94F86DBAF4A7CA46 /* Pods-GMRouter_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FBB3A3B369EDE2F015451781EFFABF86 /* Pods-GMRouter_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
3AA2B6A752864F1D15538BFB13AD8B0B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; };
3C17DEDB334DB8D158B3B868F62B9353 /* UIViewController+Router.h in Headers */ = {isa = PBXBuildFile; fileRef = DCB712894FEE5C910EEF563F03445407 /* UIViewController+Router.h */; settings = {ATTRIBUTES = (Public, ); }; };
4957BFF5F27E4906FB5FA7B51A912233 /* GMRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0735DB78CD51E8CA4E2233CB2A89B49A /* GMRouter.m */; };
56F7AAFA825DFBAB7942695E3FF49CF2 /* GMRouter+gm.m in Sources */ = {isa = PBXBuildFile; fileRef = 852E5AFCC4B1A772B115C73EABD68C8D /* GMRouter+gm.m */; };
93E0F264D3749DC0C1488C6F870D3927 /* UIViewController+Router.m in Sources */ = {isa = PBXBuildFile; fileRef = 06D9BFA3BE399816CC59931F71896708 /* UIViewController+Router.m */; };
9461EB2C3537F41EF8FB0869155E2B06 /* GMRouter-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BB55C467B7C1F3E8E7292B26195A3A8 /* GMRouter-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
31881A2EFE93EC54F2947CB1BDEE0756 /* GMRouter+gm.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EAEFAA40ACA6F5ACAD63D3FFDA2A4A3 /* GMRouter+gm.h */; settings = {ATTRIBUTES = (Public, ); }; };
364B4A09A0E0922D364EBE85D0982933 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */; };
3828A355BCD83CED3BD5C36676361190 /* GMRouter-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AA1EA7E4454695533F06C0A3D0DF85F4 /* GMRouter-dummy.m */; };
46020ACCCAECE1D0E340979BE52264FA /* UIViewController+Router.h in Headers */ = {isa = PBXBuildFile; fileRef = A616BC0E46B2C5C3128C7591888A95AF /* UIViewController+Router.h */; settings = {ATTRIBUTES = (Public, ); }; };
64CAE12F57BFA7B72AC91876730FAFFD /* NSObject+MJKeyValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E5BC3441D59A15FDCB85329B9C0627A /* NSObject+MJKeyValue.m */; };
67DDBC6891072C07D48006286EE257A7 /* GMRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 084184485F4BE51B104584977FBB8D3C /* GMRouter.m */; };
6B772544CACB7CB1C59DF89A82E90164 /* NSObject+gmKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E6A57F6B4BB0938803FFAB7D8552E3 /* NSObject+gmKey.m */; };
6F236BA7B9EC17BA580AC42E673F3ADC /* MJExtensionConst.h in Headers */ = {isa = PBXBuildFile; fileRef = 23077A4E0B13FB264EC009F2BFE320F0 /* MJExtensionConst.h */; settings = {ATTRIBUTES = (Public, ); }; };
70BD6FEE56D09D816FB7B0C1A37524D0 /* MJExtensionConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 9970287FB8A59D6CE66509205219E52C /* MJExtensionConst.m */; };
7151BE166516FEF56FEF92299F705E54 /* NSObject+MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 28E782F8259378AD0DBF815F97964885 /* NSObject+MJProperty.m */; };
7247F380D9328B5CB771D6BB0741EC96 /* Pods-GMRouter_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FBB3A3B369EDE2F015451781EFFABF86 /* Pods-GMRouter_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
800E98254BC30E6BD01AE386EB834347 /* NSString+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = D8D8512A56DCE8FDA31BB1A013D8D389 /* NSString+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; };
8999ACB780F54510BB417D472B9900F5 /* MJExtension-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 33DDF0C319CDAACEB3E84130FD4CE911 /* MJExtension-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
961062EB19962CBAF4DC4392876E30E7 /* NSObject+MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = D16CA9A56E4FB7F2F2814981B63B7029 /* NSObject+MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; };
99FD6CF8FDE38C4F3C0FEBC6FE205714 /* GMRouter.h in Headers */ = {isa = PBXBuildFile; fileRef = 608B5DF7882746651B6994FFF71EED60 /* GMRouter.h */; settings = {ATTRIBUTES = (Public, ); }; };
9C40C2EE2ACD79043F858AF1CE4E5C88 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */; };
A8F060A3E25FCFCB6B4C77EA7F0A7FAC /* NSObject+MJCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 9522F6F7E1E6A959DBFE548F7A5F5756 /* NSObject+MJCoding.m */; };
AF9A984C5BBD87B3E77C6CF465C83F6A /* MJPropertyType.h in Headers */ = {isa = PBXBuildFile; fileRef = A7666F58E72D21414F1583523F1C8B57 /* MJPropertyType.h */; settings = {ATTRIBUTES = (Public, ); }; };
B0385F519D5E07BCDE1AA3B06E2B1D3E /* gm_router.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1132E689DA26D1E2A760CDCB9ACE2559 /* gm_router.plist */; };
B1A9696B53272E6452C98162FE2891BE /* NSObject+MJCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = BFA31624F5336DD08F70A4C8F06D756E /* NSObject+MJCoding.h */; settings = {ATTRIBUTES = (Public, ); }; };
B292A941B1A57E2A21A54CC70B42D6C1 /* MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EBFC8B09F9FEE9C01B6AC97758F30CF /* MJProperty.m */; };
B5AA07E09A9270F58E9A6DAAA3B0EA1C /* GMRouter.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63EBA02DC258C930363A27239348A973 /* GMRouter.bundle */; };
B7053D98861E6BC0786774330B8ABB48 /* Target_commons.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6B336EF8A57A4F04876D187B523F29 /* Target_commons.h */; settings = {ATTRIBUTES = (Public, ); }; };
B9629038AAE73CD331C8EA760CFF8B4B /* GMRouter+gm.m in Sources */ = {isa = PBXBuildFile; fileRef = D688F2B028D64784DFE8C2BB74F21583 /* GMRouter+gm.m */; };
C5B2C027DCE500280E59DD0079C840F2 /* Pods-GMRouter_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B06D1FEE9ED45063AD65F75D09194D4 /* Pods-GMRouter_Tests-dummy.m */; };
CB798B8A654250AEF1C655F2658761CF /* GMRouter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C0E8C79ECDA09BD952A39D389DE8ACC /* GMRouter.h */; settings = {ATTRIBUTES = (Public, ); }; };
D4DEB2A267D700C606596242D7927805 /* GMRouter+gm.h in Headers */ = {isa = PBXBuildFile; fileRef = 03E19CF7FD15283B0783FA1EC30FF359 /* GMRouter+gm.h */; settings = {ATTRIBUTES = (Public, ); }; };
E49774BAED4F2251FA2CE23E36A4A98C /* GMRouter-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0B024A2B577156FF46E41925F8E1DE /* GMRouter-dummy.m */; };
E31DBA3456F60AE088C78B8C3E8D292D /* NSObject+MJKeyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 265191AF18ABA408F7AEAC2C6D7DD57B /* NSObject+MJKeyValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
ED9D735388FFE2417B729D764AEA3852 /* NSObject+gmKey.h in Headers */ = {isa = PBXBuildFile; fileRef = A5B14B8990472FAE35C51CF0DDD0681F /* NSObject+gmKey.h */; settings = {ATTRIBUTES = (Public, ); }; };
EDA7DC1E3E36F530C69AB80F612CAE6C /* MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 05023A0B1898974DA5A7AB5B4E829619 /* MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; };
F15FC20971C9C33DF76473BAADE11FDD /* MJPropertyType.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CA71C2F02E2C8122DA187D3B07A3EC4 /* MJPropertyType.m */; };
F269C7BE2D44FFAD7B078AE58BD0DA82 /* NSObject+MJClass.h in Headers */ = {isa = PBXBuildFile; fileRef = EBB759E373C7D4DBAF91077141CA3CD3 /* NSObject+MJClass.h */; settings = {ATTRIBUTES = (Public, ); }; };
F2AAF060823F8D4F767DC1358A1370B6 /* MJPropertyKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FDE02E7D2A4B3EF44B4BC31D93EAF80 /* MJPropertyKey.m */; };
F3BB9F79A097C1ABB663EA0260EEF321 /* NSObject+MJClass.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C393B9E214DB9289DFDC5EC4D66BF0 /* NSObject+MJClass.m */; };
F9BFEE19467F7645E078E4E13EA625DA /* GMRouter-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 901FDBD0E18B1C987D1335572C58A239 /* GMRouter-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
FD194A54B9255878269BCCD9E4D86208 /* MJFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AEBA70958F3E94E8D543C846C797059 /* MJFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -34,71 +63,127 @@
remoteGlobalIDString = 4B36B03DEB212F49D4D7ED9BFCE5C831;
remoteInfo = "Pods-GMRouter_Example";
};
24AE8CA2F057EB2BBFC75C0F922ECD60 /* PBXContainerItemProxy */ = {
4DF65C341EBF3DAC05C6906DC1B03C97 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 4D3BA58D0583DF37575CACAB3DDADC85;
remoteInfo = MJExtension;
};
A1D007BB11F245D65B5E7F319E07A284 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 4D3BA58D0583DF37575CACAB3DDADC85;
remoteInfo = MJExtension;
};
A9005644F436F41BC3F356B6A1C835F4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 75956ED72576558B6E846FD2A08311F6;
remoteInfo = GMRouter;
};
BDB52CC58282B59DFBB87AA3B91D70C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A3FE8E5BB39196E33EA42A8DF8B2AC94;
remoteInfo = "GMRouter-GMRouter";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
03E19CF7FD15283B0783FA1EC30FF359 /* GMRouter+gm.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GMRouter+gm.h"; path = "GMRouter/Classes/GMRouter+gm.h"; sourceTree = "<group>"; };
06D9BFA3BE399816CC59931F71896708 /* UIViewController+Router.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Router.m"; path = "GMRouter/Classes/UIViewController+Router.m"; sourceTree = "<group>"; };
0735DB78CD51E8CA4E2233CB2A89B49A /* GMRouter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GMRouter.m; path = GMRouter/Classes/GMRouter.m; sourceTree = "<group>"; };
0282F6B57578F509AB21A267736170B1 /* MJExtension.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = MJExtension.modulemap; sourceTree = "<group>"; };
05023A0B1898974DA5A7AB5B4E829619 /* MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtension.h; path = MJExtension/MJExtension.h; sourceTree = "<group>"; };
07545AF0CC480D5D105E73861C12603E /* GMRouter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = GMRouter.framework; path = GMRouter.framework; sourceTree = BUILT_PRODUCTS_DIR; };
084184485F4BE51B104584977FBB8D3C /* GMRouter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GMRouter.m; path = GMRouter/Classes/GMRouter.m; sourceTree = "<group>"; };
0A4688F4F0ECD415C54743F178C6F7E4 /* Pods-GMRouter_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-GMRouter_Tests.modulemap"; sourceTree = "<group>"; };
10244FCEEFB43378EE67C12A814124A0 /* Pods-GMRouter_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-GMRouter_Example.modulemap"; sourceTree = "<group>"; };
1219F47879ABBCDC018B54B1EA6B6FFE /* Target_commons.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Target_commons.h; path = GMRouter/Classes/Target_commons.h; sourceTree = "<group>"; };
1132E689DA26D1E2A760CDCB9ACE2559 /* gm_router.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = gm_router.plist; path = GMRouter/Assets/gm_router.plist; sourceTree = "<group>"; };
12D481E6E4C4A19B7BD3862F2A6E29D5 /* Pods-GMRouter_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-GMRouter_Tests-umbrella.h"; sourceTree = "<group>"; };
1A0B024A2B577156FF46E41925F8E1DE /* GMRouter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GMRouter-dummy.m"; sourceTree = "<group>"; };
1BB55C467B7C1F3E8E7292B26195A3A8 /* GMRouter-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GMRouter-umbrella.h"; sourceTree = "<group>"; };
1BEFCEE973346B62813C4A206D411726 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = "<group>"; };
1EBFC8B09F9FEE9C01B6AC97758F30CF /* MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJProperty.m; path = MJExtension/MJProperty.m; sourceTree = "<group>"; };
23077A4E0B13FB264EC009F2BFE320F0 /* MJExtensionConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtensionConst.h; path = MJExtension/MJExtensionConst.h; sourceTree = "<group>"; };
265191AF18ABA408F7AEAC2C6D7DD57B /* NSObject+MJKeyValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJKeyValue.h"; path = "MJExtension/NSObject+MJKeyValue.h"; sourceTree = "<group>"; };
28E782F8259378AD0DBF815F97964885 /* NSObject+MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJProperty.m"; path = "MJExtension/NSObject+MJProperty.m"; sourceTree = "<group>"; };
29743AEC1DC80D1A00A308973743E479 /* Pods-GMRouter_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GMRouter_Example-Info.plist"; sourceTree = "<group>"; };
3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
2B276B0A79173A1D6E83C9B4FB9A4A57 /* MJExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MJExtension.framework; path = MJExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33ACD3930E0BC2F49FC4111CF4668169 /* Pods-GMRouter_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMRouter_Example.release.xcconfig"; sourceTree = "<group>"; };
33DDF0C319CDAACEB3E84130FD4CE911 /* MJExtension-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJExtension-umbrella.h"; sourceTree = "<group>"; };
33E6A57F6B4BB0938803FFAB7D8552E3 /* NSObject+gmKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+gmKey.m"; path = "GMRouter/Classes/NSObject+gmKey.m"; sourceTree = "<group>"; };
37A07175927205A749DCD5A667C072C9 /* Target_commons.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Target_commons.m; path = GMRouter/Classes/Target_commons.m; sourceTree = "<group>"; };
3876DEAC1052E76429FB56F7F41B5658 /* Pods-GMRouter_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GMRouter_Example-acknowledgements.plist"; sourceTree = "<group>"; };
40982CAA4B36CFC7C32FD87BAC8E169E /* Pods_GMRouter_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_GMRouter_Tests.framework; path = "Pods-GMRouter_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
4AD1579E1B3E67AABCCF5F0049E1891B /* Pods-GMRouter_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-GMRouter_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
4B3837D74A20D74C0AD204332FDE568A /* Pods-GMRouter_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GMRouter_Tests-acknowledgements.plist"; sourceTree = "<group>"; };
4EAEFAA40ACA6F5ACAD63D3FFDA2A4A3 /* GMRouter+gm.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GMRouter+gm.h"; path = "GMRouter/Classes/GMRouter+gm.h"; sourceTree = "<group>"; };
4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GMRouter.xcconfig; sourceTree = "<group>"; };
5AEBA70958F3E94E8D543C846C797059 /* MJFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJFoundation.h; path = MJExtension/MJFoundation.h; sourceTree = "<group>"; };
5E619AA937826CB4BD6272654B693F79 /* MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJProperty.h; path = MJExtension/MJProperty.h; sourceTree = "<group>"; };
608B5DF7882746651B6994FFF71EED60 /* GMRouter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GMRouter.h; path = GMRouter/Classes/GMRouter.h; sourceTree = "<group>"; };
617877158CAEC3ECDA245F61A3B4E876 /* Pods-GMRouter_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-GMRouter_Example-frameworks.sh"; sourceTree = "<group>"; };
6AE8E2A476705DCA9AEC318672B5549F /* GMRouter.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = GMRouter.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
63EBA02DC258C930363A27239348A973 /* GMRouter.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = GMRouter.bundle; path = "GMRouter-GMRouter.bundle"; sourceTree = BUILT_PRODUCTS_DIR; };
6B61A08547E5EC761DC6A55EE9533598 /* Pods-GMRouter_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-GMRouter_Example-dummy.m"; sourceTree = "<group>"; };
73BDA5DE02867E1F38E53E3C47F2E64F /* GMRouter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = GMRouter.modulemap; sourceTree = "<group>"; };
7C0E8C79ECDA09BD952A39D389DE8ACC /* GMRouter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GMRouter.h; path = GMRouter/Classes/GMRouter.h; sourceTree = "<group>"; };
809BD1364D2D6D9C1F5F65822A5CD5B7 /* GMRouter-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GMRouter-prefix.pch"; sourceTree = "<group>"; };
852E5AFCC4B1A772B115C73EABD68C8D /* GMRouter+gm.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GMRouter+gm.m"; path = "GMRouter/Classes/GMRouter+gm.m"; sourceTree = "<group>"; };
8AB8B1BA3BA2E2CC233E96FADDF264F5 /* GMRouter-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GMRouter-Info.plist"; sourceTree = "<group>"; };
6E5BC3441D59A15FDCB85329B9C0627A /* NSObject+MJKeyValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJKeyValue.m"; path = "MJExtension/NSObject+MJKeyValue.m"; sourceTree = "<group>"; };
6FDE02E7D2A4B3EF44B4BC31D93EAF80 /* MJPropertyKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyKey.m; path = MJExtension/MJPropertyKey.m; sourceTree = "<group>"; };
72BFC4AFACD9ACAC3C9F00947646B7F2 /* MJFoundation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJFoundation.m; path = MJExtension/MJFoundation.m; sourceTree = "<group>"; };
7ABEF07C065DAA1093F386E0864101B0 /* MJExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MJExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7CA71C2F02E2C8122DA187D3B07A3EC4 /* MJPropertyType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyType.m; path = MJExtension/MJPropertyType.m; sourceTree = "<group>"; };
7DEA8B0A5A98837D0E27E3567D20E481 /* GMRouter-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GMRouter-Info.plist"; sourceTree = "<group>"; };
7E99F31AAE935A746E8F2A0EBD702BF7 /* GMRouter.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = GMRouter.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
86A47CD1E58E6134E1BE14A48CF6D849 /* MJExtension-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJExtension-dummy.m"; sourceTree = "<group>"; };
901FDBD0E18B1C987D1335572C58A239 /* GMRouter-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GMRouter-umbrella.h"; sourceTree = "<group>"; };
904DFEF9F5418A78332860A2A7B81778 /* GMRouter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = GMRouter.modulemap; sourceTree = "<group>"; };
9522F6F7E1E6A959DBFE548F7A5F5756 /* NSObject+MJCoding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJCoding.m"; path = "MJExtension/NSObject+MJCoding.m"; sourceTree = "<group>"; };
9970287FB8A59D6CE66509205219E52C /* MJExtensionConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJExtensionConst.m; path = MJExtension/MJExtensionConst.m; sourceTree = "<group>"; };
9B06D1FEE9ED45063AD65F75D09194D4 /* Pods-GMRouter_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-GMRouter_Tests-dummy.m"; sourceTree = "<group>"; };
9B63B9BE61CAA13EA3E4A6C62A8823DE /* MJExtension.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJExtension.xcconfig; sourceTree = "<group>"; };
9BD9BC9E063E069BE30762B87A2B6BDB /* GMRouter-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GMRouter-prefix.pch"; sourceTree = "<group>"; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
ADD75F77659E02147B562148228B6E0C /* Target_commons.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Target_commons.m; path = GMRouter/Classes/Target_commons.m; sourceTree = "<group>"; };
B851DB4DC8EB267EFB7C4D404977444D /* GMRouter.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GMRouter.xcconfig; sourceTree = "<group>"; };
CDA098AE466F3401888380FA1240F066 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = "<group>"; };
A5B14B8990472FAE35C51CF0DDD0681F /* NSObject+gmKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+gmKey.h"; path = "GMRouter/Classes/NSObject+gmKey.h"; sourceTree = "<group>"; };
A616BC0E46B2C5C3128C7591888A95AF /* UIViewController+Router.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Router.h"; path = "GMRouter/Classes/UIViewController+Router.h"; sourceTree = "<group>"; };
A7438C725C49090EE92CED3A16DA316B /* MJExtension-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "MJExtension-Info.plist"; sourceTree = "<group>"; };
A7666F58E72D21414F1583523F1C8B57 /* MJPropertyType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyType.h; path = MJExtension/MJPropertyType.h; sourceTree = "<group>"; };
A8818865132986FF084F39B120048B9C /* UIViewController+Router.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Router.m"; path = "GMRouter/Classes/UIViewController+Router.m"; sourceTree = "<group>"; };
AA1EA7E4454695533F06C0A3D0DF85F4 /* GMRouter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GMRouter-dummy.m"; sourceTree = "<group>"; };
BFA31624F5336DD08F70A4C8F06D756E /* NSObject+MJCoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJCoding.h"; path = "MJExtension/NSObject+MJCoding.h"; sourceTree = "<group>"; };
C185AE65153C7427650B66997AA3ED2C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = "<group>"; };
CF6B336EF8A57A4F04876D187B523F29 /* Target_commons.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Target_commons.h; path = GMRouter/Classes/Target_commons.h; sourceTree = "<group>"; };
CFAAB8C43015BCEB85A0C0ECF1A3CD4F /* Pods-GMRouter_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMRouter_Example.debug.xcconfig"; sourceTree = "<group>"; };
D052A7830930288BFD6D3207CED09506 /* Pods-GMRouter_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMRouter_Tests.release.xcconfig"; sourceTree = "<group>"; };
D08B7A48A3CC3DB07F26A38FAC08AF30 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = "<group>"; };
D16CA9A56E4FB7F2F2814981B63B7029 /* NSObject+MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJProperty.h"; path = "MJExtension/NSObject+MJProperty.h"; sourceTree = "<group>"; };
D5507E9033B874004DC41E326D339A79 /* Pods-GMRouter_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-GMRouter_Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
D684E878B62617F575399094A559A8F3 /* Pods_GMRouter_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_GMRouter_Example.framework; path = "Pods-GMRouter_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
D688F2B028D64784DFE8C2BB74F21583 /* GMRouter+gm.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GMRouter+gm.m"; path = "GMRouter/Classes/GMRouter+gm.m"; sourceTree = "<group>"; };
D73D5257B1CBA064371CE13DE2B14EB5 /* Pods-GMRouter_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-GMRouter_Tests.debug.xcconfig"; sourceTree = "<group>"; };
DCB712894FEE5C910EEF563F03445407 /* UIViewController+Router.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Router.h"; path = "GMRouter/Classes/UIViewController+Router.h"; sourceTree = "<group>"; };
D8D8512A56DCE8FDA31BB1A013D8D389 /* NSString+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+MJExtension.h"; path = "MJExtension/NSString+MJExtension.h"; sourceTree = "<group>"; };
E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
E1E67A62905A30ABE6C48B0341140176 /* ResourceBundle-GMRouter-GMRouter-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-GMRouter-GMRouter-Info.plist"; sourceTree = "<group>"; };
E2C393B9E214DB9289DFDC5EC4D66BF0 /* NSObject+MJClass.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJClass.m"; path = "MJExtension/NSObject+MJClass.m"; sourceTree = "<group>"; };
EBB759E373C7D4DBAF91077141CA3CD3 /* NSObject+MJClass.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJClass.h"; path = "MJExtension/NSObject+MJClass.h"; sourceTree = "<group>"; };
F0AA3B72E288A985348053635E8928CD /* NSString+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+MJExtension.m"; path = "MJExtension/NSString+MJExtension.m"; sourceTree = "<group>"; };
F474769DF05520EE99C71EA610BA6AF7 /* MJExtension-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJExtension-prefix.pch"; sourceTree = "<group>"; };
F7021D5FA182A99E9BE842763E70B46A /* Pods-GMRouter_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-GMRouter_Tests-Info.plist"; sourceTree = "<group>"; };
FB16CB4E95C7E7CA54B8BFD76D6C8BD5 /* MJPropertyKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyKey.h; path = MJExtension/MJPropertyKey.h; sourceTree = "<group>"; };
FBB3A3B369EDE2F015451781EFFABF86 /* Pods-GMRouter_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-GMRouter_Example-umbrella.h"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
880ED820A75EF9C4A4F1194EAF779BF4 /* Frameworks */ = {
66FF0FDEC7C20400F2551D9297D12107 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
29BB058ADEDCA9FC8454CFE85F08F8CB /* Foundation.framework in Frameworks */,
9C40C2EE2ACD79043F858AF1CE4E5C88 /* Foundation.framework in Frameworks */,
0B1C2D4431A5CA04F2E4F038C712D648 /* MJExtension.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
AA4FEA44DFB1998517450E3074EFFB48 /* Frameworks */ = {
B8579A6AA2B0CFCD58B77F045B616608 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3AA2B6A752864F1D15538BFB13AD8B0B /* Foundation.framework in Frameworks */,
07BFFC265907A63B0B21810B25A858FC /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -110,21 +195,68 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
F5B3A1B3773D3B390D160DD60A7A233D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
364B4A09A0E0922D364EBE85D0982933 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F6875F7590844687C49E4B77D8725276 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
00B697D04654CC21F44925CD553B59EE /* Support Files */ = {
1BE342ADF33B00D6EB9875C6CA02EFB0 /* MJExtension */ = {
isa = PBXGroup;
children = (
73BDA5DE02867E1F38E53E3C47F2E64F /* GMRouter.modulemap */,
B851DB4DC8EB267EFB7C4D404977444D /* GMRouter.xcconfig */,
1A0B024A2B577156FF46E41925F8E1DE /* GMRouter-dummy.m */,
8AB8B1BA3BA2E2CC233E96FADDF264F5 /* GMRouter-Info.plist */,
809BD1364D2D6D9C1F5F65822A5CD5B7 /* GMRouter-prefix.pch */,
1BB55C467B7C1F3E8E7292B26195A3A8 /* GMRouter-umbrella.h */,
05023A0B1898974DA5A7AB5B4E829619 /* MJExtension.h */,
23077A4E0B13FB264EC009F2BFE320F0 /* MJExtensionConst.h */,
9970287FB8A59D6CE66509205219E52C /* MJExtensionConst.m */,
5AEBA70958F3E94E8D543C846C797059 /* MJFoundation.h */,
72BFC4AFACD9ACAC3C9F00947646B7F2 /* MJFoundation.m */,
5E619AA937826CB4BD6272654B693F79 /* MJProperty.h */,
1EBFC8B09F9FEE9C01B6AC97758F30CF /* MJProperty.m */,
FB16CB4E95C7E7CA54B8BFD76D6C8BD5 /* MJPropertyKey.h */,
6FDE02E7D2A4B3EF44B4BC31D93EAF80 /* MJPropertyKey.m */,
A7666F58E72D21414F1583523F1C8B57 /* MJPropertyType.h */,
7CA71C2F02E2C8122DA187D3B07A3EC4 /* MJPropertyType.m */,
EBB759E373C7D4DBAF91077141CA3CD3 /* NSObject+MJClass.h */,
E2C393B9E214DB9289DFDC5EC4D66BF0 /* NSObject+MJClass.m */,
BFA31624F5336DD08F70A4C8F06D756E /* NSObject+MJCoding.h */,
9522F6F7E1E6A959DBFE548F7A5F5756 /* NSObject+MJCoding.m */,
265191AF18ABA408F7AEAC2C6D7DD57B /* NSObject+MJKeyValue.h */,
6E5BC3441D59A15FDCB85329B9C0627A /* NSObject+MJKeyValue.m */,
D16CA9A56E4FB7F2F2814981B63B7029 /* NSObject+MJProperty.h */,
28E782F8259378AD0DBF815F97964885 /* NSObject+MJProperty.m */,
D8D8512A56DCE8FDA31BB1A013D8D389 /* NSString+MJExtension.h */,
F0AA3B72E288A985348053635E8928CD /* NSString+MJExtension.m */,
858B930326AD76BB2F53D253D52E220D /* Support Files */,
);
name = "Support Files";
path = "Example/Pods/Target Support Files/GMRouter";
name = MJExtension;
path = MJExtension;
sourceTree = "<group>";
};
25B47DB6E035E0E692D2951DC2DC8837 /* Development Pods */ = {
isa = PBXGroup;
children = (
E58899F3D1D43D32DC43E2C3B887CD3A /* GMRouter */,
);
name = "Development Pods";
sourceTree = "<group>";
};
47597C44780A6B13F2B0DFFADAEE26EB /* Resources */ = {
isa = PBXGroup;
children = (
1132E689DA26D1E2A760CDCB9ACE2559 /* gm_router.plist */,
);
name = Resources;
sourceTree = "<group>";
};
49B219C8B627D91DDBA361D37555B275 /* Targets Support Files */ = {
......@@ -136,22 +268,39 @@
name = "Targets Support Files";
sourceTree = "<group>";
};
9628847C933BC19C7F230E9DD94C66E2 /* GMRouter */ = {
858B930326AD76BB2F53D253D52E220D /* Support Files */ = {
isa = PBXGroup;
children = (
7C0E8C79ECDA09BD952A39D389DE8ACC /* GMRouter.h */,
0735DB78CD51E8CA4E2233CB2A89B49A /* GMRouter.m */,
03E19CF7FD15283B0783FA1EC30FF359 /* GMRouter+gm.h */,
852E5AFCC4B1A772B115C73EABD68C8D /* GMRouter+gm.m */,
1219F47879ABBCDC018B54B1EA6B6FFE /* Target_commons.h */,
ADD75F77659E02147B562148228B6E0C /* Target_commons.m */,
DCB712894FEE5C910EEF563F03445407 /* UIViewController+Router.h */,
06D9BFA3BE399816CC59931F71896708 /* UIViewController+Router.m */,
DB0D6C4B74A39705FB986B0A9C40FE72 /* Pod */,
00B697D04654CC21F44925CD553B59EE /* Support Files */,
0282F6B57578F509AB21A267736170B1 /* MJExtension.modulemap */,
9B63B9BE61CAA13EA3E4A6C62A8823DE /* MJExtension.xcconfig */,
86A47CD1E58E6134E1BE14A48CF6D849 /* MJExtension-dummy.m */,
A7438C725C49090EE92CED3A16DA316B /* MJExtension-Info.plist */,
F474769DF05520EE99C71EA610BA6AF7 /* MJExtension-prefix.pch */,
33DDF0C319CDAACEB3E84130FD4CE911 /* MJExtension-umbrella.h */,
);
name = GMRouter;
path = ../..;
name = "Support Files";
path = "../Target Support Files/MJExtension";
sourceTree = "<group>";
};
935A112E1644414879D15516615DE92D /* Products */ = {
isa = PBXGroup;
children = (
63EBA02DC258C930363A27239348A973 /* GMRouter.bundle */,
07545AF0CC480D5D105E73861C12603E /* GMRouter.framework */,
2B276B0A79173A1D6E83C9B4FB9A4A57 /* MJExtension.framework */,
D684E878B62617F575399094A559A8F3 /* Pods_GMRouter_Example.framework */,
40982CAA4B36CFC7C32FD87BAC8E169E /* Pods_GMRouter_Tests.framework */,
);
name = Products;
sourceTree = "<group>";
};
98254C63E096C42740938CF63ED1D89D /* Frameworks */ = {
isa = PBXGroup;
children = (
7ABEF07C065DAA1093F386E0864101B0 /* MJExtension.framework */,
D72DBDC52C068CF1A6EDD7F19C21FC94 /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
AB4239B8E10BD35306D69C1AAEE3F9AD /* Pods-GMRouter_Example */ = {
......@@ -171,14 +320,29 @@
path = "Target Support Files/Pods-GMRouter_Example";
sourceTree = "<group>";
};
AC6FF225CC0B2D05B8512FD7320BE1A0 /* Products */ = {
AF621E62B0C47D01D9AD08D8E6E33C56 /* Pod */ = {
isa = PBXGroup;
children = (
07545AF0CC480D5D105E73861C12603E /* GMRouter.framework */,
D684E878B62617F575399094A559A8F3 /* Pods_GMRouter_Example.framework */,
40982CAA4B36CFC7C32FD87BAC8E169E /* Pods_GMRouter_Tests.framework */,
7E99F31AAE935A746E8F2A0EBD702BF7 /* GMRouter.podspec */,
D08B7A48A3CC3DB07F26A38FAC08AF30 /* LICENSE */,
C185AE65153C7427650B66997AA3ED2C /* README.md */,
);
name = Products;
name = Pod;
sourceTree = "<group>";
};
B1D89CD1CE423CF399D821B2E6AC4FBF /* Support Files */ = {
isa = PBXGroup;
children = (
904DFEF9F5418A78332860A2A7B81778 /* GMRouter.modulemap */,
4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */,
AA1EA7E4454695533F06C0A3D0DF85F4 /* GMRouter-dummy.m */,
7DEA8B0A5A98837D0E27E3567D20E481 /* GMRouter-Info.plist */,
9BD9BC9E063E069BE30762B87A2B6BDB /* GMRouter-prefix.pch */,
901FDBD0E18B1C987D1335572C58A239 /* GMRouter-umbrella.h */,
E1E67A62905A30ABE6C48B0341140176 /* ResourceBundle-GMRouter-GMRouter-Info.plist */,
);
name = "Support Files";
path = "Example/Pods/Target Support Files/GMRouter";
sourceTree = "<group>";
};
B453FE7EBF08DF7BDD412B04C2BB44F7 /* Pods-GMRouter_Tests */ = {
......@@ -197,79 +361,103 @@
path = "Target Support Files/Pods-GMRouter_Tests";
sourceTree = "<group>";
};
C0834CEBB1379A84116EF29F93051C60 /* iOS */ = {
BBE7F25BDF6E2ECE64867498D8902AF4 /* Pods */ = {
isa = PBXGroup;
children = (
3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */,
1BE342ADF33B00D6EB9875C6CA02EFB0 /* MJExtension */,
);
name = iOS;
name = Pods;
sourceTree = "<group>";
};
CF1408CF629C7361332E53B88F7BD30C = {
isa = PBXGroup;
children = (
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
DA7A2BB1AD084F83B56A9EF62AD624F8 /* Development Pods */,
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */,
AC6FF225CC0B2D05B8512FD7320BE1A0 /* Products */,
25B47DB6E035E0E692D2951DC2DC8837 /* Development Pods */,
98254C63E096C42740938CF63ED1D89D /* Frameworks */,
BBE7F25BDF6E2ECE64867498D8902AF4 /* Pods */,
935A112E1644414879D15516615DE92D /* Products */,
49B219C8B627D91DDBA361D37555B275 /* Targets Support Files */,
);
sourceTree = "<group>";
};
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = {
isa = PBXGroup;
children = (
C0834CEBB1379A84116EF29F93051C60 /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
DA7A2BB1AD084F83B56A9EF62AD624F8 /* Development Pods */ = {
D72DBDC52C068CF1A6EDD7F19C21FC94 /* iOS */ = {
isa = PBXGroup;
children = (
9628847C933BC19C7F230E9DD94C66E2 /* GMRouter */,
E04AC621D1A86F2AC40200FFAD16DBAA /* Foundation.framework */,
);
name = "Development Pods";
name = iOS;
sourceTree = "<group>";
};
DB0D6C4B74A39705FB986B0A9C40FE72 /* Pod */ = {
E58899F3D1D43D32DC43E2C3B887CD3A /* GMRouter */ = {
isa = PBXGroup;
children = (
6AE8E2A476705DCA9AEC318672B5549F /* GMRouter.podspec */,
CDA098AE466F3401888380FA1240F066 /* LICENSE */,
1BEFCEE973346B62813C4A206D411726 /* README.md */,
608B5DF7882746651B6994FFF71EED60 /* GMRouter.h */,
084184485F4BE51B104584977FBB8D3C /* GMRouter.m */,
4EAEFAA40ACA6F5ACAD63D3FFDA2A4A3 /* GMRouter+gm.h */,
D688F2B028D64784DFE8C2BB74F21583 /* GMRouter+gm.m */,
A5B14B8990472FAE35C51CF0DDD0681F /* NSObject+gmKey.h */,
33E6A57F6B4BB0938803FFAB7D8552E3 /* NSObject+gmKey.m */,
CF6B336EF8A57A4F04876D187B523F29 /* Target_commons.h */,
37A07175927205A749DCD5A667C072C9 /* Target_commons.m */,
A616BC0E46B2C5C3128C7591888A95AF /* UIViewController+Router.h */,
A8818865132986FF084F39B120048B9C /* UIViewController+Router.m */,
AF621E62B0C47D01D9AD08D8E6E33C56 /* Pod */,
47597C44780A6B13F2B0DFFADAEE26EB /* Resources */,
B1D89CD1CE423CF399D821B2E6AC4FBF /* Support Files */,
);
name = Pod;
name = GMRouter;
path = ../..;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
0716F806395CBCA51BB4B304B084CCE5 /* Headers */ = {
276B1E645EA3CFF48125EECCF041CBC3 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D4DEB2A267D700C606596242D7927805 /* GMRouter+gm.h in Headers */,
9461EB2C3537F41EF8FB0869155E2B06 /* GMRouter-umbrella.h in Headers */,
CB798B8A654250AEF1C655F2658761CF /* GMRouter.h in Headers */,
019D3486C636B7AABEB40D87BBA1AA5C /* Target_commons.h in Headers */,
3C17DEDB334DB8D158B3B868F62B9353 /* UIViewController+Router.h in Headers */,
294DDF5F7DC031467925B291ECFE674F /* Pods-GMRouter_Tests-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
276B1E645EA3CFF48125EECCF041CBC3 /* Headers */ = {
4A504F5ABD613B5555FC3D882066B962 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
294DDF5F7DC031467925B291ECFE674F /* Pods-GMRouter_Tests-umbrella.h in Headers */,
7247F380D9328B5CB771D6BB0741EC96 /* Pods-GMRouter_Example-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E65B05AF8996752B5586E50A43EF75A9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
31881A2EFE93EC54F2947CB1BDEE0756 /* GMRouter+gm.h in Headers */,
F9BFEE19467F7645E078E4E13EA625DA /* GMRouter-umbrella.h in Headers */,
99FD6CF8FDE38C4F3C0FEBC6FE205714 /* GMRouter.h in Headers */,
ED9D735388FFE2417B729D764AEA3852 /* NSObject+gmKey.h in Headers */,
B7053D98861E6BC0786774330B8ABB48 /* Target_commons.h in Headers */,
46020ACCCAECE1D0E340979BE52264FA /* UIViewController+Router.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C6A903746208345289C9B6BD93951EE4 /* Headers */ = {
FC53C62C809DCB622E681AA70A6210C4 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
34E229FB403DEE1B94F86DBAF4A7CA46 /* Pods-GMRouter_Example-umbrella.h in Headers */,
8999ACB780F54510BB417D472B9900F5 /* MJExtension-umbrella.h in Headers */,
EDA7DC1E3E36F530C69AB80F612CAE6C /* MJExtension.h in Headers */,
6F236BA7B9EC17BA580AC42E673F3ADC /* MJExtensionConst.h in Headers */,
FD194A54B9255878269BCCD9E4D86208 /* MJFoundation.h in Headers */,
19FEB270103068E5B9299B41D659C5D0 /* MJProperty.h in Headers */,
1E751DD0D0E49E554F3023CD0485B2D7 /* MJPropertyKey.h in Headers */,
AF9A984C5BBD87B3E77C6CF465C83F6A /* MJPropertyType.h in Headers */,
F269C7BE2D44FFAD7B078AE58BD0DA82 /* NSObject+MJClass.h in Headers */,
B1A9696B53272E6452C98162FE2891BE /* NSObject+MJCoding.h in Headers */,
E31DBA3456F60AE088C78B8C3E8D292D /* NSObject+MJKeyValue.h in Headers */,
961062EB19962CBAF4DC4392876E30E7 /* NSObject+MJProperty.h in Headers */,
800E98254BC30E6BD01AE386EB834347 /* NSString+MJExtension.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -278,41 +466,79 @@
/* Begin PBXNativeTarget section */
4B36B03DEB212F49D4D7ED9BFCE5C831 /* Pods-GMRouter_Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = EE53E4187262E95F4025FD1618867FA1 /* Build configuration list for PBXNativeTarget "Pods-GMRouter_Example" */;
buildConfigurationList = 4099C8D6A094CC39E6BEBC8016626175 /* Build configuration list for PBXNativeTarget "Pods-GMRouter_Example" */;
buildPhases = (
C6A903746208345289C9B6BD93951EE4 /* Headers */,
8D8F4A15EEB5DE04F7147D4F6A2C3054 /* Sources */,
880ED820A75EF9C4A4F1194EAF779BF4 /* Frameworks */,
B4C66092059045DD872C9E6614D706D1 /* Resources */,
4A504F5ABD613B5555FC3D882066B962 /* Headers */,
D443C137311B04A61DCCCB5AA49D0337 /* Sources */,
B8579A6AA2B0CFCD58B77F045B616608 /* Frameworks */,
965CD34E4F9C76239301AFFCC6F7C0F4 /* Resources */,
);
buildRules = (
);
dependencies = (
EC8C98EF2773C13332E8A0DA3E043E2E /* PBXTargetDependency */,
7CBFE35C998286B4464A68BE9EB86C82 /* PBXTargetDependency */,
EEB0ACBA7250F1C7A2515669F27AC6FD /* PBXTargetDependency */,
);
name = "Pods-GMRouter_Example";
productName = "Pods-GMRouter_Example";
productReference = D684E878B62617F575399094A559A8F3 /* Pods_GMRouter_Example.framework */;
productType = "com.apple.product-type.framework";
};
4D3BA58D0583DF37575CACAB3DDADC85 /* MJExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = DADB359E087FD3E01E5BF61485C011FD /* Build configuration list for PBXNativeTarget "MJExtension" */;
buildPhases = (
FC53C62C809DCB622E681AA70A6210C4 /* Headers */,
EF3492DBF9DBC637F7AABF97F6CF8F82 /* Sources */,
F5B3A1B3773D3B390D160DD60A7A233D /* Frameworks */,
4CED1E05277D9D97D2CFF25F627509D8 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = MJExtension;
productName = MJExtension;
productReference = 2B276B0A79173A1D6E83C9B4FB9A4A57 /* MJExtension.framework */;
productType = "com.apple.product-type.framework";
};
75956ED72576558B6E846FD2A08311F6 /* GMRouter */ = {
isa = PBXNativeTarget;
buildConfigurationList = 733298EE3A3B7879C9CE922BF9253DFB /* Build configuration list for PBXNativeTarget "GMRouter" */;
buildConfigurationList = 60AF43421DA717591E54239F7EFCA996 /* Build configuration list for PBXNativeTarget "GMRouter" */;
buildPhases = (
0716F806395CBCA51BB4B304B084CCE5 /* Headers */,
DE3B3B6E14A62A94A286A42D3241A9D4 /* Sources */,
AA4FEA44DFB1998517450E3074EFFB48 /* Frameworks */,
3E6D93C43589E7C251D6A77C2C74FE4D /* Resources */,
E65B05AF8996752B5586E50A43EF75A9 /* Headers */,
668AC3AF9FEED1BD862B2A1AD29E2A82 /* Sources */,
66FF0FDEC7C20400F2551D9297D12107 /* Frameworks */,
C536A3ED117C5C6C256AEEC921CB2B60 /* Resources */,
);
buildRules = (
);
dependencies = (
365539E32798AB67891FF0AE720702CD /* PBXTargetDependency */,
EF5F87724309A35E9785B45DD080B8FF /* PBXTargetDependency */,
);
name = GMRouter;
productName = GMRouter;
productReference = 07545AF0CC480D5D105E73861C12603E /* GMRouter.framework */;
productType = "com.apple.product-type.framework";
};
A3FE8E5BB39196E33EA42A8DF8B2AC94 /* GMRouter-GMRouter */ = {
isa = PBXNativeTarget;
buildConfigurationList = A058C815921111ABE94DA28673C084C4 /* Build configuration list for PBXNativeTarget "GMRouter-GMRouter" */;
buildPhases = (
EAB4CDA025F69D3BE4E135C379E7792E /* Sources */,
F6875F7590844687C49E4B77D8725276 /* Frameworks */,
797BEE3EABE6C3E5BDEEAF7BBD6191FE /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "GMRouter-GMRouter";
productName = "GMRouter-GMRouter";
productReference = 63EBA02DC258C930363A27239348A973 /* GMRouter.bundle */;
productType = "com.apple.product-type.bundle";
};
CAA35E933D605DB16055F20631CCC99D /* Pods-GMRouter_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 27E973FB214CB5EF8561F0CDC232FD40 /* Build configuration list for PBXNativeTarget "Pods-GMRouter_Tests" */;
......@@ -349,11 +575,13 @@
en,
);
mainGroup = CF1408CF629C7361332E53B88F7BD30C;
productRefGroup = AC6FF225CC0B2D05B8512FD7320BE1A0 /* Products */;
productRefGroup = 935A112E1644414879D15516615DE92D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
75956ED72576558B6E846FD2A08311F6 /* GMRouter */,
A3FE8E5BB39196E33EA42A8DF8B2AC94 /* GMRouter-GMRouter */,
4D3BA58D0583DF37575CACAB3DDADC85 /* MJExtension */,
4B36B03DEB212F49D4D7ED9BFCE5C831 /* Pods-GMRouter_Example */,
CAA35E933D605DB16055F20631CCC99D /* Pods-GMRouter_Tests */,
);
......@@ -361,7 +589,7 @@
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
3E6D93C43589E7C251D6A77C2C74FE4D /* Resources */ = {
4CED1E05277D9D97D2CFF25F627509D8 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -375,16 +603,45 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B4C66092059045DD872C9E6614D706D1 /* Resources */ = {
797BEE3EABE6C3E5BDEEAF7BBD6191FE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B0385F519D5E07BCDE1AA3B06E2B1D3E /* gm_router.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
965CD34E4F9C76239301AFFCC6F7C0F4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C536A3ED117C5C6C256AEEC921CB2B60 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B5AA07E09A9270F58E9A6DAAA3B0EA1C /* GMRouter.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
668AC3AF9FEED1BD862B2A1AD29E2A82 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B9629038AAE73CD331C8EA760CFF8B4B /* GMRouter+gm.m in Sources */,
3828A355BCD83CED3BD5C36676361190 /* GMRouter-dummy.m in Sources */,
67DDBC6891072C07D48006286EE257A7 /* GMRouter.m in Sources */,
6B772544CACB7CB1C59DF89A82E90164 /* NSObject+gmKey.m in Sources */,
19BE705B3925CBDACFC9B17E44DE4EFF /* Target_commons.m in Sources */,
1E4AAA93A262FFA99EEE801700B87E07 /* UIViewController+Router.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
797ABD0E0DEAC34497A207FB90EBC1BB /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
......@@ -393,40 +650,71 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
8D8F4A15EEB5DE04F7147D4F6A2C3054 /* Sources */ = {
D443C137311B04A61DCCCB5AA49D0337 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0527C56AC3D875371F2C95AA50DB05DB /* Pods-GMRouter_Example-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EAB4CDA025F69D3BE4E135C379E7792E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1B6A668C89BBB9E3CFAE9126FB72A690 /* Pods-GMRouter_Example-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DE3B3B6E14A62A94A286A42D3241A9D4 /* Sources */ = {
EF3492DBF9DBC637F7AABF97F6CF8F82 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
56F7AAFA825DFBAB7942695E3FF49CF2 /* GMRouter+gm.m in Sources */,
E49774BAED4F2251FA2CE23E36A4A98C /* GMRouter-dummy.m in Sources */,
4957BFF5F27E4906FB5FA7B51A912233 /* GMRouter.m in Sources */,
09DC5D9026EBB982BE5C6347381C6FFA /* Target_commons.m in Sources */,
93E0F264D3749DC0C1488C6F870D3927 /* UIViewController+Router.m in Sources */,
1C563120BF52B34F2077F4C056666D51 /* MJExtension-dummy.m in Sources */,
70BD6FEE56D09D816FB7B0C1A37524D0 /* MJExtensionConst.m in Sources */,
0486C35D8A6F3A4C4A5BF9AD56D1BF4A /* MJFoundation.m in Sources */,
B292A941B1A57E2A21A54CC70B42D6C1 /* MJProperty.m in Sources */,
F2AAF060823F8D4F767DC1358A1370B6 /* MJPropertyKey.m in Sources */,
F15FC20971C9C33DF76473BAADE11FDD /* MJPropertyType.m in Sources */,
F3BB9F79A097C1ABB663EA0260EEF321 /* NSObject+MJClass.m in Sources */,
A8F060A3E25FCFCB6B4C77EA7F0A7FAC /* NSObject+MJCoding.m in Sources */,
64CAE12F57BFA7B72AC91876730FAFFD /* NSObject+MJKeyValue.m in Sources */,
7151BE166516FEF56FEF92299F705E54 /* NSObject+MJProperty.m in Sources */,
038EED68D1B0ADAD380113FF13567561 /* NSString+MJExtension.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
365539E32798AB67891FF0AE720702CD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "GMRouter-GMRouter";
target = A3FE8E5BB39196E33EA42A8DF8B2AC94 /* GMRouter-GMRouter */;
targetProxy = BDB52CC58282B59DFBB87AA3B91D70C2 /* PBXContainerItemProxy */;
};
39F89FABC110AD3EFF291980AD16559D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Pods-GMRouter_Example";
target = 4B36B03DEB212F49D4D7ED9BFCE5C831 /* Pods-GMRouter_Example */;
targetProxy = 07EF1C704D3F314444E4E0B433521E0A /* PBXContainerItemProxy */;
};
EC8C98EF2773C13332E8A0DA3E043E2E /* PBXTargetDependency */ = {
7CBFE35C998286B4464A68BE9EB86C82 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = GMRouter;
target = 75956ED72576558B6E846FD2A08311F6 /* GMRouter */;
targetProxy = 24AE8CA2F057EB2BBFC75C0F922ECD60 /* PBXContainerItemProxy */;
targetProxy = A9005644F436F41BC3F356B6A1C835F4 /* PBXContainerItemProxy */;
};
EEB0ACBA7250F1C7A2515669F27AC6FD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = MJExtension;
target = 4D3BA58D0583DF37575CACAB3DDADC85 /* MJExtension */;
targetProxy = 4DF65C341EBF3DAC05C6906DC1B03C97 /* PBXContainerItemProxy */;
};
EF5F87724309A35E9785B45DD080B8FF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = MJExtension;
target = 4D3BA58D0583DF37575CACAB3DDADC85 /* MJExtension */;
targetProxy = A1D007BB11F245D65B5E7F319E07A284 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
......@@ -465,6 +753,69 @@
};
name = Release;
};
30EFF3B227C85FDC1B839AB6CEEACC22 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/GMRouter/GMRouter-prefix.pch";
INFOPLIST_FILE = "Target Support Files/GMRouter/GMRouter-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/GMRouter/GMRouter.modulemap";
PRODUCT_MODULE_NAME = GMRouter;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
4B4E1EB9267B3C9D6BB40577CF9DD06E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9B63B9BE61CAA13EA3E4A6C62A8823DE /* MJExtension.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
INFOPLIST_FILE = "Target Support Files/MJExtension/MJExtension-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/MJExtension/MJExtension.modulemap";
PRODUCT_MODULE_NAME = MJExtension;
PRODUCT_NAME = MJExtension;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
4BE66A09A74FD25164AAB3C2645B9B93 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
......@@ -558,69 +909,6 @@
};
name = Debug;
};
56EBC804638729F2A1D2DAA22E0ECC09 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B851DB4DC8EB267EFB7C4D404977444D /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/GMRouter/GMRouter-prefix.pch";
INFOPLIST_FILE = "Target Support Files/GMRouter/GMRouter-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/GMRouter/GMRouter.modulemap";
PRODUCT_MODULE_NAME = GMRouter;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
692409BEA7C1912A24DF8AAC6F84914A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B851DB4DC8EB267EFB7C4D404977444D /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/GMRouter/GMRouter-prefix.pch";
INFOPLIST_FILE = "Target Support Files/GMRouter/GMRouter-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/GMRouter/GMRouter.modulemap";
PRODUCT_MODULE_NAME = GMRouter;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
7EF7227D9B20A1D549000096ACCB23D7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
......@@ -685,7 +973,70 @@
};
name = Debug;
};
C0315FFD9CA2803C9E005B2F6C9830B7 /* Debug */ = {
837D50B4E33059373C781D8F653EBB30 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/GMRouter";
INFOPLIST_FILE = "Target Support Files/GMRouter/ResourceBundle-GMRouter-GMRouter-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
8603B8E4B1015D44B40C94FAD009FF11 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/GMRouter";
INFOPLIST_FILE = "Target Support Files/GMRouter/ResourceBundle-GMRouter-GMRouter-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
AE6364308B50826ED1B351345210CE6B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9B63B9BE61CAA13EA3E4A6C62A8823DE /* MJExtension.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
INFOPLIST_FILE = "Target Support Files/MJExtension/MJExtension-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/MJExtension/MJExtension.modulemap";
PRODUCT_MODULE_NAME = MJExtension;
PRODUCT_NAME = MJExtension;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
C7A600A084F6580DC1801AF566E5BD79 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CFAAB8C43015BCEB85A0C0ECF1A3CD4F /* Pods-GMRouter_Example.debug.xcconfig */;
buildSettings = {
......@@ -718,7 +1069,7 @@
};
name = Debug;
};
DAB85A705B78467AD7DD49A982683844 /* Release */ = {
C88E03A3E2962E878EEA29D5F5E66116 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 33ACD3930E0BC2F49FC4111CF4668169 /* Pods-GMRouter_Example.release.xcconfig */;
buildSettings = {
......@@ -752,6 +1103,38 @@
};
name = Release;
};
E78E47C679020762AD82EFCA0CB70FED /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4ED7BB17BC8B69E6BE8C221104BEE35B /* GMRouter.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/GMRouter/GMRouter-prefix.pch";
INFOPLIST_FILE = "Target Support Files/GMRouter/GMRouter-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/GMRouter/GMRouter.modulemap";
PRODUCT_MODULE_NAME = GMRouter;
PRODUCT_NAME = GMRouter;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
......@@ -764,6 +1147,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4099C8D6A094CC39E6BEBC8016626175 /* Build configuration list for PBXNativeTarget "Pods-GMRouter_Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C7A600A084F6580DC1801AF566E5BD79 /* Debug */,
C88E03A3E2962E878EEA29D5F5E66116 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
......@@ -773,20 +1165,29 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
733298EE3A3B7879C9CE922BF9253DFB /* Build configuration list for PBXNativeTarget "GMRouter" */ = {
60AF43421DA717591E54239F7EFCA996 /* Build configuration list for PBXNativeTarget "GMRouter" */ = {
isa = XCConfigurationList;
buildConfigurations = (
30EFF3B227C85FDC1B839AB6CEEACC22 /* Debug */,
E78E47C679020762AD82EFCA0CB70FED /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A058C815921111ABE94DA28673C084C4 /* Build configuration list for PBXNativeTarget "GMRouter-GMRouter" */ = {
isa = XCConfigurationList;
buildConfigurations = (
692409BEA7C1912A24DF8AAC6F84914A /* Debug */,
56EBC804638729F2A1D2DAA22E0ECC09 /* Release */,
837D50B4E33059373C781D8F653EBB30 /* Debug */,
8603B8E4B1015D44B40C94FAD009FF11 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EE53E4187262E95F4025FD1618867FA1 /* Build configuration list for PBXNativeTarget "Pods-GMRouter_Example" */ = {
DADB359E087FD3E01E5BF61485C011FD /* Build configuration list for PBXNativeTarget "MJExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C0315FFD9CA2803C9E005B2F6C9830B7 /* Debug */,
DAB85A705B78467AD7DD49A982683844 /* Release */,
AE6364308B50826ED1B351345210CE6B /* Debug */,
4B4E1EB9267B3C9D6BB40577CF9DD06E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
......
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
......@@ -12,6 +12,7 @@
#import "GMRouter+gm.h"
#import "GMRouter.h"
#import "NSObject+gmKey.h"
#import "Target_commons.h"
#import "UIViewController+Router.h"
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GMRouter
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_MJExtension : NSObject
@end
@implementation PodsDummy_MJExtension
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "MJExtension.h"
#import "MJExtensionConst.h"
#import "MJFoundation.h"
#import "MJProperty.h"
#import "MJPropertyKey.h"
#import "MJPropertyType.h"
#import "NSObject+MJClass.h"
#import "NSObject+MJCoding.h"
#import "NSObject+MJKeyValue.h"
#import "NSObject+MJProperty.h"
#import "NSString+MJExtension.h"
FOUNDATION_EXPORT double MJExtensionVersionNumber;
FOUNDATION_EXPORT const unsigned char MJExtensionVersionString[];
framework module MJExtension {
umbrella header "MJExtension-umbrella.h"
export *
module * { export * }
}
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJExtension
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJExtension
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
......@@ -3,7 +3,30 @@ This application makes use of the following third party libraries:
## GMRouter
Copyright (c) 2019 jz <qiaojinzhu@igengmei.com>
Copyright (c) 2019 Q14 <qiaojinzhu@igengmei.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## MJExtension
Copyright (c) 2013-2019 MJExtension (https://github.com/CoderMJLee/MJExtension)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -14,7 +14,7 @@
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2019 jz &lt;qiaojinzhu@igengmei.com&gt;
<string>Copyright (c) 2019 Q14 &lt;qiaojinzhu@igengmei.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -41,6 +41,35 @@ THE SOFTWARE.
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2013-2019 MJExtension (https://github.com/CoderMJLee/MJExtension)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>MJExtension</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
......
......@@ -162,9 +162,11 @@ strip_invalid_archs() {
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/GMRouter/GMRouter.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/GMRouter/GMRouter.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -framework "GMRouter"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter" -framework "MJExtension"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -framework "GMRouter"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter" -framework "MJExtension"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter" -framework "MJExtension"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMRouter/GMRouter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension/MJExtension.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "GMRouter" -framework "MJExtension"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
......@@ -2,8 +2,8 @@
// GMRouterTests.m
// GMRouterTests
//
// Created by jz on 11/28/2019.
// Copyright (c) 2019 jz. All rights reserved.
// Created by Q14 on 12/10/2019.
// Copyright (c) 2019 Q14. All rights reserved.
//
@import XCTest;
......
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'GMRouter'
s.version = '0.0.2'
s.version = '0.1.0'
s.summary = 'A short description of GMRouter.'
# This description is used to generate tags and improve search results.
......@@ -21,21 +21,22 @@ Pod::Spec.new do |s|
TODO: Add long description of the pod here.
DESC
s.homepage = 'http://git.wanmeizhensuo.com/gengmeiios/GMRouter.git'
s.homepage = 'https://github.com/Q14/GMRouter'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'jz' => 'qiaojinzhu@igengmei.com' }
s.source = { :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMRouter.git', :tag => s.version.to_s }
s.author = { 'Q14' => 'qiaojinzhu@igengmei.com' }
s.source = { :git => 'https://github.com/Q14/GMRouter.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '8.0'
s.source_files = 'GMRouter/Classes/**/*'
# s.resource_bundles = {
# 'GMRouter' => ['GMRouter/Assets/*.png']
# }
s.resource_bundles = {
'GMRouter' => ['GMRouter/Assets/*']
}
s.dependency 'MJExtension'
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
......
Copyright (c) 2019 jz <qiaojinzhu@igengmei.com>
Copyright (c) 2019 Q14 <qiaojinzhu@igengmei.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
# GMRouter
[![CI Status](https://img.shields.io/travis/jz/GMRouter.svg?style=flat)](https://travis-ci.org/jz/GMRouter)
[![CI Status](https://img.shields.io/travis/Q14/GMRouter.svg?style=flat)](https://travis-ci.org/Q14/GMRouter)
[![Version](https://img.shields.io/cocoapods/v/GMRouter.svg?style=flat)](https://cocoapods.org/pods/GMRouter)
[![License](https://img.shields.io/cocoapods/l/GMRouter.svg?style=flat)](https://cocoapods.org/pods/GMRouter)
[![Platform](https://img.shields.io/cocoapods/p/GMRouter.svg?style=flat)](https://cocoapods.org/pods/GMRouter)
......@@ -22,7 +22,7 @@ pod 'GMRouter'
## Author
jz, qiaojinzhu@igengmei.com
Q14, qiaojinzhu@igengmei.com
## License
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment