lib: intro `prompt`, basic Apache 2.0 service to display a prompt
[nit.git] / lib / ios / ios.nit
index 9d5079d..59778b4 100644 (file)
 # 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