IPhone/iPod development: changes

Revision 57504
Skalogryz,
/* External Links */
Older edit
Revision 57505
Skalogryz,
iOS 8.0
Newer edit
@@ -154,6 +154,36 @@
154154
155(possibly with an INSTALL_PREFIX=xyz at the end of the "sudo make" line to install it under "xyz" rather than under /usr/local -- in that case, also adjust the "ln" command afterwards)155(possibly with an INSTALL_PREFIX=xyz at the end of the "sudo make" line to install it under "xyz" rather than under /usr/local -- in that case, also adjust the "ln" command afterwards)
156156
157## iOS 8.0
158
159Apple is requires everyone to use 64-bit applications for iOS 8.0 (and later). Also iPhone Simulator for iOS 8.0 is 64-bit only.
160In order to be able to create arm64 applications with FPC, you'll need to get FPC from trunk (3.1.1) the support has been added February 2015.
161
162If you're not trunk follower, then you might want to start by getting FPC 2.6.4 installed and then get the trunk and [[Cross_compiling|then compile it]]. By default the compiler created is i386, you'll need x86_64 bit version. You'll need to compile RTL for iphonesim target as well.
163
164Whenever you'd compile a project you'll need to use proper proper SDK and proper Bin utilities. Note that for iPhone Simulator, there's also its own set of bin-utils, not compatible with default OSX bin utils.
165
166Example
167
168```
169export SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
170export BIN_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
171```
172
173```
174ppcx64 -Tiphonesim -Px86_64 -Scghi -O1 -va -XR$IOS_BASE -FD$BIN_BASE iphoneproj.pas
175```
176
177Note that using "-va" parameter (show all messages) typically helps to know, if you're using the right path for bin utils and SDK. The desired result is that ctrl.o library and ld tool are found in a proper target platform, similar to shown below.
178
179```
180[0.437] Linking iphoneproj
181[0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/crt1.o... found
182[0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld... found
183```
184
185If the path is not found FPC will fallback to system-wide defaults (OSX target) and the linking is likely to fail.
186
157## More information187## More information
158188
159- [Simple iPhone example using FreePascal and SDL](http://freeze-dev.de/blog/?p=492)189- [Simple iPhone example using FreePascal and SDL](http://freeze-dev.de/blog/?p=492)