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
Related
While submitting the safari extension in Safari extension gallery I am getting the query of During our review of your extension we found that the Info.plist is missing the ‘Website' field.
URL is already mentioned in the plist file.
info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Author</key>
<string>OpenText</string>
<key>Builder Version</key>
<string>13606.2.104</string>
<key>CFBundleDisplayName</key>
<string>DCMExtension</string>
<key>CFBundleIdentifier</key>
<string>com.emc.documentum.CTF</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Chrome</key>
<dict>
<key>Global Page</key>
<string>global.html</string>
</dict>
<key>Content</key>
<dict>
<key>Scripts</key>
<dict>
<key>End</key>
<array>
<string>ContentScript.js</string>
</array>
</dict>
</dict>
<key>Description</key>
<string>Assists in content transfer of files in xCP, D2 and Webtop applications</string>
<key>DeveloperIdentifier</key>
<string>4B9GHJ9X43</string>
<key>ExtensionInfoDictionaryVersion</key>
<string>1.0</string>
<key>Permissions</key>
<dict>
<key>Website Access</key>
<dict>
<key>Include Secure Pages</key>
<true/>
<key>Level</key>
<string>All</string>
</dict>
</dict>
<key>URL</key>
<string>https://raw.github.com/d2user/safari/master/DCMExtension.safariextz</string>
<key>Update From Gallery</key>
<true/>
</dict>
</plist>
I just had one more doubt that while submitting the extension it was asking about the website in submission form
submission in safari extension gallery
I am keeping the website blank, is that is causing the problem and do I need to mention just the website of the product or from where we are downloading it.
Does it also have any references for that in the info.plist? Any hint on this!!!
We need to add website in the info.plist
<key>Website</key>
<string>https://github.com/spadin/js-beautify-safari-extension</string>
https://github.com/spadin/js-beautify-safari-extension/blob/master/Info.plist
1) The following code give me an error on IOS but work on Android.
2) On IOS i Can make fetch with "get" but "post" fails
so this don't work on ios :
var data = new FormData();
data.append("fileUpload", { uri: imageUri, name: filename, type: "image/jpeg" });
data.append("filename", filename);
data.append("name", "uploadedFile");
const config = {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "multipart/form-data;"
},
body: data
};
return fetch(url, config).then((response) => response.json())
.then(res => { return res ;})
.catch(error => {
console.error(error);
return { name: "network error", description: "" };
});
i try to fix the info.plist on IOS according to other post (like React Native fetch() Network Request Failed) but the error still there
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>myapp</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key> // i add this
<dict> // i add this
<key>NSAllowsArbitraryLoads</key> // i add this
<true/> // i add this
<key>NSAllowsArbitraryLoadsInWebContent</key> // i add this
<true/> // i add this
</dict> // i add this
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microsphone is accessed for the first time</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
<key>UIAppFonts</key>
<array>
<string>Zocial.ttf</string>
<string>Feather.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>LSApplicationCategoryType</key>
<string></string>
</dict>
</plist>
i try to restart xcode, clean project and build all.
any advice ? thanks
iOS does not allow insecure HTTP requests. In order to do so, you have to add your domain as an exception inside your info.plist.
Add the following:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourserver.com</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
Finder Sync Extensions can be enabled or disabled from the extension's settings in System Preferences.
My Extension isn't launching with the application, even when the check mark for the extension is enabled.
So to launch the extension, i disable my extension and enable it again. This isn't launching the extension app?
Is thus wanted to know if i am missing any aspect here.
Note: If the app is running, and i disable the extension, it quits the extension app (takes some time to do so)
My Finder Sync Extension's Info.Plist.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>My Finder Integration</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
<true/>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict/>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.FinderSync</string>
<key>NSExtensionPrincipalClass</key>
<string>FinderSync</string>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © **** All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
According to this documentation, the value for the key NSExtensionPrincipalClass should include the module name separated by a .:
<string>$(PRODUCT_MODULE_NAME).FinderSync</string>
I am a newbie to launch agent and daemons.I have created a pre-login agent and it will launch my application when login window open.I can simulate the keyboard and mouse events with CGEventPost in the user session. Please refer the code
//For Keyboard
CGEventRef keyEvent = CGEventCreateKeyboardEvent( NULL, keyCode, down ) ;
CGEventPost( kCGHIDEventTap, keyEvent ) ;
CFRelease( keyEvent ) ;
//For Mouse
CGEventRef event = CGEventCreateMouseEvent(eventSource, eventType, mouseLocation, mouseButton );
CGEventPost(kCGHIDEventTap, event);
CFRelease(event);
//Pre-login launch agent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my app label</string>
<key>LimitLoadToSessionType</key>
<string>LoginWindow</string>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>My app directory</string>
<key>ProgramArguments</key>
<array>
<string>app absolute path</string>
<string>service</string>
<string>myservice</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
CGEventPost is not working in Pre-Login window. How to solve it? Is there any alternative way?
I have a trouble at uploading a AIR iOS app, it always say:
"Invalid Profile: distribution build entitlements must have get-task-allow set to false."
step 1:
I package the app with the adhoc provision file, failed.
step 2:
I added something to xml file.
<iPhone>
<InfoAdditions><![CDATA[
<key>Entitlements</key>
<dict>
<key>get-task-allow</key>
<false/>
</dict>
....
still failed.
<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<!-- iPhone support -->
<string>1</string>
<!-- iPad support -->
<!--<string>2</string>-->
</array>
]]></InfoAdditions>
<Entitlements>
<![CDATA[
<key>get-task-allow</key>
<false/>
]]>
</Entitlements>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>