0

I would like to know, if i can use LSApplicationWorkspace class, for app store based applications.

The LSApplicationWorkspace.h has been named under "MobileCoreServices.framework" which is a public framework.The Below link provides information regarding the list of private and public Frameworks.

https://github.com/nst/iOS-Runtime-Headers

The Below Link provides list of header files under "MobileCoreServices.framework" from github

https://github.com/nst/iOS-Runtime-Headers/tree/master/Frameworks/MobileCoreServices.framework

And In the MobileCoreServices.framework from Xcode 7 beta iOS 9 sdk we have MobileCoreServices.h,UTCoreTypes.h and UTType.h header file.

They are different from each other. there is no MobileCoreServices.h, UTCoreTypes.h, UTType.h on github, also there is no LSXXX.h in the Xcode framework . Why are they different, I am confused about that. would you like give me some detail about that?

Thanks

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81

1 Answers1

0

LSApplicationWorkspace is private API, and apple not allows you to use the private frameworks, also they don't provide any documentation for it.

Private APIs/Runtime Headers : These are the APIs which are used by Apple itself to perform some background task, these APIs are not allowed for public use. If you include them in your code, then there are 99% chance that your app get rejected, remaining 1% is your Luck.

If you still want to use any private API in your app, then you need to perform this steps.

  1. Add given framework into your app.
  2. Add corresponding .h file of private API you want to use. (You dont have .m file, Just include .h file, so that Xcode doesnt throws the error for it).
  3. import given .h file in your code 4.now use any method of given private api that you want.

Steps to get all private APIs+ Public APIs of given framework:

For example if you want to get all apis of UIKit Framework the run these commands in your terminal:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks/UIKit.framework/
$ mkdir ~/Desktop/headers
$ class-dump ./UIKit -H -o ~/Desktop/headers
Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81