Merge branch 'master' into feature/initialization
* master: Update git ignore Bump up pod version Minor code enhancements Fix for DeviceGUIDRetriever.guid() crash in macos
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData/
|
||||
Packages/
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "TPInAppReceipt"
|
||||
s.version = "1.1.3"
|
||||
s.version = "1.1.4"
|
||||
s.summary = "Validates and parses Apple Store Receipt."
|
||||
|
||||
s.description = "This helper validates and parses the payload and the PKCS7 container itself. Pure swift, openssl+bitcode"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.1.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
@@ -42,8 +42,8 @@ class DeviceGUIDRetriever
|
||||
assertionFailure("Failed to retrieve guid")
|
||||
}
|
||||
|
||||
// Iterate over the result
|
||||
var guidCFData: CFData!
|
||||
// Iterate over the result
|
||||
var guidData: Data!
|
||||
var service = IOIteratorNext(iterator)
|
||||
var parentService = io_object_t()
|
||||
|
||||
@@ -51,23 +51,33 @@ class DeviceGUIDRetriever
|
||||
{
|
||||
IOObjectRelease(iterator)
|
||||
}
|
||||
|
||||
while(service != 0)
|
||||
{
|
||||
kernResult = IORegistryEntryGetParentEntry(service, kIOServicePlane, &parentService);
|
||||
kernResult = IORegistryEntryGetParentEntry(service, kIOServicePlane, &parentService)
|
||||
|
||||
if (kernResult == KERN_SUCCESS)
|
||||
{
|
||||
guidCFData = IORegistryEntryCreateCFProperty(parentService, "IOMACAddress" as CFString, nil, 0) as! CFData?
|
||||
guidData = IORegistryEntryCreateCFProperty(parentService, "IOMACAddress" as CFString, nil, 0).takeRetainedValue() as! Data
|
||||
|
||||
IOObjectRelease(parentService)
|
||||
}
|
||||
IOObjectRelease(service)
|
||||
|
||||
if let _ = guidCFData
|
||||
{
|
||||
if guidData != nil {
|
||||
break
|
||||
}else{
|
||||
service = IOIteratorNext(iterator)
|
||||
}
|
||||
}
|
||||
|
||||
return guidCFData as Data
|
||||
if guidData == nil
|
||||
{
|
||||
assertionFailure("Failed to retrieve guid")
|
||||
}
|
||||
|
||||
return guidData
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user