diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 998109d0..0cd3b576 100755 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -31,7 +31,7 @@ 1A8B0F00D6903A046FE40BCE /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = ""; }; 306F6BF61D22BCEB00F727A6 /* Repository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Repository.swift; sourceTree = ""; }; 306F6BF81D22BCF400F727A6 /* Owner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Owner.swift; sourceTree = ""; }; - 5EC197E01A1BB16D00F4DFD4 /* 4Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 4Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5EC197E01A1BB16D00F4DFD4 /* 44Demo5.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 44Demo5.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5EC197E41A1BB16D00F4DFD4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5EC197E51A1BB16D00F4DFD4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 5EC197E71A1BB16D00F4DFD4 /* MoyaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaViewController.swift; sourceTree = ""; }; @@ -98,7 +98,7 @@ 5EC197E11A1BB16D00F4DFD4 /* Products */ = { isa = PBXGroup; children = ( - 5EC197E01A1BB16D00F4DFD4 /* 4Demo.app */, + 5EC197E01A1BB16D00F4DFD4 /* 44Demo5.app */, ); name = Products; sourceTree = ""; @@ -154,9 +154,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 5EC197DF1A1BB16D00F4DFD4 /* 4Demo */ = { + 5EC197DF1A1BB16D00F4DFD4 /* 44Demo5 */ = { isa = PBXNativeTarget; - buildConfigurationList = 5EC198011A1BB16D00F4DFD4 /* Build configuration list for PBXNativeTarget "4Demo" */; + buildConfigurationList = 5EC198011A1BB16D00F4DFD4 /* Build configuration list for PBXNativeTarget "44Demo5" */; buildPhases = ( 9B2248C62406490041BDC8AD /* [CP] Check Pods Manifest.lock */, 5EC197DC1A1BB16D00F4DFD4 /* Sources */, @@ -169,9 +169,9 @@ ); dependencies = ( ); - name = 4Demo; + name = 44Demo5; productName = Demo; - productReference = 5EC197E01A1BB16D00F4DFD4 /* 4Demo.app */; + productReference = 5EC197E01A1BB16D00F4DFD4 /* 44Demo5.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -205,7 +205,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 5EC197DF1A1BB16D00F4DFD4 /* 4Demo */, + 5EC197DF1A1BB16D00F4DFD4 /* 44Demo5 */, ); }; /* End PBXProject section */ @@ -472,7 +472,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5EC198011A1BB16D00F4DFD4 /* Build configuration list for PBXNativeTarget "4Demo" */ = { + 5EC198011A1BB16D00F4DFD4 /* Build configuration list for PBXNativeTarget "44Demo5" */ = { isa = XCConfigurationList; buildConfigurations = ( 5EC198031A1BB16D00F4DFD4 /* Release */, diff --git a/Demo/Demo.xcodeproj/xcuserdata/eve21962.xcuserdatad/xcschemes/Demo.xcscheme b/Demo/Demo.xcodeproj/xcuserdata/eve21962.xcuserdatad/xcschemes/Demo.xcscheme index c8f9577f..ce2a566b 100644 --- a/Demo/Demo.xcodeproj/xcuserdata/eve21962.xcuserdatad/xcschemes/Demo.xcscheme +++ b/Demo/Demo.xcodeproj/xcuserdata/eve21962.xcuserdatad/xcschemes/Demo.xcscheme @@ -15,8 +15,8 @@ @@ -34,8 +34,8 @@ @@ -58,8 +58,8 @@ @@ -77,8 +77,8 @@ diff --git a/EVReflection.podspec b/EVReflection.podspec index 9808dd18..5c66bfec 100755 --- a/EVReflection.podspec +++ b/EVReflection.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "EVReflection" - s.version = "5.3.0" + s.version = "5.3.1" s.summary = "Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift" s.description = <<-EOS diff --git a/EVReflection.xcworkspace/xcuserdata/eve21962.xcuserdatad/UserInterfaceState.xcuserstate b/EVReflection.xcworkspace/xcuserdata/eve21962.xcuserdatad/UserInterfaceState.xcuserstate index 9632000f..f6d80dfd 100644 Binary files a/EVReflection.xcworkspace/xcuserdata/eve21962.xcuserdatad/UserInterfaceState.xcuserstate and b/EVReflection.xcworkspace/xcuserdata/eve21962.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Source/EVReflection.swift b/Source/EVReflection.swift index 9f0aa5ac..c80d0841 100755 --- a/Source/EVReflection.swift +++ b/Source/EVReflection.swift @@ -591,6 +591,11 @@ final public class EVReflection { appName = appName.characters.split(whereSeparator: {$0 == "."}).map({ String($0) }).last ?? "" } + // First character may not be a number + if appName.prefix(1) >= "0" && appName.prefix(1) <= "9" { + appName = "_" + String(appName.characters.dropFirst()) + } + // Clean up special characters return appName.components(separatedBy: illegalCharacterSet).joined(separator: "_") } @@ -1089,7 +1094,7 @@ final public class EVReflection { } /// Character that will be replaced by _ from the keys in a dictionary / json - fileprivate static let illegalCharacterSet = CharacterSet(charactersIn: " -&%#@!$^*()<>?.,:;1234567890") + fileprivate static let illegalCharacterSet = CharacterSet(charactersIn: " -&%#@!$^*()<>?.,:;") /// processIllegalCharacters Cache fileprivate static var processIllegalCharactersCache = NSCache()