Jason Parsley
2017-01-12 21:19:28 UTC
(I’m posting this for Robin Harrington who is having email problems at the moment)
Hi,
I’ve been using a couple of functions from MacOSLib to check the validity of the certificate in the app bundle as per the article in RealBasic magazine . Here is the code snippet I’ve been using:
If not AppStoreVerified then //7.1.1 simplified check
// code from RSD Jan/Feb 2011 to check for appropriate receipt in the apps bundle folder
dim appBundleID as String = "com.ramonsoftware.myaccounts" //AppID sent to Apple
dim f as folderItem = App.ExecutableFile.Parent.Parent.Child("_MASReceipt").Child("receipt")
if Carbon.SystemVersionAsInt >= 100606 then //OSX 10.6.6 or higher
Debug ("App.Open detected 10.6.5+.")
AppStoreVerified = True //turn on falsely
if not CertTools.IsValid (CertTools.DeviceGUID, CertTools.ReadReceipt(f), appBundleID) then
AppStoreVerified = False //reset away from message
declare sub exit_ lib "System" alias "exit" (code as Integer)
exit_ (173) //Suggest to user to log into App Store
else
Debug ("App.Open setting AppStoreVerified.")
//done earlier
end if
else
Debug ("App.Open version warning needs to be displayed.")
OsWarnNeeded = True //set for later display
end if
end if
It appears that MacOSLib is now blocking my ability to move to 64bit and the update to the library is unlikely to happen in the foreseeable future.
Is there an update to this code available or is there a better way to check for a valid certificate in the appBundle.
Many thanks in advance for your help. Regards to all, Robin
_______________________________________________
Xojo forum:
https://fo
Hi,
I’ve been using a couple of functions from MacOSLib to check the validity of the certificate in the app bundle as per the article in RealBasic magazine . Here is the code snippet I’ve been using:
If not AppStoreVerified then //7.1.1 simplified check
// code from RSD Jan/Feb 2011 to check for appropriate receipt in the apps bundle folder
dim appBundleID as String = "com.ramonsoftware.myaccounts" //AppID sent to Apple
dim f as folderItem = App.ExecutableFile.Parent.Parent.Child("_MASReceipt").Child("receipt")
if Carbon.SystemVersionAsInt >= 100606 then //OSX 10.6.6 or higher
Debug ("App.Open detected 10.6.5+.")
AppStoreVerified = True //turn on falsely
if not CertTools.IsValid (CertTools.DeviceGUID, CertTools.ReadReceipt(f), appBundleID) then
AppStoreVerified = False //reset away from message
declare sub exit_ lib "System" alias "exit" (code as Integer)
exit_ (173) //Suggest to user to log into App Store
else
Debug ("App.Open setting AppStoreVerified.")
//done earlier
end if
else
Debug ("App.Open version warning needs to be displayed.")
OsWarnNeeded = True //set for later display
end if
end if
It appears that MacOSLib is now blocking my ability to move to 64bit and the update to the library is unlikely to happen in the foreseeable future.
Is there an update to this code available or is there a better way to check for a valid certificate in the appBundle.
Many thanks in advance for your help. Regards to all, Robin
_______________________________________________
Xojo forum:
https://fo