[iphone-python] Launch Application
Kheo
Kheo at Gmx.fr
Sat Sep 27 22:35:45 UTC 2008
Rick Kier a écrit :
> Hi,
>
> On Sep 27, 2008, at 6:09 PM, Kheo wrote:
>
>
>> Hi,
>>
>> I'm trying to launch another application.
>> I found that code to do this :
>> [self launchApplicationWithIdentifier: @"com.apple.Maps"
>> suspended:NO];
>>
>> So I wrote the equivalent in python :
>> self.launchApplicationWithIdentifier_suspended_("com.apple.Maps",
>> False)
>>
>
> Isn't the False supposed to be NO?
> (from objc import YES, NO, NULL)
>
> Hope this helps.
>
> We are newbies on this platform :-)
>
> Cheers,
>
> TeamSTARS,
>
> Rick and Dick
>
>
>> And It works... but no as I wanted. My application don't crash, but
>> the
>> Maps application don't start.
>> If I try to put so strange parameters like this :
>> self.launchApplicationWithIdentifier_suspended_("com.apple.Maps",
>> None)
>>
>> the application crash and tells me :
>> ValueError: depythonifying 'char', got 'NoneType'
>>
>>
>> So with the good parameters, launchApplicationWithIdentifier is
>> executed, but does nothing. Why ?
>> Any idea ?
>>
>> _______________________________________________
>> iPhone-Python mailing list
>> iPhone-Python at telesphoreo.org
>> http://www.telesphoreo.org/cgi-bin/mailman/listinfo/iphone-python
>>
>
>
> _______________________________________________
> iPhone-Python mailing list
> iPhone-Python at telesphoreo.org
> http://www.telesphoreo.org/cgi-bin/mailman/listinfo/iphone-python
>
>
In facts, it works for 2.0.x firmware.
for 2.1 and over, application need to be signed with correct entitlements :
ldid -Slaunch.xml python
where launch.xml is like :
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>com.saurik.OfflineMaps</string>
<key>com.apple.springboard.launchapplications</key>
<true/>
</dict>
</plist>
But I still in panic mode because now, I can't quite the application I
started. The only way is to ssh and killall Maps
Any Idea ?
More information about the iPhone-Python
mailing list