iTunesMetadata.plist location on ios8 - ios

I want to identify if the current version of an app using my SDK was downloaded from the AppStore, till now I used this code:
[[NSFileManager defaultManager] fileExistsAtPath:[NSHomeDirectory() stringByAppendingPathComponent:#"iTunesMetadata.plist"]]
Since ios8 I get false even if the version is from the AppStore.
Do you know where did the file move to? Any other mechanism you propose?

Hope this helps you:
In iOS8, the application bundle has been moved. According to #silyevsk, the plist is now one level above [the new application main bundle path], at /private/var/mobile/Containers/Bundle/Application/4A74359F-E6CD-44C9-925D-AC82Eā€Œā€Œā€‹ā€‹B5EA837/iTunesMetadata.plist, and unfortunately, this can't be accessed from the app (permission denied)
Please refer here for more details: How can I detect if the currently running app was installed from the app store?

Related

iOS run on Apple Silicon - Mail to open file is NOT placed in "Documents/Inbox"

From Apple's iOS development document:
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
So in native IOS environment, when I used Mail to open some file attachment and chose my iOS app to open it, I can find the file copied to "Documents/Inbox" directory.
But when I run iOS in Apple Silicon - the same above scenario, the file is NOT copied to "Documents/Inbox". In fact, there is no "Inbox" sub-directory under "Documents".
Does anyone know where the file copied to?
Got answer from Apple Developer Forum:
"From your app delegate's [application:openURL:options:] method, you can NSLog the [url path]."
Getting the original file path from [url path] and then copy to "Documents" which now I can manipulate this mail attachment file. So have to do this and cannot hard code the file path: "Documents/InBox" which only work reliably in iOS device..

iOS APP cannot launch successfully after updated from Apple Store

In my flutter iOS app, every time the app is launched, it would call PathProvider.getApplicationDocumentsDirectory() to get the app documents directory to access to the previously saved data. If I install the app on an iOS device(not update here), the app could work exactly as expected. But if I updated the app from Apple Store or from Xcode, the app cannot longer be launched successfully. When I try to debug, I found the app caught exceptions at working with the drectory returned by PathProvider.getApplicationDocumentsDirectory(). Anybody could give some suggestions for fixing this? Thanks in advance.
For more information, when launched, my app has to execute createSync(recursive=true) if it does not find some app documents directories where I would store user-generated data. The app documents directories are returned by PathProvider.getApplicationDocumentsDirectory. However, after I updated the app, and when launched the app, PathProvider.getApplicationDocumentsDirectory() could still return a directory which has appropriate pattern, but the returned directory may not be the right directory since my app failed to find previously created folders there, so the app had to create the relevant directory for storing user-generated data again, and then I always got the error as below
FileSystemException: Creation failed (OS Error: Operation not permitted, errno = 1)
when I tried to create the directory with createSync(recursive=true), and no matter the version of path_provider was 1.20 or 1.10, the phenomenon persisted. Please help.
I assume the error you got is both happened in iOS simulator & iOS device ?
Get the path
Would you mind try to run on iOS simulator, and print out the path of the folder you try to access.
Open the folder in Finder
And with the printed folder path, you can open the folder with Finder by Cmd + G.
The error
Your mentioned error usually is because accessing the folder not belong to the app.
Let's see more after you print out the folder path.

Why would a Unity3D app [exported to to an Xcode project] fail because ip_unity_plugin.bundle has "unsealed contents present in the bundle root"?

I am a Swift developer submitting an app made by a Unity3D developer colleague which is destined for the App Store. The Xcode project has this file in it:
Frameworks/Plugins/x86_64/ip_unity_plugin.bundle
...which I presume is required in order to run Unity within an iPhone app (yes, no?)
When validating the latest archive of the build I get this warning:
Code signing "ip_unity_plugin.bundle" failed.
View distribution logs for more information.
The logs state that:
.../myClients.app/ip_unity_plugin.bundle: unsealed contents present in the bundle root
Which has me like šŸ¤·šŸ½ā€ā™€ļø
Any ideas anyone?
Thank you for reading.
That bundle is actually the instant preview library for Google Daydream.
If you're building for release it's safe to delete it from the Assets/Plugins directory of Unity.
Alternatively you can mark the bundle to not be compiled by changing it's metadata in the inspector. You might also find that this problem goes away if you update to a newer version of instance preview.

App upload with Application loader

I have tried to upload app using Application Loader on Mac.
An upload is succeed however there is not any app in iTunes Connect in my app.
Version and SkuID and AppleID is match between app information in iTunes Connect and the app which is uploaded using Application Loader.
so causing of that, I cannot complete 'submit for review'.
Could you help me please?
Thank you for any further help.
succeed upload app
there is not appearance
Binary on iTunes connect is corrupted. To resolve this, check your binary is compatible with Ios 10.
Please use this link for permission in plist file then try to upload new build with new build version.
iOS 10 - Changes in asking permissions of Camera, microphone and Photo Library causing application to crash
https://i.stack.imgur.com/aY8RG.png
If it's not resolved , please contact iTunes connect support to find out the exact reason. They will reply on mailbox with exact reason of binary corruption. Then needful actions to resolve issue.
https://www.apple.com/itunes/go/itunesconnect/contactus
The problem was to use XCode 5.1.
When I use XCode 6.2, everything went thought well.
Use Application Loader with XCode after 6.
Thank you for everyone.

Upload .ipa using application loader

I want to submit iOS app using application loader. I keep seeing
Authenticating with the iTunes Store.
On this answer I found that I should change port from 443 to 80 in file
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib/net.properties.
But I am not able to do that.
Changing the file through terminal says it is read only. The answer in above link asks to use text mate command. But using that says text -command not found.
Is there a way to do it through finder? Or any other way?
If you want to open file in textmate the run this commend
mate <the file name>
Application loader must be compatible with xcode and itunes then only it will work, so please check for compatibility if the available application loader version is not compatible then you can download it from your developer account.
Got solution from SO question.
Just restating from that :
Launch Application Loader and started submitting.
When it gets to the Authenticating with the iTunes Store,
Launch Organiser from Xcode and select Distribution over archiver in Xcode and start uploading .ipa file.
This will work. Look at more answers on same question.

Resources