Yosemite issues

Yes, the only way to use shell stuff in sandbox apps is with NSTask. No other way around it.

OK, today I’m yet to test the options indicated Dave S and then return aquinpara say if it worked as it may help other members that have the same problem.

For report, I did several tests and yosemith only managed to capture consistency with Mac serial number via AppleScripts, with the codes I and Dave’s code put Up got erratic results, I will wait a little longer until the final release but if anyone has any suggestion is welcome for testing.

At the Xojo Developer Conference this past spring, they showed a roadmap to Xojo 64-bit and explained what all was involved in making both the old and the new Xojo compiler. It was great to hear, and their target for 64-bit is “spring 2015”. I assume that also means it could be sometime after that, but they’re definitely working hard on it now.

I think MBS has such class. Maybe try that one instead.

A lot of my current applications in the MAS use shell. I just tested a short sandboxed application under 10.10 and it works fine in mode 0 and 1. But I still have to test with ApplicationData, as Niles Mitchell reported it does not work. Fortunately, I do not need to shell into it at present.

Do you start a unix binary in the shell?

No, I did not yet, but I can try.

I just tried in sandbox to save a text file in Documents then cp it to AppData. Both in containers, then. Works fine.

Use NSAppleScript for executing Apple Scripts, it’s the correct way to do it and is the Sandbox approved method (if you Sandbox your app in the future).

I have no doubt about that !

I reported a 32-bit Carbon bug in DP4 and they fixed it in DP5, so there’s hope that Apple listens.

[quote]Christoph De Vocht I think MBS has such class. Maybe try that one instead
[/quote]

Thanks Christoph De Vocht but if the final version still gives problem I will use AppleScripts because I try to avoid plugins in my projects because I do not like to lose control over future updates.

OK. Just ran a sandboxed test app to see if a shell can launch a Unix executable.
I dragged into the project the env binary program from /usr/bin
The program then creates it in ApplicationData with BinaryStream,
then it shells a chmod 775 of that file,
and finally executes it.

Everything works fine.

[quote=121934:@Michel Bujardet]OK. Just ran a sandboxed test app to see if a shell can launch a Unix executable.
I dragged into the project the env binary program from /usr/bin
The program then creates it in ApplicationData with BinaryStream,
then it shells a chmod 775 of that file,
and finally executes it.

Everything works fine.[/quote]

I ones did a lot of tests and it never worked out fine. Maybe Xojo Inc changed something?
I will do some new tests asap.

Thanks for the info

Nothing to do with Xojo, but apparently Netflix using Microsoft Silverlight simply cannot run under Yosemite in Safari. It seems to play a video fine, and looses network after a couple seconds.

It is especially strange in light of Apple claim that the new system is especially suited to save battery when playing Netflix https://www.apple.com/osx/preview/apps/

Hi guys,

          I did more tests and found that the results in Yosemith Shell are different, in my code below the Serial coming on line 2 but Yosemith is line 18, has reported to Apple and asked if this change was scheduled and not me have returned, anyway this is the reason of the errors in my projects reported.

Actual:

[quote]dim sh as new shell
sh.Execute “system_profiler SPHardwareDataType | grep ‘Serial Number’”
dim sn as string = sh.Result.NthField( “:”, 2 ).Trim[/quote]

Yosemith:

[quote]dim sh as new shell
sh.Execute “system_profiler SPHardwareDataType | grep ‘Serial Number’”
dim sn as string = sh.Result.NthField( “:”, 18 ).Trim
[/quote]

[quote=122006:@Paulo Vargas]Hi guys,

          I did more tests and found that the results in Yosemith Shell are different, in my code below the Serial coming on line 2 but Yosemith is line 18, has reported to Apple and asked if this change was scheduled and not me have returned, anyway this is the reason of the errors in my projects reported.

[/quote]
I expect Apple will say “Use the provided system API for retrieving this”
System profiler output can (and obviously did) change so relying on things being in a specific position can be problematic

@Paulo: You can use SystemInformationMBS.MacSerialNumber function.

Or use MacOSLib which has this method

MacSystemprofiler.HW_SerialNumber

In the fast way don’t report to Apple, but, do a select case depending on the OS X version:

select case OSX_Name case "Lion","Mountain Lion","Mavericks" //Read line 2 else //"Yosemite" //this is important to cover future OS X versions automatically. Read line 18 end select

app.GetOSX_NameMethod:

[code]dim sys1, sys2 as Integer
//be more specific
call System.Gestalt(“sys1”, sys1)
call System.Gestalt(“sys2”, sys2)

select case sys1
case 10 //os=“Mac OS X”
select case sys2
case 6
OSX_Name=“Snow Leopard”
case 7
OSX_Name=“Lion”
case 8
OSX_Name=“Mountain Lion”
case 9
OSX_Name=“Mavericks”
case 10
OSX_Name=“Yosemite”
end Select
end Select[/code]
Better to use the OSX_Name variable as integer instead of the String variable that I’ve created.