Documentation for CGS Methods (Core Graphics Services) - ios

Where can I find the documentation for Core Graphics Services method specifically these methods: CGSGetWindowBounds and CGSNewRegionWithData.
Thanks!

There is none. Those functions are private and undocumented. If you Google their names, you'll find some places people have written about them, but Apple doesn't mean for you to be using them in the first place.

Related

Anylogic getRemainingTime and Functions

I am building a fairly simple model in Anylogic, and need to use the delay function 'getRemainingTime' and some functions in the 'queue' block: priority-based queueing, preemption and timeout. I have been unable to find a tutorial or examples online which talk about these. Could anyone please point out a resource or a built-in tutorial in Anylogic that covers things like this for beginner programmers like myself?
Thanks,
Mohit
You can find the official documentation of the 'Delay' block here:
AnyLogic Documentation: Delay Block
The following built-in example models are adressing your topic. Access them in AnyLogic under Help/Example Models and then search for the names:
Call Center
Customer Support Center
Interconnected Call Centers

How to change iPhone's Screen Display Color with Private APIs?

I have seen so many posts regarding the same but all are outdated or not working anymore.
I am using iOS-Runtime-Headers and everything is just nicely setup. But it said that I can't find out the method in which I can set iPhone's screen display color. This should be possible with private APIs as long as, we've NightMode from iOS 9.3.1.
And yes, I am aware that if I will be using any private APIs, Apple will surely reject it.
Have you check out the GammaThingy project out?
It works a bit similar to f.lux and NightShift and maybe the code of the GammaController there can help you achieve what you want
You may also want to check out GoodNight, which is based off of GammaThingy, but a little bit more "polished". The reason why you cannot find the methods in the dumped headers is because the entire app uses C functions, NOT Objective-C methods. Specifically, it uses the private IOMobileFramebuffer framework (IOMobileFramebufferSetGammaTable is the main function used). I have put together a rather extensive disassembly of it here if you are interested.

Does Commom Crypto library supports below key encapsulation RFC?

I try to use below RFC algorithm in my app:
https://www.rfc-editor.org/rfc/rfc5990
Bouncy Castle for c# and java supports it but I am working on iOS. As I know best tools for cryptography in ios is commoncrypto library. So the question is that whether this library supports it or not?
I do not find any usefull information on documentation and hope someone here can help.
I don't see any references to it, but it should be relatively easy to implement this yourself. You can follow the code of Bouncy and implement using the misnamed SecKeyEncrypt with kSecPaddingNone. The KDF's used (KDF2 and 3) are rather simple as well.
So although I don't usually recommend implementing crypto functions, this one is relatively safe to implement as the underlying primitives are provided by the platform.

Why is there no Objective C AddressBook Framework for iOS, and how to best tackle the problems with C in Swift?

This might be really generic and rather about the framework in general than a programming question. But, in the light of Swift, and the tedious and sometimes impossible tasks you have interacting with C APIs, that question is very relevant.
When building a new app for iOS, I discovered that you can really have a hard time working with address book framework. First, there is the uncomfortable pointer passing that you have to do for many CoreFoundation Methods. Secondly, the functions mostly return that ugly Unmanaged objects, where you have to figure out if they are retained or not (ARC is several years old now!). Accessing the properties through their identifiers is terribly cumbersome and far from typesafe. And lastly, since there is no C Function Pointer Support yet, you can´t even call ABAddressBookRegisterExternalChangeCallback(addressBook: ABAddressBook!, callback: ABExternalChangeCallback, context: UnsafeMutablePointer<Void>) because the ABExternalChangeCallback is so far only defined in Objective-C!
Then I found that there is some nice Objective-C Api in the Mac OS Version of AddressBookFramework. How unfair! Isn´t the iOS Frameworks younger? Why do you think Apple did this? And when will they change this in your opinion? Did I miss something, and is there an Objective-C Api for iOS, too?
Any suggestions for how to tackle above problems in the most convenient and beautiful way are welcome, too! For my part, I´m writing a complete wrapper to obscure all the nasty pointer- C-Function- and global constants uglyness. As soon as it´s ready I´ll commit it to StackExchange and maybe Github to let others benefit and discuss my solution.
EDIT: finally managed to upload my wrapper to GitHub. See
https://github.com/SocialbitGmbH/SwiftAddressBook
I agree with you about what iOS provides to access to the address book.
I've posted an answer explaining how I handled the problem, using some functional aspects of swift, and how I dealt with extracting unmanaged objects.
Briefly:
I defined a custom operator to allow me chaining function calls to transform some input data
I implemented 2 generic functions to extract unmanaged objects
posted some code to show how I access to the address book, loop through all contacts, and retrieve some data for each one

What is an undocumented method and a private API?

Recently I have get a reject from Apple because a use of a private API. I don't know exactly what is a private API nor an undocumented method. Could someone explain me what is an undocumented method and a private API? I'm really confused with that...
Follow up:
What is exactly the "official documentation"? Can I use some frameworks and classes made by thirds such as the Amazon one?
A private API or undocumented method is any object or method that is not part of the official documentation. In Objective C, and some other languages, it is relatively easy to find the list of methods (messages) that an object supports as well as the objects underlying the framework. (For example, just go into the debugger and look at the view hierarchy. You will likely see several view objects that don't exist in the documentation.) Sometimes you will even see instructions on how to use these methods and objects on the web.
One example that leaps to mind is -UIWindow _autolayoutTrace, I use it all the time when debugging autolayout, but it isn't documented and the leading underscore is a hint that you shouldn't be using it. That's fine for debugging, but if I shipped code that used that method it would be certain to be rejected.
But Apple specifically scans for these undocumented methods as part of the App Store review process and rejects apps that use them. This is because Apple might change how these undocumented methods work at any time. If your app was dependent on one of these hidden classes or methods your app might break when Apple released a new version of the SDK that changed this behavior.
There's a set of functionalities that Apple uses internally but are not publicly available for developers.
Any usage of such APIs will result in a rejection of the application by Apple.

Resources