# See the License for the specific language governing permissions and
# limitations under the License.
-# iOS services for Nit app on iOS
+# iOS platform support
module ios
import platform
import app
+
+import cocoa::foundation
+
+redef fun print(msg) do msg.to_s.nslog
+redef fun print_error(msg) do msg.to_s.nslog
+
+redef class Text
+ private fun nslog do to_nsstring.nslog
+end
+
+redef class NSString
+ private fun nslog in "ObjC" `{ NSLog(@"%@", self); `}
+end
+
+redef class CString
+ # FIXME temp workaround for #1945, bypass Unicode checks
+ redef fun char_at(pos) do return self[pos].ascii
+end