Closed djjd47130 closed 9 years ago
NOTE: Above version details are just one specific example, but I cannot get it to work on any iOS device/version.
Discussion on Stack Overflow:
http://stackoverflow.com/questions/30547414/projects-fail-to-start-in-ios-when-adding-xsuperobject
I found exactly where the exception happens...
In System.RegularExpressionsCore:
{$IFDEF DYNAMIC_LIB} class constructor TPerlRegEx.Create; begin if not LoadPCRELib then RaiseLastOSError; //<-- Exception raised here end;
class destructor TPerlRegEx.Destroy; begin UnloadPCRELib; end; {$ENDIF DYNAMIC_LIB}
So it seems to be unable to find /usr/lib/libpcre.dylib, but only if I'm using X-SuperObject. If I use System.RegularExpressionsCore by itself without XSuperJSON, it works just fine.
I've updated XCode and all SDK references, and verified all matches, but still this issue persists.
The problem was solved by installing an iOS 8 Hotfix for Delphi XE8, specifically fixing the way in which the PCRELib
is loaded.
Using Delphi XE8, I have issues using XSuperObject on iOS (iPad Air Simulator) 8.2 and 8.3. So I started an empty Firemonkey app, started adding some things which were in my prior project (at this point I didn't know what the issue was). All worked fine up until I added the latest XSuperObject and XSuperJSON units to my app. Upon running in the iOS simulator, I get an exception:
Project dyld_sim raised exception class EOSError with message 'System Error. Code: 2. No such file or directory.
When I break, it takes me to:
System.SysUtils.RaiseLastOSError
- last lineraise Error;
...which is just the spot where the actual exception itself was raised, nothing of relevance.
So I opened the main project file and put a break point right on the first line "Application.Initialize;" but that break point is never reached. I also put breakpoints in the "initialization" of both XSuperObject and XSuperJSON and neither of them stop either.
Once I removed both units, everything worked again.
X-SuperObject Version: Pulled update from here just prior to reporting Delphi XE8 Version 22.0.19027.8951 (No Updates) IDE OS: Windows 7 SP1 (Version 6.1, Build 7601, 64bit) Mac OS: OS-X 10.10.3 Target OS: iOS Simulator - iPad Air / iOS 8.2 (12D508)