Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to get a response from a method in Objective-C in C#?
There is a method that returns bool the method is written in objective-c, how to get bool property in c#
+ (BOOL)userRatedApp{
if (forceUnlock){
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:SaveKey];
[[NSUserDefaults standardUserDefaults] synchronize];
return YES;
}
#else
#endif
BOOL rateNeed = NO;
if (rateNeed) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:SaveKey];
[[NSUserDefaults standardUserDefaults] synchronize];
}
return rateNeed;
}
Answer the question
In order to leave comments, you need to log in
You need to create a wrapper on the unit side and specify the correct method signature:
[DllImport ("__Internal")]
private static extern bool userRatedApp();
bool flag = true;
if(flag)
{
Console.WriteLine("Flag is true");
}
flag = false;
if(flag == false)
{
Console.WriteLine("Flag is false");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question