How add entitlement via ldid

谁说胖子不能爱 提交于 2019-11-28 05:21:08

问题


I have some problems. I want use in my app next function:

int SBSLaunchApplicationWithIdentifier(CFStringRef displayIdentifier, Boolean suspended);
  • I add SpringboardServices.framework in my project
  • I add URL Schemes for my app
  • Created the file entitlement.xml with
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> 
<dict> 
    <key>com.apple.springboard.launchapplications</key> 
    <true/> 
</dict> 
</plist>
  • Paste entitlement.xml in `Developer/Xcode/DerivedData/MyApp-efjwoxgwdyixnfassijmwtptxvlj/Build/Products/Debug-iphoneos/

  • Paste ldid in Developer/Xcode/DerivedData/MyApp-efjwoxgwdyixnfassijmwtptxvlj/Build/Products/Debug-iphoneos/

  • Did ./ldid -Sentitlement.xml MyApp.app/MyApp in console. It's good working But I saw some problem:

  • I did ./ldid -e MyApp.app/MyApp and saw next in console(double output entitlement.xml):
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "apple.com/DTDs/PropertyList-1.0.dtd">; 
<plist version="1.0"> 
<dict> 
    <key>com.apple.springboard.launchapplications</key> 
    <true/> 
</dict> 
</plist>
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "apple.com/DTDs/PropertyList-1.0.dtd">; 
<plist version="1.0"> 
<dict> 
    <key>com.apple.springboard.launchapplications</key> 
    <true/> 
</dict> 
</plist>
  • I create MyApp.ipa file consist with:
ItunesArtwork
Payload
|---MyApp.app
|---Info.plist
  • I installed this ipa file on my jailbreak iPhone via iTools MyApp is run but can't do some function. I try authorization via Internet and it's false. But when I installed app without added entitlement an didn't do some instruction with ldid, application working fine.

P.S: i didn't set in true Targets->AppName->Summary->Entitlements property (is it true or false ?) Please help me

来源:https://stackoverflow.com/questions/18347180/how-add-entitlement-via-ldid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!