AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Compiling ChatScript under iOS
 
 
  [ # 16 ]

The system is nominally set up to understand iOS file use behavior.
unsigned int InitSystem(int argc, char * argv[],char* unchangedPath, char* readOnlyPath, char* writeablePath)
So iOS bundle path would be the 3rd arg.
The system calls different fopen routines for the different kinds of file opens it does, including
FopenStaticReadOnly,  FopenReadOnly, etc.

So you SHOULDN’T be having to manually recode any source lines to get the right behavior.

From your output traces, the iOS version is not happy reading LIVEDATA/posrules.txt for some reason, while your main version is.

 

 
  [ # 17 ]

The problem is, the files are put into a very obfuscated folder like this:

/Users/infaspire/Library/Application Support/iPhone Simulator/5.1/Applications/4EFF23AE-A3E1-42E8-8FF0-029F6CBF4988/AppName.app/

And then all the files are put at that root level. In XCode, I can create Groups that look like Folders, but no folders are created in the compiled project.

So if there is a LIVEDATA/posrules.txt, I need to eliminate the LIVEDATA/ part unless I can figure out some way to force XCode to create folders there. I’ll do some research on that front.

Also, just going to a relative root path: “posrules.txt” didn’t seem to be working. I had to use a method which returns the bundle location - the long folder name above - and then append the posrules.txt to it. I will retry relative paths though, maybe it was a bug due to something else early on that I’ve since eliminated and it might work now.

 

 
  [ # 18 ]

OK, it looks like there is a way to create the folders, so now I need to spend a little time putting the resources back with the folders and updating the areas in the source where I manually changed the paths. I’ll post an update later tonight.

 

 
  [ # 19 ]

if you have provided the bundle path to the initchatscript, it will append the file name at the end of the path when it wants to open it.

 

 
  [ # 20 ]

Great news! I have finally gotten it fully working.

I reverted all the file changes and passed in the paths as you advised, and I’ve gotten it going with responses now. I did a test against the console version and I am able to get the same dialog paths to occur now.

I’ll document the correct steps at some point in the coming days/weeks when time permits.

Now, I am going to be on to the next steps - the dictionary and actually building the bot/conversation topics. I’ll reach out to you to have a discussion sometime tomorrow if you are available.

 

 
  [ # 21 ]

Congratulations on getting past the preliminaries. Now for the juicy hard problems. smile

 

 < 1 2
2 of 2
 
  login or register to react