Newbie want to start on Ios... II

Monkey Targets Forums/iOS/Newbie want to start on Ios... II

Midimaster(Posted 2013) [#1]
Hi, half a year later I'm back to this sub-forum with new equipment, but the old problems. I now have a new Mac Mini OsX 10.9 with Monkey V76d and Xcode 5, everything installed today.

Monkey works and creates wonderful HTML5 apps...
BlitzMax creates nice OSX apps...

But I still have problem with creating simple IOS app. Is there any tutorial about "first steps" with IOS target?. It looks like, that it is not as simple as Mark writes it down in the "target sdk manual"!


The source code:
Strict
Import mojo
Class Game Extends App
	Field adjust:Int

	Method OnCreate%()
		SetUpdateRate 10
		Return 0
	End

	Method OnUpdate%()
		Return 0
	End

	Method OnRender%()
		Return 0
	End
End

Function Main%()
	New Game
	Return 0
End


causes this message:
"/Users/midimaster/MonkeyPro76d/bin/transcc_macos" -target=iOS_Game -config=Debug -run "/Users/midimaster/Monkey/AbsolutLeer.monkey"
TRANS monkey compiler V1.60
Parsing...
Semanting...
Translating...
Building...
Build settings from command line:
    SDKROOT = iphonesimulator7.0

=== BUILD TARGET MonkeyGame OF PROJECT MonkeyGame WITH CONFIGURATION Debug ===

Check dependencies

CpResource data build/Debug-iphonesimulator/MonkeyGame.app/data
    cd /Users/midimaster/Monkey/AbsolutLeer.build/ios
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/midimaster/Monkey/AbsolutLeer.build/ios/data /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator/MonkeyGame.app

CompileC build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o main.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/midimaster/Monkey/AbsolutLeer.build/ios
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=4.3 -iquote /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-generated-files.hmap -I/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-own-target-headers.hmap -I/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-all-target-headers.hmap -iquote /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-project-headers.hmap -I/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator/include -Ilibs -I/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/DerivedSources/i386 -I/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/DerivedSources -F/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator -include /var/folders/13/ndjf25xs0jg2w241_1j3f1kh0000gn/C/com.apple.DeveloperTools/5.0.2-5A3005/Xcode/SharedPrecompiledHeaders/MonkeyGame_Prefix-equimioxvxnmmideoukycvpekbiz/MonkeyGame_Prefix.pch -MMD -MT dependencies -MF /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.d --serialize-diagnostics /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.dia -c /Users/midimaster/Monkey/AbsolutLeer.build/ios/main.mm -o /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o

Ld build/Debug-iphonesimulator/MonkeyGame.app/MonkeyGame normal i386
    cd /Users/midimaster/Monkey/AbsolutLeer.build/ios
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator -Llibs -F/Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator -filelist /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/MonkeyGame.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.3 -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework OpenAL -framework AudioToolbox -framework AVFoundation -Xlinker -dependency_info -Xlinker /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/MonkeyGame_dependency_info.dat -o /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator/MonkeyGame.app/MonkeyGame

GenerateDSYMFile build/Debug-iphonesimulator/MonkeyGame.app.dSYM build/Debug-iphonesimulator/MonkeyGame.app/MonkeyGame
    cd /Users/midimaster/Monkey/AbsolutLeer.build/ios
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator/MonkeyGame.app/MonkeyGame -o /Users/midimaster/Monkey/AbsolutLeer.build/ios/build/Debug-iphonesimulator/MonkeyGame.app.dSYM

** BUILD SUCCEEDED **

TRANS FAILED: Can't find iPhone simulator app version dir
Done.



Xaron(Posted 2013) [#2]
Actually you did it already. I have problems launching the simulator from Monkey as well. I always build the project like you did and open the XCode project file with XCode then. That's where I continue to setup all remaining things like splash screen, resolution and so on. Takes some time to dig through XCode but feel free to ask any questions! :)


Midimaster(Posted 2013) [#3]
Thank you Xaron,

I thought I'm the last one who wants to compile the games towards IOS target.

I am very unhappy about Blitz Research Ltd. information policy. I would expect more information and tutorials about getting started development to all the targets. As I am new to one target, I need some more detailed information about all steps than mark provides.

Can I contact you on the german BlitzBasic forum? I think you are very active there too as 'Xeres'?


Paul - Taiphoz(Posted 2013) [#4]
Posting all relevant information here would be better for the community, as I am sure there will be more new people to iOS who will stumble over this.


Sub_Zero(Posted 2013) [#5]
Works fine here on OSX Lion, XCode 4.5 ... No problem launching the simulator.... Maybe post in the bug forum for OSX Mavericks?


Xaron(Posted 2013) [#6]
Sure Midimaster! I'm Xaron as well in the Blitzforum.

Looks like you already successfully compiled it for iOS. All you have to do is start XCode and load that project! Should work! The hardest part is still in front of you, with all these nasty little XCode detais and the signing stuff...


Midimaster(Posted 2014) [#7]
Thank you Xaron,

you are right. My build was already successful, but I did not know the next step. Now I found the file "MonkeyGame.xcodeproj" in the games build folder. After a double click on it Xcode opened. In the left corner there is a "PLAY" and a "STOP" symbol. when I click there the simulator opens with my game.

Now I will test some of my games on the simulator first. In a first step I will not publish anything, but only simulate. It looks like that no additional "Xcode stuff" is necessary for that. Or?

In the end I will write down all my beginners experiences in a "Newbie on iOS target" tutorial.


Xaron(Posted 2014) [#8]
Great! Well the real "fun" starts with all these certificates and signing stuff... o_O


Raph(Posted 2014) [#9]
There is an assortment of stuff around icons and splash screens and setting the name that you probably want to tackle before certificates and signing. There was a pretty good guide here in the forums, but I didn't save a link. :(


rIKmAN(Posted 2014) [#10]
Here is the guide I followed, worked a treat.

http://www.monkeycoder.co.nz/Community/posts.php?topic=4150

A few things may be different now since they have updated xCode and iOS7 etc since the guide, but it should still work fine when you find where they have moved various options to.


Midimaster(Posted 2014) [#11]
Now I do my first steps in Converting apps from Android to IOS target, but its hard to find simple things like the console....

Is there any window, where I can see strings I fired with PRINT commands in my monkey code?

....
Print "Hello World"
....


**** EDIT ****

Ok, I found it...

In the Xcode window in the left column below the headline "MonkeyGame" there is a item "Debug" on the top. When you click on it the log window opens....


This is a list of all things you have to take care about, when converting from Android to IOS:

- all OGG files must be converted to MP3 files

(at the end this list will result in a "converting tutorial")