Skip to content

Commit

Permalink
Work for iOS privacy requirements
Browse files Browse the repository at this point in the history
Regarding NSPrivacyAccessedAPICategoryUserDefaults. This should address part of the problem in #3800 but doesn't fully fix it.
  • Loading branch information
shai-almog committed Apr 17, 2024
1 parent 879e336 commit 2a5362e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Ports/iOSPort/nativeSources/IOSNative.m
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,7 @@ void com_codename1_impl_ios_IOSNative_setBrowserPage___long_java_lang_String_jav
}

void com_codename1_impl_ios_IOSNative_setBrowserUserAgent___long_java_lang_String(CN1_THREAD_STATE_MULTI_ARG JAVA_OBJECT instanceObject, JAVA_LONG peer, JAVA_OBJECT ua) {
#ifdef ENABLE_SET_BROWSER_USER_AGENT
NSString *_ua = toNSString(CN1_THREAD_GET_STATE_PASS_ARG ua);
dispatch_async(dispatch_get_main_queue(), ^{
POOL_BEGIN();
Expand All @@ -2543,6 +2544,7 @@ void com_codename1_impl_ios_IOSNative_setBrowserUserAgent___long_java_lang_Strin
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
POOL_END();
});
#endif
}


Expand Down
1 change: 1 addition & 0 deletions Ports/iOSPort/nativeSources/permission_apis.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
#define PERMISSION_APIS__HH

//#define checkModificationDatePermission
//#define ENABLE_SET_BROWSER_USER_AGENT

#endif // PERMISSION_APIS__HH

0 comments on commit 2a5362e

Please sign in to comment.