M
M
ManWithBear2015-08-17 09:25:57
Objective-C
ManWithBear, 2015-08-17 09:25:57

How to localize a private API?

When trying to upload one of the latest builds, I received a letter from Apple about using private APIs.

Non-public API usage:
The app contains or inherits from non-public classes in PlugIns/WidgetName.appex/WidgetName: Transaction
The app contains or inherits from non-public classes in ProjectName: Settings, Transaction

Diff between the current version in the store and the rejected one:
Diff
diff --git a/Settings.m b/Settings.m
index 455cd3e..45c4e33 100644
--- a/Settings.m
+++ b/Settings.m
@@ -161 +161 @@
-    [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_MAIN_CURRENCY_CHANGED object:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationMainCurrencyChanged object:nil];
diff --git a/Transaction.h b/Transaction.h
index 3794388..e7ebd7c 100644
--- a/Transaction.h
+++ b/Transaction.h
@@ -21,0 +22 @@ typedef enum {
[email protected] double amountExchangeRate;
diff --git a/Transaction.m b/Transaction.m
index 9fa0ba4..dc32f11 100644
--- a/Transaction.m
+++ b/Transaction.m
@@ -17,0 +18 @@
+    tra.amountExchangeRate = 1;
@@ -43,0 +45 @@
+    tmp.amountExchangeRate = _amountExchangeRate;
@@ -69,0 +72 @@
+    [dict setValue:@(_amountExchangeRate) forKey:@"amountExchangeRate"];


How to understand what exactly they do not like and localize the problem? amountExchangeRate doesn't look like a private iVar at all

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
An, 2015-08-17
@ManWithBear

If you believe this answer
stackoverflow.com/questions/15392157/your-app-cont...
The problem is in the name of the classes. Most likely classes named Transaction exist.
Try renaming by adding a three-letter prefix and be sure to unsubscribe if this solved the problem
.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question